From report at bugs.python.org Thu May 1 00:03:53 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 30 Apr 2008 22:03:53 +0000 Subject: [issue2729] Link error in What's New in Python 2.6 In-Reply-To: <1209592624.39.0.481461750945.issue2729@psf.upfronthosting.co.za> Message-ID: <1209593033.26.0.0675782924448.issue2729@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks. Fixed in r62608. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 03:59:52 2008 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 May 2008 01:59:52 +0000 Subject: [issue2728] Failing decimal doctest In-Reply-To: <1209590924.27.0.894325194913.issue2728@psf.upfronthosting.co.za> Message-ID: <1209607191.96.0.181816327127.issue2728@psf.upfronthosting.co.za> Mark Dickinson added the comment: There are a couple of problems here. The direct reason for the failure is that there's an earlier doctest (around line 61 of decimal.py) that sets the precision of the current context to 18 instead of its default value of 28. The obvious fix is to add a line: >>> setcontext(DefaultContext) just after the '>>> from __future__ import with_statement' line (around line 480 of decimal.py), to restore the original context. *but*... that doesn't work, because test_decimal.py clobbers DefaultContext (and it shouldn't, in my opinion). I've attached a patch that might fix these problems, and that also enables this doctest. I'm not sure that this patch is necessarily the best way of going about things, though. ---------- assignee: -> facundobatista keywords: +patch nosy: +facundobatista, marketdickinson Added file: http://bugs.python.org/file10149/decimal_localcontext.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 04:23:18 2008 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 May 2008 02:23:18 +0000 Subject: [issue2728] Failing decimal doctest In-Reply-To: <1209590924.27.0.894325194913.issue2728@psf.upfronthosting.co.za> Message-ID: <1209608598.12.0.706570222029.issue2728@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file10149/decimal_localcontext.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 04:27:50 2008 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 May 2008 02:27:50 +0000 Subject: [issue2728] Failing decimal doctest In-Reply-To: <1209590924.27.0.894325194913.issue2728@psf.upfronthosting.co.za> Message-ID: <1209608865.75.0.713681802538.issue2728@psf.upfronthosting.co.za> Mark Dickinson added the comment: Removed the old patch. Here's a better patch, that avoids changing the semantics of the threading tests. As far as I can tell, the setting and resetting of DefaultContext traps in DecimalTest's setUp and tearDown method was pointless, since that test doesn't use the DefaultContext: it uses its own freshly created context instead. So the patch removes the setting of traps from setUp, and removes tearDown entirely. Added file: http://bugs.python.org/file10150/decimal_localcontext.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 12:35:04 2008 From: report at bugs.python.org (tempname) Date: Thu, 01 May 2008 10:35:04 +0000 Subject: [issue2730] file readline w+ memory dumps In-Reply-To: <1209638102.99.0.899973997265.issue2730@psf.upfronthosting.co.za> Message-ID: <1209638102.99.0.899973997265.issue2730@psf.upfronthosting.co.za> New submission from tempname : the following code actually dumps the heap into the temp file... very strange. Make sure the file doesn't exist before running the script. Only the list of numbers should be written to the file, but alot of junk is added. x = str(range(10)) f = open('c:\\temp.txt', 'w+') f.write(x) for i in range(10): y = f.readline() print repr(y) f.close() ---------- components: None messages: 66032 nosy: tempname1234 severity: normal status: open title: file readline w+ memory dumps type: security versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 16:16:24 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Thu, 01 May 2008 14:16:24 +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: <1209651383.58.0.0588528650513.issue2636@psf.upfronthosting.co.za> Jeffrey C. Jacobs added the comment: I am making my changes in a Bazaar branch hosted on Launchpad. It took me quite a while to get things set up more-or-less logically but there they are and I'm currently trying to re-apply my local changes up to today into the various branches I have. Each of the 11 issues I outlined originally has its own branch, with a root branch from which all these branches are derived to serve as a place for a) merging in python 2.6 alpha concurrent development (merges) and to apply any additional re changes that don't fall into any of the other categories, of which I have so far found only 2 small ones. Anyway, if anyone is interested in monitoring my progress, it is available at: https://code.launchpad.net/~timehorse/ I will still post major milestones here, but one can monitory day-to-day progress on Launchpad. Also on launchpad you will find more detail on the plans for each of the 11 modifications, for the curious. Thanks again for all the advice! __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 18:08:52 2008 From: report at bugs.python.org (=?utf-8?q?Gerald_Schl=C3=BCter?=) Date: Thu, 01 May 2008 16:08:52 +0000 Subject: [issue2731] Documentation error on prime example in tutorial In-Reply-To: <1209658131.12.0.892080432215.issue2731@psf.upfronthosting.co.za> Message-ID: <1209658131.12.0.892080432215.issue2731@psf.upfronthosting.co.za> New submission from Gerald Schl?ter : Hi there, on the page "controlflow.html" in chapter "break and continue Statements..." the line: print(n, 'equals', x, '*', n/x) should be changed to: print(n, 'equals', x, '*', n//x) or else the shown output should be modified. Thank you, Gerry ---------- assignee: georg.brandl components: Documentation messages: 66034 nosy: georg.brandl, gls severity: normal status: open title: Documentation error on prime example in tutorial versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 18:39:41 2008 From: report at bugs.python.org (Shish) Date: Thu, 01 May 2008 16:39:41 +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: <1209659981.45.0.724290161206.issue2732@psf.upfronthosting.co.za> New submission from Shish : Even in the self-test suite, the bug appears, run: python /usr/lib/python2.4/curses/textpad.py then type so that the line wraps, eg 123456789123456789 to fill two lines, and then ctrl-g to return -- the result has had the end characters of each line removed, so the return value is 12345678\n12345678\n As a quick hack on my local install I changed line 56 from: last = min(self.maxx, last+1) to last = min(self.maxx, last)+1 and it seems to work, but I have no idea if this is the right way to fix it (ie, this might have side effects, or this off-by-one might happen in several places and need a global fix, not just one local one) ---------- components: Extension Modules messages: 66035 nosy: shish severity: normal status: open title: curses.textpad loses characters at the end of lines versions: Python 2.4 __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 19:04:17 2008 From: report at bugs.python.org (Kathryn M Kowalski) Date: Thu, 01 May 2008 17:04:17 +0000 Subject: [issue2733] mmap resize fails on anonymous memory (Windows) In-Reply-To: <1209661457.64.0.989081565875.issue2733@psf.upfronthosting.co.za> Message-ID: <1209661457.64.0.989081565875.issue2733@psf.upfronthosting.co.za> New submission from Kathryn M Kowalski : We have a shared memory module that has been running fine on Windows with Active State Python 2.4.3 Build 12. On machines with 2.5.1.1 mmap.resize fails on an existing anonymous shared memory. The attached file is a stripped down version of the code to illustrate the problem. Start it running in one window to create the shared memory, then in another window run it again to hook into existing shared memory. Result: Testing SharedMemory open -self.memory_size 336 Traceback (most recent call last): File "C:/home/weather/TESTOF~1.PY", line 164, in example() File "C:/home/weather/TESTOF~1.PY", line 147, in example sm = SharedMemory( 'my_shared_memory') File "C:/home/weather/TESTOF~1.PY", line 31, in __init__ self.__open() File "C:/home/weather/TESTOF~1.PY", line 94, in __open self.memory.resize(self.memory_size) WindowsError: [Error 8] Not enough storage is available to process this command ---------- components: Library (Lib) files: testofResizeB.txt messages: 66036 nosy: kmk severity: normal status: open title: mmap resize fails on anonymous memory (Windows) type: crash versions: Python 2.5 Added file: http://bugs.python.org/file10151/testofResizeB.txt __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 19:17:51 2008 From: report at bugs.python.org (Shish) Date: Thu, 01 May 2008 17:17:51 +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: <1209662271.4.0.756122309209.issue2732@psf.upfronthosting.co.za> Changes by Shish : ---------- type: -> behavior __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 20:07:06 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 01 May 2008 18:07:06 +0000 Subject: [issue2731] Documentation error on prime example in tutorial In-Reply-To: <1209658131.12.0.892080432215.issue2731@psf.upfronthosting.co.za> Message-ID: <1209665226.77.0.89212960341.issue2731@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r62615. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 21:21:01 2008 From: report at bugs.python.org (Charles McCreary) Date: Thu, 01 May 2008 19:21:01 +0000 Subject: [issue2734] 2to3 converts long(itude) argument to int In-Reply-To: <1209669660.53.0.857681626906.issue2734@psf.upfronthosting.co.za> Message-ID: <1209669660.53.0.857681626906.issue2734@psf.upfronthosting.co.za> New submission from Charles McCreary : The 2to3 converter converts variables named "long" to "int". Original: long is an argument (longitude) def add_test_qtrmin(tdb, lat, long, area_id, call_center=""): Converted: def add_test_qtrmin(tdb, lat, int, area_id, call_center=""): I can see what it is trying to do, but I definitely don't want this behavior! ---------- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) messages: 66038 nosy: collinwinter, crmccreary severity: normal status: open title: 2to3 converts long(itude) argument to int versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 22:05:31 2008 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 01 May 2008 20:05:31 +0000 Subject: [issue2512] decide what to do with gettext API In-Reply-To: <1206828512.7.0.626832335532.issue2512@psf.upfronthosting.co.za> Message-ID: <1209672330.78.0.961828691843.issue2512@psf.upfronthosting.co.za> Guido van Rossum added the comment: This patch doesn't apply cleanly. :-( ---------- nosy: +gvanrossum __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 22:33:10 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 01 May 2008 20:33:10 +0000 Subject: [issue2730] file readline w+ memory dumps In-Reply-To: <1209638102.99.0.899973997265.issue2730@psf.upfronthosting.co.za> Message-ID: <1209673989.98.0.922020409866.issue2730@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This is a duplicate of issue1394612, which was closed as "invalid". See the discussion there: - "in standard C mixing reads with writes yields undefined behavior [...] If you want defined behavior, then, for example, add >>> f.seek(0) between your write() and read() calls.""" BTW, python 3.0 has a new implementation of the I/O stack, which does not use fopen, and does not have this problem. ---------- nosy: +amaury.forgeotdarc resolution: -> wont fix status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 22:43:27 2008 From: report at bugs.python.org (Collin Winter) Date: Thu, 01 May 2008 20:43:27 +0000 Subject: [issue2734] 2to3 converts long(itude) argument to int In-Reply-To: <1209669660.53.0.857681626906.issue2734@psf.upfronthosting.co.za> Message-ID: <1209674607.37.0.354823075118.issue2734@psf.upfronthosting.co.za> Collin Winter added the comment: Agreed. There's code in fix_next to detect this kind of case. I'll see what I can do about generalizing it to support fix_long. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 22:48:57 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 01 May 2008 20:48:57 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> Message-ID: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> New submission from Benjamin Peterson : Per discussions on Python-3000, I've stipped range down to a bare minimum. Here's an overview of the patch: 1. No slicing. 2. Length is computed in constructor and is a PyLong in the object's struct. __len__ simply tries to convert it to a Py_ssize_t. 3. start, stop, and, step are exposed as attributes ---------- assignee: gvanrossum components: Interpreter Core files: range_lean_and_mean.patch keywords: patch messages: 66042 nosy: benjamin.peterson, gvanrossum severity: normal status: open title: range: lean and mean type: behavior versions: Python 3.0 Added file: http://bugs.python.org/file10152/range_lean_and_mean.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 22:50:39 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 01 May 2008 20:50:39 +0000 Subject: [issue2512] decide what to do with gettext API In-Reply-To: <1206828512.7.0.626832335532.issue2512@psf.upfronthosting.co.za> Message-ID: <1209675039.75.0.980024302667.issue2512@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I've pushed a fresh branch and am attaching a new patch. Added file: http://bugs.python.org/file10153/gettext_api2.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 23:01:11 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 01 May 2008 21:01:11 +0000 Subject: [issue2733] mmap resize fails on anonymous memory (Windows) In-Reply-To: <1209661457.64.0.989081565875.issue2733@psf.upfronthosting.co.za> Message-ID: <1209675671.32.0.494426786632.issue2733@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It seems that you attached the output file instead of a python script... ---------- nosy: +amaury.forgeotdarc __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 23:03:29 2008 From: report at bugs.python.org (Miki Tebeka) Date: Thu, 01 May 2008 21:03:29 +0000 Subject: [issue2736] datetime needs and "epoch" method In-Reply-To: <1209675808.9.0.995048704016.issue2736@psf.upfronthosting.co.za> Message-ID: <1209675808.9.0.995048704016.issue2736@psf.upfronthosting.co.za> New submission from Miki Tebeka : If you try to convert datetime objects to seconds since epoch and back it will not work since the microseconds get lost: >>> dt = datetime(2008, 5, 1, 13, 35, 41, 567777) >>> seconds = mktime(dt.timetuple()) >>> datetime.fromtimestamp(seconds) == dt False Current fix is to do >>> seconds += (dt.microsecond / 1000000.0) >>> datetime.fromtimestamp(seconds) == dt True ---------- components: Library (Lib) messages: 66045 nosy: tebeka severity: normal status: open title: datetime needs and "epoch" method type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 23:16:08 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 01 May 2008 21:16:08 +0000 Subject: [issue2723] Truncate __len__() at sys.maxsize In-Reply-To: <1209530191.73.0.609196846233.issue2723@psf.upfronthosting.co.za> Message-ID: <1209676568.78.0.966427075794.issue2723@psf.upfronthosting.co.za> Benjamin Peterson added the comment: If you're interested I asked a Java news group: http://groups.google.com/group/comp.lang.java.programmer/browse_thread/thread/fddbc3b1f9fec125# ---------- nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 23:18:03 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 01 May 2008 21:18:03 +0000 Subject: [issue1640] Enhancements for mathmodule In-Reply-To: <1197906524.11.0.494722426175.issue1640@psf.upfronthosting.co.za> Message-ID: <1209676683.32.0.500855230745.issue1640@psf.upfronthosting.co.za> Christian Heimes added the comment: The patch was part of the merge of Mark's and my trunk-math branch. It was merged into the trunk and 3.0 a while ago. ---------- resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 23:18:48 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 01 May 2008 21:18:48 +0000 Subject: [issue2734] 2to3 converts long(itude) argument to int In-Reply-To: <1209669660.53.0.857681626906.issue2734@psf.upfronthosting.co.za> Message-ID: <1209676728.04.0.790438027455.issue2734@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This seems to happen whenever argument are types that need to be renamed (eg. unicode -> str) Can this be fixed globally? ---------- nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 23:39:41 2008 From: report at bugs.python.org (Facundo Batista) Date: Thu, 01 May 2008 21:39:41 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> Message-ID: <1209677981.45.0.869369928274.issue2735@psf.upfronthosting.co.za> Facundo Batista added the comment: Just for the record: Why __len__ tries to convert it to Py_size_t (possibly generating an Overflow), and not just returns the PyLong object? ---------- nosy: +facundobatista __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 23:41:19 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 01 May 2008 21:41:19 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> Message-ID: <1209678079.85.0.656500512526.issue2735@psf.upfronthosting.co.za> Benjamin Peterson added the comment: __len__ always has to return a Py_ssize_t because that's the data type that represents lengths in C. It's just the way it is. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 23:45:30 2008 From: report at bugs.python.org (Collin Winter) Date: Thu, 01 May 2008 21:45:30 +0000 Subject: [issue2734] 2to3 converts long(itude) argument to int In-Reply-To: <1209669660.53.0.857681626906.issue2734@psf.upfronthosting.co.za> Message-ID: <1209678330.74.0.744584901199.issue2734@psf.upfronthosting.co.za> Collin Winter added the comment: It *could* be implemented for all fixers, but since it's fairly expensive, I'd rather limit it to cases where the problem is more likely to occur (for example, unicode -> str doesn't meet this threshold IMHO). __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 1 23:58:33 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 01 May 2008 21:58:33 +0000 Subject: [issue1569] Add VS CRT redist to the MSI installer In-Reply-To: <1197051927.23.0.805200385049.issue1569@psf.upfronthosting.co.za> Message-ID: <1209679113.59.0.658774766273.issue1569@psf.upfronthosting.co.za> Christian Heimes added the comment: As far as I understood recent commits Martin has figured out how to integrate the VS CRT redist merge modules into the MSI installer. Am I correct? ---------- status: open -> pending __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 00:09:55 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 01 May 2008 22:09:55 +0000 Subject: [issue1569] Add VS CRT redist to the MSI installer In-Reply-To: <1197051927.23.0.805200385049.issue1569@psf.upfronthosting.co.za> Message-ID: <1209679795.42.0.880153535176.issue1569@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Correct. This is now fixed. ---------- resolution: -> fixed status: pending -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 01:57:10 2008 From: report at bugs.python.org (Adam Olsen) Date: Thu, 01 May 2008 23:57:10 +0000 Subject: [issue1722344] Thread shutdown exception in Thread.notify() Message-ID: <1209686228.98.0.696697720122.issue1722344@psf.upfronthosting.co.za> Adam Olsen added the comment: This bug was introduced by r53249, which was fixing bug #1566280. Fixed by moving the WaitForThreadShutdown call into Py_Finalize, so all shutdown paths use it. I also tweaked the name to follow local helper function conventions. Martin, since you did the previous fix, can you review this one? ---------- keywords: +patch nosy: +loewis Added file: http://bugs.python.org/file10154/nondaemon_thread_shutdown.diff _____________________________________ Tracker _____________________________________ From report at bugs.python.org Fri May 2 02:04:17 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 02 May 2008 00:04:17 +0000 Subject: [issue1722344] Thread shutdown exception in Thread.notify() Message-ID: <1209686657.58.0.231215746271.issue1722344@psf.upfronthosting.co.za> Adam Olsen added the comment: Oh, and the patch includes a testcase. The current test_threading.py doesn't work with older versions, but a freestanding version of this testcase passes in 2.1 to 2.4, fails in 2.5 and trunk, and passes with the patch. _____________________________________ Tracker _____________________________________ From report at bugs.python.org Fri May 2 03:33:50 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 May 2008 01:33:50 +0000 Subject: [issue2224] branches/trunk-math patch In-Reply-To: <1204565487.81.0.141440413352.issue2224@psf.upfronthosting.co.za> Message-ID: <1209692030.68.0.471213548287.issue2224@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing: Christian merged the trunk-math branch into the trunk in r62380. ---------- resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 04:27:05 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 02 May 2008 02:27:05 +0000 Subject: [issue2705] incompatible change to warnings.showwarning In-Reply-To: <1209323334.77.0.104236998001.issue2705@psf.upfronthosting.co.za> Message-ID: <1209695225.31.0.209650326272.issue2705@psf.upfronthosting.co.za> Brett Cannon added the comment: Fixed in r62626. I left in the optional arguments but they are just not called anymore by the 'warnings' machinery. I might add a PendingDeprecationWarning so that people start to add the argument, though, for future use. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 04:29:25 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 02 May 2008 02:29:25 +0000 Subject: [issue2705] incompatible change to warnings.showwarning In-Reply-To: <1209323334.77.0.104236998001.issue2705@psf.upfronthosting.co.za> Message-ID: <1209695365.02.0.733887493792.issue2705@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Why don't you add a Py3k warning and keep it in Py3k? __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 04:33:52 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 02 May 2008 02:33:52 +0000 Subject: [issue2705] incompatible change to warnings.showwarning In-Reply-To: <1209695365.02.0.733887493792.issue2705@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Thu, May 1, 2008 at 7:29 PM, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > Why don't you add a Py3k warning and keep it in Py3k? Just asked python-dev if they are okay with that. 2.6 could get a PendingDeprecationWarning and 3.0 could get a DeprecationWarning. But I don't want to do an API change between the two that breaks code like that. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 04:38:05 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 02 May 2008 02:38:05 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> Message-ID: <1209695885.18.0.418682971623.issue2735@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The start/step/stop getter functions should INCREF return values. Is there a reason not to adapt slice implementation: static PyMemberDef slice_members[] = { {"start", T_OBJECT, offsetof(PySliceObject, start), READONLY}, {"stop", T_OBJECT, offsetof(PySliceObject, stop), READONLY}, {"step", T_OBJECT, offsetof(PySliceObject, step), READONLY}, {0} }; ---------- nosy: +belopolsky __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 04:49:29 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 02 May 2008 02:49:29 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209695885.18.0.418682971623.issue2735@psf.upfronthosting.co.za> Message-ID: <1afaf6160805011949j595811d1vaa4c1ef8c01f6855@mail.gmail.com> Benjamin Peterson added the comment: On Thu, May 1, 2008 at 9:38 PM, Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > The start/step/stop getter functions should INCREF return values. Is > there a reason not to adapt slice implementation: No, its much simpler. Added file: http://bugs.python.org/file10155/range_lean_and_mean2.patch __________________________________ Tracker __________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: range_lean_and_mean2.patch URL: From report at bugs.python.org Fri May 2 04:57:50 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 02 May 2008 02:57:50 +0000 Subject: [issue2720] make compiling struct be passed around to all ast helpers In-Reply-To: <1209505325.8.0.542617617713.issue2720@psf.upfronthosting.co.za> Message-ID: <1209697070.24.0.415281313358.issue2720@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Georg, is it all right if I apply this? ---------- assignee: -> georg.brandl nosy: +georg.brandl __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 05:44:03 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 02 May 2008 03:44:03 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> Message-ID: <1209699843.5.0.327534410832.issue2735@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: - With length precomputed in range_new, we can probably get rid of get_len_of_range. - There is no need to recompute length in range_iter. A nit: iterator object's size member is called "len", but the same member of the range object is called "length." I have no preference between the two names, but I think they should be the same. Off-topic: why optimized iterator uses long rather than ssize_t arithmetics? On x86-64, ssize_t is 64 and long is 32 bit. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 17:58:12 2008 From: report at bugs.python.org (Kathryn M Kowalski) Date: Fri, 02 May 2008 15:58:12 +0000 Subject: [issue2733] mmap resize fails on anonymous memory (Windows) In-Reply-To: <1209661457.64.0.989081565875.issue2733@psf.upfronthosting.co.za> Message-ID: <1209743892.17.0.807065916848.issue2733@psf.upfronthosting.co.za> Kathryn M Kowalski added the comment: sorry Added file: http://bugs.python.org/file10170/testofResize.py.txt __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 18:11:51 2008 From: report at bugs.python.org (Trent Nelson) Date: Fri, 02 May 2008 16:11:51 +0000 Subject: [issue2733] mmap resize fails on anonymous memory (Windows) In-Reply-To: <1209661457.64.0.989081565875.issue2733@psf.upfronthosting.co.za> Message-ID: <1209744711.15.0.853257095354.issue2733@psf.upfronthosting.co.za> Changes by Trent Nelson : ---------- nosy: +Trent.Nelson __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 18:40:06 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 02 May 2008 16:40:06 +0000 Subject: [issue2632] performance problem in socket._fileobject.read In-Reply-To: <1208197816.87.0.564994342754.issue2632@psf.upfronthosting.co.za> Message-ID: <1209746406.25.0.278851389824.issue2632@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I fixed the min vs max use that Ralf noted and have submitted this as r62627. all tests pass for me but I believe it deserves a wider audience and testing outside of just the test suite. could those who reported the original problems (both the memory use issue and the speed issue) run their tests with this applied? ... watching the buildbots ... http://codereview.appspot.com/621/diff/61/81 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 19:08:13 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 02 May 2008 17:08:13 +0000 Subject: [issue2632] performance problem in socket._fileobject.read In-Reply-To: <1208197816.87.0.564994342754.issue2632@psf.upfronthosting.co.za> Message-ID: <1209748093.2.0.289314573949.issue2632@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- priority: critical -> release blocker __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 19:09:42 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 02 May 2008 17:09:42 +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: <1209748182.09.0.664689325155.issue2722@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- keywords: +easy nosy: +gregory.p.smith priority: -> normal __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 19:31:16 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 02 May 2008 17:31:16 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209699843.5.0.327534410832.issue2735@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: One more nit: you don't need to zero out trailing range_as_sequence members explicitly. static PySequenceMethods range_as_sequence = { (lenfunc)range_length, /* sq_length */ }; should be enough. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 19:39:21 2008 From: report at bugs.python.org (Facundo Batista) Date: Fri, 02 May 2008 17:39:21 +0000 Subject: [issue2728] Failing decimal doctest In-Reply-To: <1209590924.27.0.894325194913.issue2728@psf.upfronthosting.co.za> Message-ID: <1209749961.37.0.724181907348.issue2728@psf.upfronthosting.co.za> Facundo Batista added the comment: Commited, r62638. Thank you both! ---------- resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 20:05:40 2008 From: report at bugs.python.org (Ruben Kerkhof) Date: Fri, 02 May 2008 18:05:40 +0000 Subject: [issue2740] Cmd module doesn't support readline completion on OSX Leopard In-Reply-To: <1209751540.52.0.644222816573.issue2740@psf.upfronthosting.co.za> Message-ID: <1209751540.52.0.644222816573.issue2740@psf.upfronthosting.co.za> New submission from Ruben Kerkhof : Hi, Leopard ships with libedit, which is almost the same as readline, but has another way to configure completion keys. To enable tab completion you have to use rl.parse_and_bind("bind ^I complete") instead of rl.parse_and_bind("bind ^I rl_complete") instead of rl.parse_and_bind("tab: complete"). The guys from IPython patched around it, see http://ipython.scipy.org/moin/InstallationOSXLeopard/LeopardPythonReadli ne, but is seems to me this is better solved in the python readline module itself. ---------- components: Library (Lib) messages: 66101 nosy: ruben severity: normal status: open title: Cmd module doesn't support readline completion on OSX Leopard type: behavior versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 20:53:14 2008 From: report at bugs.python.org (Mike MacFaden) Date: Fri, 02 May 2008 18:53:14 +0000 Subject: [issue2741] documentation -- do serversockets work with ipv6 In-Reply-To: <1209754393.92.0.50120862505.issue2741@psf.upfronthosting.co.za> Message-ID: <1209754393.92.0.50120862505.issue2741@psf.upfronthosting.co.za> New submission from Mike MacFaden : the url http://docs.python.org/lib/node633.html states 1) address_family The family of protocols to which the server's socket belongs. socket.AF_INET and socket.AF_UNIX are two possible values. would suggest including socket.AF_INET6 as well if it is supported or what criteria makes a socket not usable with this class. ---------- assignee: georg.brandl components: Documentation messages: 66102 nosy: georg.brandl, mrm severity: normal status: open title: documentation -- do serversockets work with ipv6 versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 20:57:59 2008 From: report at bugs.python.org (Mike MacFaden) Date: Fri, 02 May 2008 18:57:59 +0000 Subject: [issue2742] example code does not work In-Reply-To: <1209754679.55.0.840137197769.issue2742@psf.upfronthosting.co.za> Message-ID: <1209754679.55.0.840137197769.issue2742@psf.upfronthosting.co.za> New submission from Mike MacFaden : the url http://docs.python.org/lib/socket-example.html gives an example that uses socket.getaddrinfo that has this code HOST='' ... for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE) but this fails on freebsd 6.1/python 2.5 as follows > /usr/home/mrm/s2.py(30)() -> for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE): (Pdb) p HOST '' (Pdb) n gaierror: (8, 'hostname nor servname provided, or not known') > /usr/home/mrm/s2.py(30)() but setting HOST=None works fine. either this is a doc bug or a code bug, your pick. ---------- assignee: georg.brandl components: Documentation messages: 66103 nosy: georg.brandl, mrm severity: normal status: open title: example code does not work type: behavior versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 21:08:05 2008 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 02 May 2008 19:08:05 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: Message-ID: Guido van Rossum added the comment: See also comments published on the code review site: http://codereview.appspot.com/602 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 21:30:13 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 02 May 2008 19:30:13 +0000 Subject: [issue2741] documentation -- do serversockets work with ipv6 In-Reply-To: <1209754393.92.0.50120862505.issue2741@psf.upfronthosting.co.za> Message-ID: <1209756613.83.0.0456310288853.issue2741@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I fail to see the issue. There are many other address families supported as well, such as AF_BLUETOOTH, AF_PACKET, AF_TIPC, and AF_NETLINK, depending on the system. The documentation just lists some examples. ---------- nosy: +loewis __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 21:32:08 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 02 May 2008 19:32:08 +0000 Subject: [issue2742] example code does not work In-Reply-To: <1209754679.55.0.840137197769.issue2742@psf.upfronthosting.co.za> Message-ID: <1209756728.25.0.570705954655.issue2742@psf.upfronthosting.co.za> Martin v. L?wis added the comment: What operating system are you using? It could be a bug in the operating system as well. ---------- nosy: +loewis __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 21:50:08 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 02 May 2008 19:50:08 +0000 Subject: [issue2573] Can't change the framework name on OS X builds In-Reply-To: <1207597645.11.0.369783030372.issue2573@psf.upfronthosting.co.za> Message-ID: <1209757808.31.0.0274440073978.issue2573@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This functionality is enabled as of revision 62644 The actual patch is slightly more involved than the attached patches, the patch forgot to add a variable to Mac/Makefile.in and doesn't patch Mac/IDLE/Makefile.in at all. I've also made the Info.plist inside applications and the framework dynamic (that is, patched by configure), that way the Python version is automaticly patched into these files. Furthermore the framework identifier is changed when you use the --with- framework-name argument to configure. There is one minor open issue with this patch, which I won't fix: site.py adds ~/Library/Python/... to sys.path, but only if "Python.framework" is in sys.prefix. That code won't trigger when building a framework with another name (such as --with-framework- name=Stackless). I don't think that can be fixed without modifying site.py during configure or installation. (see site.py, line 199) ---------- resolution: -> fixed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 22:27:29 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 02 May 2008 20:27:29 +0000 Subject: [issue2573] Can't change the framework name on OS X builds In-Reply-To: <1207597645.11.0.369783030372.issue2573@psf.upfronthosting.co.za> Message-ID: <1209760049.11.0.328320679365.issue2573@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 22:27:38 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 02 May 2008 20:27:38 +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: <1209760058.73.0.409151437255.issue2507@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A new patch with just an updated comment in ceval.c. Added file: http://bugs.python.org/file10171/exc_cleanup3.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 22:56:57 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 02 May 2008 20:56:57 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> Message-ID: <1209761817.33.0.627938830031.issue2735@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Attaching a new patch from reviews. __len__ has been removed. I'll post it to Guido's Codereview tool when it's active (I'm getting 500 server errors when I try to upload.) Added file: http://bugs.python.org/file10172/range_lean_and_mean3.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 23:07:50 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 May 2008 21:07:50 +0000 Subject: [issue2695] Ignore case when checking algorithm in urllib2 In-Reply-To: <1209199638.72.0.800736981101.issue2695@psf.upfronthosting.co.za> Message-ID: <1209762470.29.0.809003369504.issue2695@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What module is this in that you want to change? Note 1: hashlib checks upper and lower case versions of names. So this seems like reasonable request. Note 2: I would start hashlib.__get_builtin_constructor(name): with 'name = name.lower()' and replace first two 'name in' constructions with 'name ==' and shrink 2nd two lists. Note 3. I would do same with get_algorithm_impls(): algorithm = algorithm.lower() Instead of possibly calling .lower twice. ---------- nosy: +tjreedy __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 23:11:10 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 02 May 2008 21:11:10 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> Message-ID: <1209762670.87.0.966937294756.issue2735@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Are you sure you want to remove len of range? It breaks quite a few tests. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 23:15:33 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 02 May 2008 21:15:33 +0000 Subject: [issue2349] Py3K warn against assigning to True/False In-Reply-To: <1205781558.49.0.8223061173.issue2349@psf.upfronthosting.co.za> Message-ID: <1209762933.17.0.149796201069.issue2349@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- dependencies: +make compiling struct be passed around to all ast helpers __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 23:26:49 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 02 May 2008 21:26:49 +0000 Subject: [issue2743] Fix module output for warnings from the interpreter In-Reply-To: <1209763609.26.0.692932361871.issue2743@psf.upfronthosting.co.za> Message-ID: <1209763609.26.0.692932361871.issue2743@psf.upfronthosting.co.za> New submission from Brett Cannon : In svn, the module name is lost if you raise an exception at the interpreter:: >>> import warnings >>> warnings.warn("foo") :1: UserWarning: foo It should be:: >>> import warnings >>> warnings.warn("foo") __main__:1: UserWarning: foo Notice how '__main__' is missing in svn. ---------- assignee: brett.cannon components: Interpreter Core messages: 66112 nosy: brett.cannon priority: critical severity: normal status: open title: Fix module output for warnings from the interpreter type: behavior versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 23:32:22 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 May 2008 21:32:22 +0000 Subject: [issue2695] Ignore case when checking algorithm in urllib2 In-Reply-To: <1209199638.72.0.800736981101.issue2695@psf.upfronthosting.co.za> Message-ID: <1209763942.18.0.664453533159.issue2695@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Whoops, just checked the title. Function is about 2/3rds down in urllib2. comments still apply Note 4: I consider 'name = lambda ...' inferior to 'def name...' but I am not the one who will edit this. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 23:34:32 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 May 2008 21:34:32 +0000 Subject: [issue2695] Ignore case when checking algorithm in urllib2 In-Reply-To: <1209199638.72.0.800736981101.issue2695@psf.upfronthosting.co.za> Message-ID: <1209764072.26.0.57666894301.issue2695@psf.upfronthosting.co.za> Changes by Terry J. Reedy : __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 23:34:40 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 May 2008 21:34:40 +0000 Subject: [issue2695] Ignore case when checking algorithm in urllib2 In-Reply-To: <1209199638.72.0.800736981101.issue2695@psf.upfronthosting.co.za> Message-ID: <1209764080.06.0.997328533298.issue2695@psf.upfronthosting.co.za> Changes by Terry J. Reedy : __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 23:37:48 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 May 2008 21:37:48 +0000 Subject: [issue2695] Ignore case when checking algorithm in urllib2 In-Reply-To: <1209199638.72.0.800736981101.issue2695@psf.upfronthosting.co.za> Message-ID: <1209764268.04.0.544874980466.issue2695@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Function is about 2/3rds down in urllib2. Note 1: hashlib checks upper and lower case versions of names. So this seems like reasonable request. Note 2: I would start hashlib.__get_builtin_constructor(name): with 'name = name.lower()' and replace first two 'name in' constructions with 'name ==' and shrink 2nd two lists. Note 3. I would do same with get_algorithm_impls(): algorithm = algorithm.lower() Instead of possibly calling .lower twice. Note 4: I consider 'name = lambda ...' inferior to 'def name...' but I am not the one who will edit this. Keyword says patch, but I do not see one. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 23:44:07 2008 From: report at bugs.python.org (david reid) Date: Fri, 02 May 2008 21:44:07 +0000 Subject: [issue2695] Ignore case when checking algorithm in urllib2 In-Reply-To: <1209199638.72.0.800736981101.issue2695@psf.upfronthosting.co.za> Message-ID: <1209764647.64.0.595632247185.issue2695@psf.upfronthosting.co.za> david reid added the comment: The patch is inline. There's not much to it :-) Agree with your suggestion to avoid calling lower() twice. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 23:47:46 2008 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 02 May 2008 21:47:46 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> Message-ID: <1209764866.17.0.0804806563092.issue2735@psf.upfronthosting.co.za> Guido van Rossum added the comment: Show me which tests break and I'll decide. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 23:49:27 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 02 May 2008 21:49:27 +0000 Subject: [issue1905] PythonLauncher not working correctly on OS X 10.5/Leopad In-Reply-To: <1201012501.41.0.744457037048.issue1905@psf.upfronthosting.co.za> Message-ID: <1209764967.19.0.537861826001.issue1905@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Python Launcher assumes that Terminal.app has a specific creator code, that's no longer true in Leopard. The code in doscript.m was already rather hackish, I've replaced it by a more modern way to use AppleEvents. I've committed a fix in rev. 62648 (trunk) and 62649 (2.5 branch). A side effect of that patch is that PythonLauncher no longer works on OS X 10.2 or earlier, IMHO supporting that release wouldn't be worth the trouble. ---------- resolution: -> fixed status: open -> pending __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 23:57:22 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 02 May 2008 21:57:22 +0000 Subject: [issue2520] macerrors.py cannot be imported due to non-ascii characters in comments In-Reply-To: <1206976042.0.0.654029091605.issue2520@psf.upfronthosting.co.za> Message-ID: <1209765442.36.0.630861695885.issue2520@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Fixed in revision 62651 (trunk) and 62650 (2.5 branch) The fix doesn't use the attached patch, but explicitly sets a file encoding for this module. ---------- nosy: +ronaldoussoren resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 2 23:58:46 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 May 2008 21:58:46 +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: <1209765526.86.0.0760916870941.issue2704@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I like the two changes: jump to command line and scroll previous command lines without having to search back up through the output. Just don't imitate the Windows terminal too closely with its inability to just select previous output (without Symbol/Edit/Mark). ---------- nosy: +tjreedy __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 00:00:32 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 02 May 2008 22:00:32 +0000 Subject: [issue984242] Support "hybrid" framework/unix style Message-ID: <1209765632.12.0.926931053692.issue984242@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I don't think this issue is relevant at this point in time. Apple now ships a regular framework and furthermore I don't think this build style is useful to have. ---------- nosy: +ronaldoussoren resolution: -> rejected status: open -> closed ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 3 00:01:30 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 02 May 2008 22:01:30 +0000 Subject: [issue1087737] Mac: make frameworkinstall skips docs, scripts Message-ID: <1209765690.71.0.737968198762.issue1087737@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- status: open -> closed _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 3 00:03:55 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 02 May 2008 22:03:55 +0000 Subject: [issue1621111] IDLE crashes on OS X 10.4 when "Preferences" selected Message-ID: <1209765835.69.0.102590166724.issue1621111@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- assignee: ronaldoussoren -> _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 3 00:05:57 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 02 May 2008 22:05:57 +0000 Subject: [issue835790] MacPython builds with DESTROOT need fixup Message-ID: <1209765957.57.0.0417310733631.issue835790@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This is definitly not an issue anymore, the official releases get build with a DESTROOT and don't suffer from this problem. ---------- resolution: -> fixed status: open -> closed ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 3 00:09:52 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 02 May 2008 22:09:52 +0000 Subject: [issue1666952] terminalcommand doesn't work under Darwin Message-ID: <1209766192.28.0.390844697043.issue1666952@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I cannot reproduce this issue with Python 2.5 or 2.6. There was a bug in terminalcommand when running on Leopard, I fixed that earlier tonight. ---------- resolution: -> works for me status: open -> pending _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 3 00:17:53 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 May 2008 22:17:53 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> Message-ID: <1209766673.14.0.993858612164.issue2735@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Does this/will this supercede http://bugs.python.org/issue2690 ? ---------- nosy: +tjreedy __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 00:20:37 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 02 May 2008 22:20:37 +0000 Subject: [issue1770190] platform.mac_ver() returning incorrect patch version Message-ID: <1209766837.83.0.961596784479.issue1770190@psf.upfronthosting.co.za> Ronald Oussoren added the comment: See also http://www.cocoabuilder.com/archive/message/cocoa/2006/11/18/174677 The attached patch should fix this issue. Jack, could you please check if the patch is sane? The patch works on 10.5.2, I haven't checked on 10.4 yet (I'll have to reboot to do that) ---------- keywords: +patch nosy: +ronaldoussoren versions: +Python 2.6 Added file: http://bugs.python.org/file10173/mac-platform.patch _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 3 00:22:56 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 02 May 2008 22:22:56 +0000 Subject: [issue1602133] non-framework built python fails to define environ properly Message-ID: <1209766976.4.0.886258464232.issue1602133@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The patch looks sane, I'm assigning the bug to myself to help me remember that I should take a closer look. ---------- assignee: jackjansen -> ronaldoussoren nosy: +ronaldoussoren _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 3 00:31:12 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 02 May 2008 22:31:12 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> Message-ID: <1209767472.0.0.613252357787.issue2735@psf.upfronthosting.co.za> Benjamin Peterson added the comment: 16 tests failed: test_ctypes test_datetime test_deque test_enumerate test_heapq test_itertools test_list test_mutants test_operator test_pickle test_pickletools test_random test_richcmp test_set test_trace test_userlist __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 00:36:32 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 02 May 2008 22:36:32 +0000 Subject: [issue2158] confusing exception when opening a filename with nonprintable characters In-Reply-To: <1203623685.35.0.327745267074.issue2158@psf.upfronthosting.co.za> Message-ID: <1209767792.24.0.254403476598.issue2158@psf.upfronthosting.co.za> Ronald Oussoren added the comment: AFAIK this is fixed in the trunk, you'll get a message that the filename or mode is incorrect (but not which one). That's the best open() can do because the underlying C API doesn't give enough information to decide which argument is unacceptable. (I'm changing this to the library component instead of the Macintosh one because this was a buglet in the platform-independent stdlib). The trunk was fixed in r61468, that might be a backport candidate, adding gregory.p.smith to the nosy list because he commited that revision. ---------- components: +Library (Lib) -Macintosh nosy: +gregory.p.smith, ronaldoussoren __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 00:38:20 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 02 May 2008 22:38:20 +0000 Subject: [issue778799] scripts destination directory not on default path Message-ID: <1209767900.67.0.149779595475.issue778799@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- resolution: -> wont fix status: open -> closed ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 3 00:46:02 2008 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 02 May 2008 22:46:02 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> Message-ID: <1209768362.53.0.551189728746.issue2735@psf.upfronthosting.co.za> Guido van Rossum added the comment: We need to look at more details why those fail. Perhaps there's one common place where this is used? Did you add __length_hint__ yet? __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 00:56:53 2008 From: report at bugs.python.org (Pedro Werneck) Date: Fri, 02 May 2008 22:56:53 +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: <1209769013.41.0.981568699773.issue2325@psf.upfronthosting.co.za> Pedro Werneck added the comment: In 3.0 it happens with any class. Just the cls argument missing on the call to instancecheck. ---------- keywords: +patch nosy: +werneck Added file: http://bugs.python.org/file10174/issue2325.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 01:11:56 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 02 May 2008 23:11:56 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209768362.53.0.551189728746.issue2735@psf.upfronthosting.co.za> Message-ID: <1afaf6160805021611x5c10b42ao67a16b8e794d0865@mail.gmail.com> Benjamin Peterson added the comment: On Fri, May 2, 2008 at 5:46 PM, Guido van Rossum wrote: > > Guido van Rossum added the comment: > > We need to look at more details why those fail. Perhaps there's one > common place where this is used? Did you add __length_hint__ yet? I added __length_hint__ in the last patch. Many of the failures are the result of failings in seq_tests.py. As test_random points out, you can't pick a random integer from a set. Some of these failures are also the result of removing range slicing. (I'm not proposing we bring that back, though.) Overall though, I think it's more practical to have a length implementation that works in 99.78% cases than not and force people to to convert it to a list first. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 01:15:10 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 02 May 2008 23:15:10 +0000 Subject: [issue2744] Fix test_cProfile In-Reply-To: <1209770110.61.0.304892387875.issue2744@psf.upfronthosting.co.za> Message-ID: <1209770110.61.0.304892387875.issue2744@psf.upfronthosting.co.za> New submission from Benjamin Peterson : test_cProfile has been disabled in Py3k for a while now. It should be fixed before release. ---------- messages: 66131 nosy: benjamin.peterson priority: critical severity: normal status: open title: Fix test_cProfile versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 01:20:49 2008 From: report at bugs.python.org (Pedro Werneck) Date: Fri, 02 May 2008 23:20:49 +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: <1209770449.18.0.779319122356.issue2325@psf.upfronthosting.co.za> Changes by Pedro Werneck : Removed file: http://bugs.python.org/file10174/issue2325.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 01:55:20 2008 From: report at bugs.python.org (Mike MacFaden) Date: Fri, 02 May 2008 23:55:20 +0000 Subject: [issue2742] example code does not work In-Reply-To: <1209756728.25.0.570705954655.issue2742@psf.upfronthosting.co.za> Message-ID: <2570D0A30DB3E7468B5C948495508E9002B33F4B@PA-EXCH01.vmware.com> Mike MacFaden added the comment: Martin v. L?wis wrote: > Martin v. L?wis added the comment: > > What operating system are you using? It could be a bug in the > operating system as well. hi martin, what i've tested so far... freebsd 6.2 - release 12 jan 2007 socket.gaierror: (8, 'hostname nor servname provided, or not known') Red Hat Enterprise Linux Client release 5.1 (Tikanga), gnu/linux 2.6.18-53.el5 socket.gaierror: (-2, 'Name or service not known') mike __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 01:56:50 2008 From: report at bugs.python.org (Mike MacFaden) Date: Fri, 02 May 2008 23:56:50 +0000 Subject: [issue2741] documentation -- do serversockets work with ipv6 In-Reply-To: <1209756613.83.0.0456310288853.issue2741@psf.upfronthosting.co.za> Message-ID: <2570D0A30DB3E7468B5C948495508E9002B33F4C@PA-EXCH01.vmware.com> Mike MacFaden added the comment: Martin v. L?wis wrote: > Martin v. L?wis added the comment: > > I fail to see the issue. There are many other address > families supported as well, such as AF_BLUETOOTH, AF_PACKET, > AF_TIPC, and AF_NETLINK, depending on the system. The > documentation just lists some examples. the way i read the text, i gathered that it might not work with sockets belonging to a subset of address families. thanks, mike __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 02:00:42 2008 From: report at bugs.python.org (Pedro Werneck) Date: Sat, 03 May 2008 00:00:42 +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: <1209772842.57.0.814164492864.issue2325@psf.upfronthosting.co.za> Pedro Werneck added the comment: Seems like that's the wrong usage and the PEP 3119 notices that it's hard to get the right semantics. To use it that way you need to define the methods as a classmethod(). http://www.python.org/dev/peps/pep-3119/#one-trick-ponies __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 02:22:45 2008 From: report at bugs.python.org (Mark Hammond) Date: Sat, 03 May 2008 00:22:45 +0000 Subject: [issue2745] Add support for IsWow64Process In-Reply-To: <1209774164.99.0.662005480368.issue2745@psf.upfronthosting.co.za> Message-ID: <1209774164.99.0.662005480368.issue2745@psf.upfronthosting.co.za> New submission from Mark Hammond : As per a thread on python-dev, I offered to add sys.iswow64process. I'm attaching a patch that does this (including news, docs and tests). I'm adding Martin to the nosy list as he has expressed reservations ("It sounds like clutter of the sys module to me"), so I expect this to be rejected. ---------- assignee: mhammond components: Windows files: iswow64process.patch keywords: patch messages: 66137 nosy: loewis, mhammond severity: normal status: open title: Add support for IsWow64Process type: feature request versions: Python 2.6 Added file: http://bugs.python.org/file10175/iswow64process.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 02:19:27 2008 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 03 May 2008 00:19:27 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> Message-ID: <1209773967.87.0.187703663388.issue2735@psf.upfronthosting.co.za> Guido van Rossum added the comment: Fair enough. Let's keep __len__. Did you upload the patch to the codde review site yet? Hopefully I have time to look at it tonight. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 02:14:02 2008 From: report at bugs.python.org (Mark Hammond) Date: Sat, 03 May 2008 00:14:02 +0000 Subject: [issue2581] Vista UAC/elevation support for bdist_wininst In-Reply-To: <1207622587.48.0.467176827447.issue2581@psf.upfronthosting.co.za> Message-ID: <1209773642.41.0.779323946698.issue2581@psf.upfronthosting.co.za> Mark Hammond added the comment: Checked in as r62636 ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 04:19:00 2008 From: report at bugs.python.org (Pedro Werneck) Date: Sat, 03 May 2008 02:19:00 +0000 Subject: [issue2736] datetime needs and "epoch" method In-Reply-To: <1209675808.9.0.995048704016.issue2736@psf.upfronthosting.co.za> Message-ID: <1209781140.38.0.013960645482.issue2736@psf.upfronthosting.co.za> Pedro Werneck added the comment: That's expected as mktime is just a thin wrapper over libc mktime() and it does not expect microseconds. Changing time.mktime doesn't seems an option, so the best alternative is to implement a method in datetime type. Is there a real demand for C code implementing this to justify it? ---------- nosy: +werneck __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 04:15:16 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 May 2008 02:15:16 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> Message-ID: <1209780915.99.0.875952035213.issue2735@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I brought __len__ back, and tried to fix the tests failing because they were indexing range. I couldn't figure out how to fix test_itertools. (It's on codereview, too). Added file: http://bugs.python.org/file10176/range_lean_and_mean4.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 03:35:00 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 03 May 2008 01:35:00 +0000 Subject: [issue2743] Fix module output for warnings from the interpreter In-Reply-To: <1209763609.26.0.692932361871.issue2743@psf.upfronthosting.co.za> Message-ID: <1209778500.63.0.0855344374306.issue2743@psf.upfronthosting.co.za> Brett Cannon added the comment: So I found the problem. The C implementation of 'warnings' is not handling the case where the module that triggered the exception does not define __file__, __name__ == '__main__', and sys.argv[0] is a false value in the same way as the Python implementation. Rather obscure to say the least. =) __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 05:21:42 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 03 May 2008 03:21:42 +0000 Subject: [issue2743] Fix module output for warnings from the interpreter In-Reply-To: <1209763609.26.0.692932361871.issue2743@psf.upfronthosting.co.za> Message-ID: <1209784902.08.0.799863365861.issue2743@psf.upfronthosting.co.za> Brett Cannon added the comment: r62656 has the fix. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 08:55:23 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 03 May 2008 06:55:23 +0000 Subject: [issue2741] documentation -- do serversockets work with ipv6 In-Reply-To: <2570D0A30DB3E7468B5C948495508E9002B33F4C@PA-EXCH01.vmware.com> Message-ID: <481C0C57.10906@v.loewis.de> Martin v. L?wis added the comment: > the way i read the text, i gathered that it might not work > with sockets belonging to a subset of address families. I still cannot see anything wrong with that text, but then, English is not my native language. Can you suggest a different formulation? __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 09:07:30 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 03 May 2008 07:07:30 +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: <1209798450.88.0.0477693866193.issue2507@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: critical -> release blocker __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 09:08:08 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 03 May 2008 07:08:08 +0000 Subject: [issue2720] make compiling struct be passed around to all ast helpers In-Reply-To: <1209505325.8.0.542617617713.issue2720@psf.upfronthosting.co.za> Message-ID: <1209798488.45.0.938518264148.issue2720@psf.upfronthosting.co.za> Georg Brandl added the comment: Sure, if it still compiles. :) ---------- assignee: georg.brandl -> benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 09:13:09 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 03 May 2008 07:13:09 +0000 Subject: [issue2158] confusing exception when opening a filename with nonprintable characters In-Reply-To: <1203623685.35.0.327745267074.issue2158@psf.upfronthosting.co.za> Message-ID: <1209798789.63.0.511313225005.issue2158@psf.upfronthosting.co.za> Gregory P. Smith added the comment: backported r61468 to release25-maint in r62659. ---------- assignee: -> gregory.p.smith resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 09:29:25 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 03 May 2008 07:29:25 +0000 Subject: [issue2745] Add support for IsWow64Process In-Reply-To: <1209774164.99.0.662005480368.issue2745@psf.upfronthosting.co.za> Message-ID: <1209799765.2.0.872771484661.issue2745@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think this can be just as well done with (untested, as I don't have access to a Windows system right now) def iswow64(): if platform.getarchitecture()[0] == '64-bit':return False return os.environ["PROCESSOR_ARCHITECTURE"] != "x86" IOW, it's wow64 iff it's a 32-bit Python not running on an x86 machine. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 10:21:07 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 03 May 2008 08:21:07 +0000 Subject: [issue2740] Cmd module doesn't support readline completion on OSX Leopard In-Reply-To: <1209751540.52.0.644222816573.issue2740@psf.upfronthosting.co.za> Message-ID: <1209802867.74.0.843403459688.issue2740@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I don't really agree. Libedit's configuration is different from that of GN U readline. It might be useful to document this issue in the documentation of the readline module (and of rlcompleter). Another alternative would be to add code to the readline module that emulates the GNU syntax when compeling using libedit, but I don't think that's worth the effort. I would be willing to review such a patch though. ---------- nosy: +ronaldoussoren __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 10:31:54 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 03 May 2008 08:31:54 +0000 Subject: [issue2641] setuptools gets site-packages wrong on Mac In-Reply-To: <1208291676.15.0.165300999847.issue2641@psf.upfronthosting.co.za> Message-ID: <1209803514.4.0.517115664075.issue2641@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This is a bug in the mercurial installer. The problem is in the Makefile, not in setup.py. Specially, the makefile calls "python setup.py --prefix=/usr/local". That's not the correct prefix with a framework install on MacOSX. I propose closing this issue because it is not a bug in distutils. BTW. Mercurial seems to work fine otherwise ('hg' and 'hg version' give output, I haven't tried to use it otherwise). ---------- nosy: +ronaldoussoren resolution: -> invalid status: open -> pending __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 10:33:19 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 03 May 2008 08:33:19 +0000 Subject: [issue2663] shutil.copytree glob-style filtering [patch] In-Reply-To: <1208726903.81.0.936252523277.issue2663@psf.upfronthosting.co.za> Message-ID: <1209803599.2.0.438953091935.issue2663@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Right, thanks. I have corrected the doc, and pushed some examples at the bottom of the module documentation. Added file: http://bugs.python.org/file10177/copytree.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 10:33:29 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 03 May 2008 08:33:29 +0000 Subject: [issue2663] shutil.copytree glob-style filtering [patch] In-Reply-To: <1208726903.81.0.936252523277.issue2663@psf.upfronthosting.co.za> Message-ID: <1209803609.53.0.115356199902.issue2663@psf.upfronthosting.co.za> Changes by Tarek Ziad? : Removed file: http://bugs.python.org/file10127/shutil.copytree.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 10:34:51 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 03 May 2008 08:34:51 +0000 Subject: [issue2663] shutil.copytree glob-style filtering [patch] In-Reply-To: <1208726903.81.0.936252523277.issue2663@psf.upfronthosting.co.za> Message-ID: <1209803691.44.0.330413192175.issue2663@psf.upfronthosting.co.za> Changes by Tarek Ziad? : Added file: http://bugs.python.org/file10178/copytree.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 10:34:58 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 03 May 2008 08:34:58 +0000 Subject: [issue2663] shutil.copytree glob-style filtering [patch] In-Reply-To: <1208726903.81.0.936252523277.issue2663@psf.upfronthosting.co.za> Message-ID: <1209803698.96.0.0795848396244.issue2663@psf.upfronthosting.co.za> Changes by Tarek Ziad? : Removed file: http://bugs.python.org/file10177/copytree.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 10:36:45 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 03 May 2008 08:36:45 +0000 Subject: [issue2715] Remove carbon-specific code from binhex In-Reply-To: <1209427687.82.0.257836139376.issue2715@psf.upfronthosting.co.za> Message-ID: <1209803805.04.0.0401323450313.issue2715@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Have you read that code? The Carbon-specific code in there is needed to make the module behave correctly in OSX: the Carbon specific code is used to get and set some Mac-specific file attributes. It should be easy enough to move that code into a small C extensions though, that way binhex will no longer depent on the Carbon python package. ---------- nosy: +ronaldoussoren __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 10:38:09 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 03 May 2008 08:38:09 +0000 Subject: [issue2663] shutil.copytree glob-style filtering [patch] In-Reply-To: <1208726903.81.0.936252523277.issue2663@psf.upfronthosting.co.za> Message-ID: <1209803889.23.0.599141424953.issue2663@psf.upfronthosting.co.za> Changes by Tarek Ziad? : Added file: http://bugs.python.org/file10179/copytree.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 10:38:15 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 03 May 2008 08:38:15 +0000 Subject: [issue2663] shutil.copytree glob-style filtering [patch] In-Reply-To: <1208726903.81.0.936252523277.issue2663@psf.upfronthosting.co.za> Message-ID: <1209803895.32.0.659672623782.issue2663@psf.upfronthosting.co.za> Changes by Tarek Ziad? : Removed file: http://bugs.python.org/file10178/copytree.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 10:50:07 2008 From: report at bugs.python.org (=?utf-8?q?Gerhard_H=C3=A4ring?=) Date: Sat, 03 May 2008 08:50:07 +0000 Subject: [issue2441] Mac build_install.py script fetches unavailable SQLite version In-Reply-To: <1206052647.34.0.885320572694.issue2441@psf.upfronthosting.co.za> Message-ID: <1209804607.28.0.409237410502.issue2441@psf.upfronthosting.co.za> Gerhard H?ring added the comment: Glyph, do you know somebody with a Mac who could verify this patch? Perhaps you have a Mac yourself? :-) I'd suggest to update the patch to the latest SQLite version then while at it (3.5.8 currently). ---------- assignee: ghaering -> glyph nosy: +glyph priority: -> normal __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 11:28:06 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 03 May 2008 09:28:06 +0000 Subject: [issue1724366] cPickle module doesn't work with universal line endings Message-ID: <1209806886.48.0.638102196971.issue1724366@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- assignee: jackjansen -> _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 3 11:36:04 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 03 May 2008 09:36:04 +0000 Subject: [issue995019] Ensure -single_module on Mac OS X Message-ID: <1209807364.12.0.513485976507.issue995019@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Closing as this doesn't seem really useful anyway and nobody responded to my question if the issue is still relevant. ---------- resolution: -> wont fix status: open -> closed ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 3 17:35:35 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 May 2008 15:35:35 +0000 Subject: [issue2486] Consider using bytes type instead of str to store Decimal coefficients In-Reply-To: <1206480975.35.0.923616350386.issue2486@psf.upfronthosting.co.za> Message-ID: <1209828935.3.0.590451343443.issue2486@psf.upfronthosting.co.za> Mark Dickinson added the comment: I've made some progress here: I have a version of decimal.py for Python 3.0 that uses a Deccoeff instead of a string for the Decimal coefficient. It still needs a little work to make things efficient, but it already passes all the tests in test_decimal. There are no API changes. What's a Deccoeff? Read on, and/or see attached file. Deccoeff (for *Dec*imal *coeff*icient) is an extension type for Python 3.0 that combines some of the most useful aspects of both the integer and string types. First, you can do arithmetic directly with Deccoeff instances: >>> from deccoeff import Deccoeff >>> x = Deccoeff('7') >>> y = Deccoeff('11') >>> x + y Deccoeff('18') >>> x * y Deccoeff('77') >>> y - x Deccoeff('4') >>> x < y True Only nonnegative integers can be represented as Deccoeff instances, since that's all that's needed for Decimal: a subtraction that would produce a negative result instead raises OverflowError: >>> x-y Traceback (most recent call last): File "", line 1, in OverflowError: difference is negative and cannot be represented as a Deccoeff Powering also works: >>> x ** y Deccoeff('1977326743') >>> y ** x Deccoeff('19487171') So much for arithmetic: a Deccoeff instance can also be treated as a sequence: it can be sliced (though the 'step' argument is not supported): >>> x = Deccoeff('123456789') >>> x[2:] Deccoeff('1234567') >>> x[:5] Deccoeff('56789') and indexed: >>> x[3] Deccoeff('6') The length gives the total number of digits: >>> len(x) 9 Note that the indices work in the opposite direction to the one you might expect by looking at the string representation of a Deccoeff: indexing is set up so that index 0 refers to the units digit, 1 to the tens digit, 2 to the hundreds digit, etc. Negative indices also make sense (but not in the usual Python sense of counting from the end of the object): you should imagine the Deccoeff as a finite string of digits padded with zeros infinitely on both the left and right. Then it makes sense to do, for example: >>> x[-2:] Deccoeff('12345678900') >>> x[-3:4] Deccoeff('6789000') This provides a convenient way to do a 'decimal shift left'. There are many places in Decimal where it's appropriate to use x[n:] without knowing in advance whether n is positive or negative. This is a work in progress... Comments very welcome. Added file: http://bugs.python.org/file10180/deccoeff.c __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 17:58:47 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 May 2008 15:58:47 +0000 Subject: [issue2720] make compiling struct be passed around to all ast helpers In-Reply-To: <1209505325.8.0.542617617713.issue2720@psf.upfronthosting.co.za> Message-ID: <1209830327.6.0.921336149608.issue2720@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Done in r62663. ---------- resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 12:22:28 2008 From: report at bugs.python.org (Torsten Bronger) Date: Sat, 03 May 2008 10:22:28 +0000 Subject: [issue2504] Add gettext.pgettext() and variants support In-Reply-To: <1206756624.13.0.664664048525.issue2504@psf.upfronthosting.co.za> Message-ID: <1209810148.87.0.808110575671.issue2504@psf.upfronthosting.co.za> Changes by Torsten Bronger : ---------- nosy: +bronger __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 17:12:26 2008 From: report at bugs.python.org (Dave Hughes) Date: Sat, 03 May 2008 15:12:26 +0000 Subject: [issue2746] ElementTree ProcessingInstruction uses character entities in content In-Reply-To: <1209827546.16.0.534568490293.issue2746@psf.upfronthosting.co.za> Message-ID: <1209827546.16.0.534568490293.issue2746@psf.upfronthosting.co.za> New submission from Dave Hughes : In the ElementTree and cElementTree implementations in Python 2.5 (and possibly Python 2.6 as I also found this issue when testing an SVN checkout of ElementTree 1.3), the conversion of a ProcessingInstruction to a string converts XML reserved characters (<, >, &) to character entities: >>> from xml.etree.ElementTree import * >>> tostring(ProcessingInstruction('test', '')) '' >>> from xml.etree.cElementTree import * >>> tostring(ProcessingInstruction('test', '')) '' The XML 1.0 spec is rather vague on whether character entities are permitted in PIs (it explicitly states parameter entities are not parsed in PIs, but says nothing about parsing character entities). However, it does have this to say in section 2.4 "Character Data and Markup": "The ampersand character (&) and the left angle bracket (<) MUST NOT appear in their literal form, except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section." So, XML reserved chars don't need converting in PIs (the only string not permitted in a PI's content according to the spec, section 2.6, is '?>'), which sort of implies that they shouldn't be. As for practical reasons why they shouldn't be: Breaks generated PHP: >>> from xml.etree.cElementTree import * >>> doc = Element('html') >>> SubElement(doc, 'head') >>> SubElement(doc, 'body') >>> doc[1].append(ProcessingInstruction('php', 'if (2 < 1) print "

Something has gone horribly wrong!

";')) >>> tostring(doc) '' Different from xml.dom: >>> from xml.dom.minidom import * >>> i = getDOMImplementation() >>> doc = i.createDocument(None, 'html', None) >>> doc.documentElement.appendChild(doc.createElement('head')) >>> doc.documentElement.appendChild(doc.createElement('body')) >>> doc.documentElement.lastChild.appendChild(doc.createProcessingInstruction('test', '')) >>> doc.toxml() '\n?>' Different from lxml: >>> from lxml.etree import * >>> tostring(ProcessingInstruction('test', '')) '?>' I suspect the only change necessary to fix this is to replace the _escape_cdata() call for ProcessingInstruction (and possibly Comment too given the spec quote above) in ElementTree._write() with an _encode() call, as shown in this patch (which includes the Comment change as well): Index: elementtree/ElementTree.py =================================================================== --- elementtree/ElementTree.py (revision 511) +++ elementtree/ElementTree.py (working copy) @@ -663,9 +663,9 @@ # write XML to file tag = node.tag if tag is Comment: - file.write("" % _escape_cdata(node.text, encoding)) + file.write("" % _encode(node.text, encoding)) elif tag is ProcessingInstruction: - file.write("" % _escape_cdata(node.text, encoding)) + file.write("" % _encode(node.text, encoding)) else: items = node.items() xmlns_items = [] # new namespaces in this scope Sorry I haven't got a similar patch for cElementTree. I've had a quick look through the source, but haven't yet figured out where the change should be made (unless it's not required - does cElementTree reuse that bit of ElementTree?). ---------- components: XML messages: 66154 nosy: waveform severity: normal status: open title: ElementTree ProcessingInstruction uses character entities in content type: behavior versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 18:59:22 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 May 2008 16:59:22 +0000 Subject: [issue2349] Py3K warn against assigning to True/False In-Reply-To: <1205781558.49.0.8223061173.issue2349@psf.upfronthosting.co.za> Message-ID: <1209833962.48.0.238299188575.issue2349@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Okay, now that #2720 was dealt with, here's another (close to final) patch. I added an ast_warn help function. When -Werror is used, the warnings are converted to SyntaxErrors. Raymond or Brett, if you could take a look, that would be great. Thanks! Added file: http://bugs.python.org/file10181/bool_assign5.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 13:35:50 2008 From: report at bugs.python.org (Ruben Kerkhof) Date: Sat, 03 May 2008 11:35:50 +0000 Subject: [issue2740] Cmd module doesn't support readline completion on OSX Leopard In-Reply-To: <1209751540.52.0.644222816573.issue2740@psf.upfronthosting.co.za> Message-ID: <1209814550.23.0.906049351637.issue2740@psf.upfronthosting.co.za> Ruben Kerkhof added the comment: Documenting this would be great, since it caught me by surprise and took a while to figure out. To get the Cmd module to work, atm you have to override the call to parse_and_bind, setting self.completekey isn't enough, so that one is broken on Leopard. Patching the readline module is indeed a lot of work, you need to convert readline names like 'Tab' to integers to pass them to libedit, and convert the syntax as well. It would be better if libedit would just accept readline syntax, but that's outside the scope of Python. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 19:18:54 2008 From: report at bugs.python.org (Ali Afshar) Date: Sat, 03 May 2008 17:18:54 +0000 Subject: [issue2747] Documentation of new gobject types fails In-Reply-To: <1209835134.72.0.0778910402245.issue2747@psf.upfronthosting.co.za> Message-ID: <1209835134.72.0.0778910402245.issue2747@psf.upfronthosting.co.za> New submission from Ali Afshar : When using the automodule directive on a module that creates new Gobject types (eg custom PyGTK widget), the implicit registration of the imported types fail. (Normally any GObject subclass which has a __gtype_name__ attribute is automatically registered as a new GType using a metaclass. I have had a dig around some of the code of gobject, and pygobject, but not really any help to me. http://svn.gnome.org/viewvc/pygobject/trunk/gobject/gobjectmodule.c?revision=777&view=markup http://svn.gnome.org/viewvc/glib/trunk/gobject/gtype.c?revision=6454&view=markup If anyone wants a quick look. The directive I am using is: .. automodule:: pygtkdock :members: I have also attached the exception I am getting. ---------- assignee: georg.brandl components: Documentation tools (Sphinx) files: sphinx-err-FK4s9A.log messages: 66158 nosy: aafshar, georg.brandl severity: normal status: open title: Documentation of new gobject types fails type: crash versions: Python 2.5 Added file: http://bugs.python.org/file10182/sphinx-err-FK4s9A.log __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 19:20:33 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 May 2008 17:20:33 +0000 Subject: [issue2735] range: lean and mean In-Reply-To: <1209674937.13.0.531177729301.issue2735@psf.upfronthosting.co.za> Message-ID: <1209835233.79.0.890905360525.issue2735@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Address more concerns with attached patch. Added file: http://bugs.python.org/file10183/range_lean_and_mean5.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 19:49:59 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 03 May 2008 17:49:59 +0000 Subject: [issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString. In-Reply-To: <1201473895.18.0.771876708371.issue1950@psf.upfronthosting.co.za> Message-ID: <1209836999.53.0.118064382099.issue1950@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Alexander Belopolsky wrote: > The patch looks good. Just a question: I thought the strings returned > by PyUnicode_AsStringAndSize are 0-terminated, while your patch at > several places attempts to explicitly 0-terminate a copy of such string. > Are you sure this is necessary? I wasn't sure if the strings returned by PyUnicode_AsStringAndSize were 0-terminated, so I didn't take any chance and explicitly terminated them. But I just verified myself and they are indeed 0-terminated. So, I modified the patch in consequence. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 19:56:23 2008 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 03 May 2008 17:56:23 +0000 Subject: [issue2486] Decimal slowdown in 3.0 due to str/unicode changes In-Reply-To: <1206480975.35.0.923616350386.issue2486@psf.upfronthosting.co.za> Message-ID: <1209837383.68.0.677533627533.issue2486@psf.upfronthosting.co.za> Nick Coghlan added the comment: (I changed the issue title to better reflect where the discussion has moved to) I really like the approach of a custom internal type for the mantissa storage (the module containing would probably best be called _decimal). Then it should be possible to focus on letting C do what it does best (high speed arithmetic) and Python do what it does best (provide the nice API and context management features) ---------- title: Consider using bytes type instead of str to store Decimal coefficients -> Decimal slowdown in 3.0 due to str/unicode changes __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 19:58:35 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 03 May 2008 17:58:35 +0000 Subject: [issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString. In-Reply-To: <1201473895.18.0.771876708371.issue1950@psf.upfronthosting.co.za> Message-ID: <1209837515.65.0.865282921585.issue1950@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Marc-Andre Lemburg wrote: [SNIP] > The above cast needs to be (Py_ssize_t). size_t is an unsigned length type. Actually, the cast is right (even though it is not strictly necessary). It just the patch that is confusing. Here is the relevant code: /* Normal module, so work out the package name if any */ char *start = PyUnicode_AsString(modname); char *lastdot = strrchr(start, '.'); size_t len; int error; /* snip */ len = (size_t)(lastdot - start); if (len >= MAXPATHLEN) { PyErr_SetString(PyExc_ValueError, "Module name too long"); return NULL; } I removed the cast from the patch (I don't know why I added it, anyway) to avoid further confusion. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 20:25:31 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 03 May 2008 18:25:31 +0000 Subject: [issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString. In-Reply-To: <1201473895.18.0.771876708371.issue1950@psf.upfronthosting.co.za> Message-ID: <1209839131.43.0.513585138036.issue1950@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Committed to r62667. Thank you all for your comments! ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 21:10:52 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 May 2008 19:10:52 +0000 Subject: [issue2748] ceil(), floor() and round() broken in Decimal In-Reply-To: <1209841852.4.0.852706642988.issue2748@psf.upfronthosting.co.za> Message-ID: <1209841852.4.0.852706642988.issue2748@psf.upfronthosting.co.za> New submission from Mark Dickinson : In Python 3.0, the Decimal __round__, __ceil__ and __floor__ functions don't work as intended: they all return 1, 0, or -1. This is easy to fix. The only reason I'm making an issue (literally) of it is that I remember some discussion of whether these functions should be implemented at all for Decimal, but I don't remember what the outcome of that discussion was. Adding Jeffrey to the nosy list in case he remembers. Either all three functions should be removed, or they should be corrected and tests should be added for them. ---------- assignee: facundobatista components: Library (Lib) messages: 66164 nosy: facundobatista, jyasskin, marketdickinson severity: normal status: open title: ceil(), floor() and round() broken in Decimal versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 21:29:00 2008 From: report at bugs.python.org (Jeffrey Yasskin) Date: Sat, 03 May 2008 19:29:00 +0000 Subject: [issue2748] ceil(), floor() and round() broken in Decimal In-Reply-To: <1209841852.4.0.852706642988.issue2748@psf.upfronthosting.co.za> Message-ID: <1209842940.67.0.468377587809.issue2748@psf.upfronthosting.co.za> Jeffrey Yasskin added the comment: I remember the answer being that they shouldn't be supported, but then I stopped paying attention and some patches went in bringing Decimal closer to the Real API again, so I'm not sure if the earlier discussion still applies. I'm happy to let the decimal maintainers decide. ---------- nosy: +rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 21:46:58 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 03 May 2008 19:46:58 +0000 Subject: [issue2715] Remove carbon-specific code from binhex In-Reply-To: <1209803805.04.0.0401323450313.issue2715@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Sat, May 3, 2008 at 1:36 AM, Ronald Oussoren wrote: > > Ronald Oussoren added the comment: > > Have you read that code? Not in detail, no. > The Carbon-specific code in there is needed to > make the module behave correctly in OSX: the Carbon specific code is used > to get and set some Mac-specific file attributes. > > It should be easy enough to move that code into a small C extensions > though, that way binhex will no longer depent on the Carbon python > package. OK. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 21:53:28 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 03 May 2008 19:53:28 +0000 Subject: =?utf-8?q?[issue1950]_Potential_overflows_due_to_incorrect_usage_of=09PyUnicode=5FAsString.?= In-Reply-To: <1209839131.43.0.513585138036.issue1950@psf.upfronthosting.co.za> Message-ID: <481CC2B2.8090800@egenix.com> Marc-Andre Lemburg added the comment: On 2008-05-03 20:25, Alexandre Vassalotti wrote: > Alexandre Vassalotti added the comment: > > Committed to r62667. > > Thank you all for your comments! > > ---------- > resolution: -> fixed > status: open -> closed What about my comments regarding the PyUnicode_AsString() API in http://bugs.python.org/msg65962 Should I open a separate tracker item for this ? I don't know who added those APIs, but they are neither in line with the rest of the Unicode API, nor are they really all that helpful. I guess they were just added out of a misunderstanding of the already existing code. I'd suggest to remove PyUnicode_AsString() altogether (which your patch has already done in a couple of places). ---------- title: Potential overflows due to incorrect usage of PyUnicode_AsString. -> Potential overflows due to incorrect usage of PyUnicode_AsString. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 22:01:52 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 03 May 2008 20:01:52 +0000 Subject: [issue2744] Fix test_cProfile In-Reply-To: <1209770110.61.0.304892387875.issue2744@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: A key thing to realize is that test_cprofile has heavily changed in 2.6 compared to what is currently disabled in 3.0. ---------- nosy: +brett.cannon __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 22:02:43 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 03 May 2008 20:02:43 +0000 Subject: [issue2748] ceil(), floor() and round() broken in Decimal In-Reply-To: <1209841852.4.0.852706642988.issue2748@psf.upfronthosting.co.za> Message-ID: <1209844963.02.0.243951524448.issue2748@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: facundobatista -> rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 22:04:24 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 May 2008 20:04:24 +0000 Subject: [issue2748] ceil(), floor() and round() broken in Decimal In-Reply-To: <1209841852.4.0.852706642988.issue2748@psf.upfronthosting.co.za> Message-ID: <1209845064.59.0.672179618085.issue2748@psf.upfronthosting.co.za> Mark Dickinson added the comment: I've removed __round__, __ceil__ and __floor__ in r62669; the code was undocumented, untested and just plain wrong, so there doesn't seem to be any point in leaving it in. (I'm not quite sure how it got there in the first place.) This still leaves the question of whether to implement these functions. I can provide a patch if it's desirable. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 22:13:56 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 03 May 2008 20:13:56 +0000 Subject: [issue2748] ceil(), floor() and round() broken in Decimal In-Reply-To: <1209841852.4.0.852706642988.issue2748@psf.upfronthosting.co.za> Message-ID: <1209845636.94.0.407429225895.issue2748@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks Mark. I'll review your patch when it's ready. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 22:32:58 2008 From: report at bugs.python.org (Roger Serwy) Date: Sat, 03 May 2008 20:32:58 +0000 Subject: [issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface In-Reply-To: <1209765526.86.0.0760916870941.issue2704@psf.upfronthosting.co.za> Message-ID: <481CCBF2.2020405@gmail.com> Roger Serwy added the comment: Hi Terry, The patch allows you to select previous output if your cursor leaves the command line area. Press the left arrow button at a new command line does this. Thank you for your feedback! - RDS Terry J. Reedy wrote: > Terry J. Reedy added the comment: > > I like the two changes: jump to command line and scroll previous command > lines without having to search back up through the output. Just don't > imitate the Windows terminal too closely with its inability to just > select previous output (without Symbol/Edit/Mark). > > ---------- > nosy: +tjreedy > > __________________________________ > Tracker > > __________________________________ > > __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 22:45:56 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 03 May 2008 20:45:56 +0000 Subject: [issue2749] Raise a DeprecationWarning for warnings.showwarning(.., line) In-Reply-To: <1209847556.68.0.658997115031.issue2749@psf.upfronthosting.co.za> Message-ID: <1209847556.68.0.658997115031.issue2749@psf.upfronthosting.co.za> New submission from Brett Cannon : In order to move the warnings.showwarning() API forward to support the new 'line' argument, a DeprecationWarning is needed for implementations that lack support for it. >From the Python side a simple check for the 'line' argument using 'inspect' will work. For the C side, a check that there is more than 1 default argument should suffice, although a quick check of what other ways to introspect Python function objects from C code should be done first before settling on this solution. ---------- assignee: brett.cannon components: Interpreter Core keywords: easy messages: 66172 nosy: brett.cannon priority: critical severity: normal status: open title: Raise a DeprecationWarning for warnings.showwarning(.., line) type: behavior versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 23:02:37 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 May 2008 21:02:37 +0000 Subject: [issue2582] Unpickling of range objects fail in Py3k In-Reply-To: <1207658342.58.0.573226897239.issue2582@psf.upfronthosting.co.za> Message-ID: <1209848557.86.0.41979028313.issue2582@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: -> critical __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 23:11:08 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 May 2008 21:11:08 +0000 Subject: [issue2749] Raise a DeprecationWarning for warnings.showwarning(.., line) In-Reply-To: <1209847556.68.0.658997115031.issue2749@psf.upfronthosting.co.za> Message-ID: <1209849068.59.0.196939208578.issue2749@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Brett, can you list the places showwarning is used? ---------- nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 23:26:39 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 03 May 2008 21:26:39 +0000 Subject: [issue2749] Raise a DeprecationWarning for warnings.showwarning(.., line) In-Reply-To: <1209849068.59.0.196939208578.issue2749@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Sat, May 3, 2008 at 2:11 PM, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > Brett, can you list the places showwarning is used? > Lib/warnings.py and Python/_warnings.c. In both cases just search for "showwarning"; there is only a single call site in both files. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 23:35:01 2008 From: report at bugs.python.org (Ali Afshar) Date: Sat, 03 May 2008 21:35:01 +0000 Subject: [issue2747] Documentation of new gobject types fails In-Reply-To: <1209835134.72.0.0778910402245.issue2747@psf.upfronthosting.co.za> Message-ID: <1209850501.35.0.126026896725.issue2747@psf.upfronthosting.co.za> Ali Afshar added the comment: I have managed to reduce the bug to a tiuny test case. It seems that this only happens when calling automodule directive on a package, with code in __init__.py which registers a new GType. Moving the code to a a regular module inside a package allows it to be imported normally. I have attached the project directory, and there is a script "build.sh" which just demonstrates how I run the builder to get the PYTHONPATH correct to be able to improt the package. Added file: http://bugs.python.org/file10184/sphinx-bug-test.tar.gz __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 3 23:52:55 2008 From: report at bugs.python.org (Bob Ippolito) Date: Sat, 03 May 2008 21:52:55 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> New submission from Bob Ippolito : Attached is the tarball for simplejson 1.9, the proposed version to be included in the stdlib. Estimated work remaining: * Rename simplejson to json * Build simplejson/_speedups.c from Modules/Setup and Windows projects * Convert documentation to Python docs * Port to Python 3.0 ---------- components: Library (Lib) files: simplejson-1.9.tar.gz messages: 66176 nosy: bob.ippolito severity: normal status: open title: Add simplejson to Python 2.6/3.0 standard library type: feature request versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10185/simplejson-1.9.tar.gz __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 00:01:35 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 May 2008 22:01:35 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209852095.74.0.118503128088.issue2750@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This work might be a good thing to a do on a Bazaar branch. ---------- nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 00:06:24 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 03 May 2008 22:06:24 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209852384.41.0.139594934401.issue2750@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- keywords: +patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 00:07:55 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 03 May 2008 22:07:55 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209852475.67.0.278806854983.issue2750@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- priority: -> critical __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 00:15:05 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 03 May 2008 22:15:05 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209852905.82.0.901193199651.issue2750@psf.upfronthosting.co.za> Brett Cannon added the comment: The most critical steps are to get the code building and to get the tests passing. Once that is working the code can be checked in and the other steps (docs, PEP 7/8, 3.0 conversion) can happen after the fact. ---------- nosy: +brett.cannon __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 00:19:10 2008 From: report at bugs.python.org (Christian Heimes) Date: Sat, 03 May 2008 22:19:10 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209853150.63.0.746239556929.issue2750@psf.upfronthosting.co.za> Christian Heimes added the comment: Yeah, either make a bzr branch or an ordinary svn branch. If you need some help with the C code I can be of assistance. I'm in #python-dev. Let's coordinate the next steps there. ---------- nosy: +tiran __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 00:20:50 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 03 May 2008 22:20:50 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209853150.63.0.746239556929.issue2750@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Sat, May 3, 2008 at 3:19 PM, Christian Heimes wrote: > > Christian Heimes added the comment: > > Yeah, either make a bzr branch or an ordinary svn branch. If you need > some help with the C code I can be of assistance. I'm in #python-dev. > Let's coordinate the next steps there. I am about to create a bzr branch in my personal directory named issue2750-simplejson. __________________________________ Tracker __________________________________ From brett at python.org Sun May 4 00:20:47 2008 From: brett at python.org (Brett Cannon) Date: Sat, 3 May 2008 15:20:47 -0700 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209853150.63.0.746239556929.issue2750@psf.upfronthosting.co.za> References: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> <1209853150.63.0.746239556929.issue2750@psf.upfronthosting.co.za> Message-ID: On Sat, May 3, 2008 at 3:19 PM, Christian Heimes wrote: > > Christian Heimes added the comment: > > Yeah, either make a bzr branch or an ordinary svn branch. If you need > some help with the C code I can be of assistance. I'm in #python-dev. > Let's coordinate the next steps there. I am about to create a bzr branch in my personal directory named issue2750-simplejson. From report at bugs.python.org Sun May 4 00:24:19 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 03 May 2008 22:24:19 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209853459.58.0.200921981007.issue2750@psf.upfronthosting.co.za> Brett Cannon added the comment: Branch is at http://code.python.org/python/users/brett/issue2750- simplejson/ . __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 00:51:21 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 03 May 2008 22:51:21 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209855081.2.0.37170362704.issue2750@psf.upfronthosting.co.za> Brett Cannon added the comment: Just so it is documented, Bob said on IRC that we do not need to keep compatibility with any specific version of Python. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 00:52:04 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 May 2008 22:52:04 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209855124.19.0.31597638151.issue2750@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'll do PEP 8 review. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 01:01:05 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 03 May 2008 23:01:05 +0000 Subject: [issue1563] asyncore and asynchat incompatible with Py3k str and bytes In-Reply-To: <1196967051.24.0.955219786763.issue1563@psf.upfronthosting.co.za> Message-ID: <1209855665.09.0.414926368772.issue1563@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- priority: normal -> critical __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 03:35:26 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 May 2008 01:35:26 +0000 Subject: [issue2748] ceil(), floor() and round() broken in Decimal In-Reply-To: <1209841852.4.0.852706642988.issue2748@psf.upfronthosting.co.za> Message-ID: <1209864926.3.0.708355484024.issue2748@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch that implements __ceil__, __floor__ and __round__. (It seems that just removing __ceil__, __floor__ and __round__ is not an option, as I just discovered when r62669 turned all the buildbots red.) Points to note: (1) Two-argument round has essentially the same semantics as quantize. To be precise, for a Decimal instance x and an int n, round(x, n) is exactly interchangeable with x.quantize(Decimal('1E%s' % -n)) In particular, this means that round uses the rounding mode from the current context (which will usually, but not always, be ROUND_HALF_EVEN), and that an InvalidOperation exception will be raised (or NaN returned) if the rounded value has too many digits for the current context precision. After thinking about it, it seemed better to make the two expressions above identical than to have subtle and potentially confusing differences between them. (2) Decimal.__round__ takes two optional arguments, 'context' and 'rounding', again with exactly the same semantics as the corresponding optional arguments for quantize. At the moment, these arguments aren't considered public, and aren't documented. (And they're only accessible through __round__ anyway, not directly through the round() builtin.) (3) For one-argument round, ceil, and floor, the only real decision to be made is what to do with NaNs and infinities. The spirit of IEEE 754/854/754r suggests that an attempt to turn an infinity into an integer should signal the 'overflow' floating-point exception, while turning a NaN into an integer should signal 'invalid'; correspondingly, the patch raises OverflowError or ValueError respectively in these situations. ---------- keywords: +patch Added file: http://bugs.python.org/file10186/decimal_ceilfloor.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 03:12:33 2008 From: report at bugs.python.org (Bob Ippolito) Date: Sun, 04 May 2008 01:12:33 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209863553.02.0.580389533858.issue2750@psf.upfronthosting.co.za> Bob Ippolito added the comment: The json package is in brett's branch, integrates with the test suite, builds the C extension and passes all tests (at least on OS X and Linux UCS2 and UCS4). Missing the docs and python 3.0 support still, otherwise things look good. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 02:36:18 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 04 May 2008 00:36:18 +0000 Subject: [issue2751] Regression for executing packages In-Reply-To: <1209861378.3.0.693402002548.issue2751@psf.upfronthosting.co.za> Message-ID: <1209861378.3.0.693402002548.issue2751@psf.upfronthosting.co.za> New submission from Benjamin Peterson : If I have a package like this: pack/ __init__.py and __init__.py looks like this if __name__ == "__main__": print "Spam" python -m pack gives one is a package and cannot be directly executed This is regression from 2.5 where "Spam" would be printed. ---------- components: Interpreter Core messages: 66184 nosy: benjamin.peterson priority: critical severity: normal status: open title: Regression for executing packages type: behavior versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 04:15:00 2008 From: report at bugs.python.org (Mark Hammond) Date: Sun, 04 May 2008 02:15:00 +0000 Subject: [issue2745] Add support for IsWow64Process In-Reply-To: <1209774164.99.0.662005480368.issue2745@psf.upfronthosting.co.za> Message-ID: <1209867300.38.0.490377834391.issue2745@psf.upfronthosting.co.za> Mark Hammond added the comment: I'm not sure if that is suggesting MS had no reason to add that API function, or those reasons don't apply to users of Python, but as its clear there is significant resistance I'm rejecting this report. ---------- resolution: -> rejected status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 03:33:29 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 04 May 2008 01:33:29 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209864809.75.0.212302456416.issue2750@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm going to handle the docs, too. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 06:34:27 2008 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 04 May 2008 04:34:27 +0000 Subject: [issue2751] Regression for executing packages In-Reply-To: <1209861378.3.0.693402002548.issue2751@psf.upfronthosting.co.za> Message-ID: <1209875667.56.0.764676566127.issue2751@psf.upfronthosting.co.za> Nick Coghlan added the comment: The ability to execute packages was never intended, since doing so breaks imports in a variety of subtle ways. It was actually a bug in 2.5 that it was permitted at all, so 2.6 not only disabled it again, but also added a test to make sure it stays disabled (2.4 correctly rejected it with an ImportError, just as 2.6 does). Here's the relevant svn log entry: r56509 | nick.coghlan | 2007-07-23 23:41:45 +1000 (Mon, 23 Jul 2007) | 5 lines Correctly cleanup sys.modules after executing runpy relative import tests Restore Python 2.4 ImportError when attempting to execute a package (as imports cannot be guaranteed to work properly if you try it) ---------- resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 02:40:15 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 04 May 2008 00:40:15 +0000 Subject: [issue2751] Regression for executing packages In-Reply-To: <1209861378.3.0.693402002548.issue2751@psf.upfronthosting.co.za> Message-ID: <1209861615.13.0.416319840979.issue2751@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> ncoghlan nosy: +ncoghlan __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 06:53:19 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 04 May 2008 04:53:19 +0000 Subject: [issue2745] Add support for IsWow64Process In-Reply-To: <1209774164.99.0.662005480368.issue2745@psf.upfronthosting.co.za> Message-ID: <1209876799.11.0.270658797535.issue2745@psf.upfronthosting.co.za> Martin v. L?wis added the comment: One reason for IsWow64Process is that it allows to determine the wow-ness of a different process, which is e.g. needed to display the asterisk in the process viewer. This reason indeed doesn't apply to Python, and your patch doesn't expose that functionality. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 07:08:30 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 04 May 2008 05:08:30 +0000 Subject: [issue2752] Wrong comment in socket documentation In-Reply-To: <1209877709.98.0.739134633667.issue2752@psf.upfronthosting.co.za> Message-ID: <1209877709.98.0.739134633667.issue2752@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : In the example section of socket module I see: HOST = '' # Symbolic name meaning the local host PORT = 50007 # Arbitrary non-privileged port '', at least on Windows, is an alias for telling the socket to listen on all available interfaces while 'localhost' is used for referencing the local interface (usually '127.0.0.1'). ---------- assignee: georg.brandl components: Documentation messages: 66191 nosy: georg.brandl, giampaolo.rodola severity: normal status: open title: Wrong comment in socket documentation versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 07:38:37 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 04 May 2008 05:38:37 +0000 Subject: [issue2753] Test issue In-Reply-To: <1209879517.54.0.220389917163.issue2753@psf.upfronthosting.co.za> Message-ID: <1209879517.54.0.220389917163.issue2753@psf.upfronthosting.co.za> New submission from Martin v. L?wis : Testing the integration with the review tool. ---------- files: regrtest.diff keywords: patch messages: 66192 nosy: loewis severity: normal status: open title: Test issue Added file: http://bugs.python.org/file10187/regrtest.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 09:03:10 2008 From: report at bugs.python.org (Brett Cannon) Date: Sun, 04 May 2008 07:03:10 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209884590.68.0.672897595118.issue2750@psf.upfronthosting.co.za> Brett Cannon added the comment: One problem with the way the patch is now is that it will fail on non- CPython interpreters the way it is currently coded. For instance, json/decoder.py completely assumes that importing _json will succeed. Same with the test suite. Will need to tweak the code so that it will run on PyPy, etc., where there is no C extensions. But that does not need to hold up committing the code. If Christian and Benjamin think the code is in good shape we can commit now and fix in svn. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 09:09:23 2008 From: report at bugs.python.org (Bob Ippolito) Date: Sun, 04 May 2008 07:09:23 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209884963.53.0.329031763142.issue2750@psf.upfronthosting.co.za> Bob Ippolito added the comment: It doesn't work on alternate implementations right now anyway, because it (ab)uses some sre APIs that aren't widely implemented outside of cpython. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 09:50:31 2008 From: report at bugs.python.org (Brett Cannon) Date: Sun, 04 May 2008 07:50:31 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209887431.62.0.914931775883.issue2750@psf.upfronthosting.co.za> Brett Cannon added the comment: Ouch. Well then hopefully either they will get implemented or some way to not rely on them can be developed. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 09:51:13 2008 From: report at bugs.python.org (svncodereview) Date: Sun, 04 May 2008 07:51:13 +0000 Subject: [issue2753] Test issue (different spelling) In-Reply-To: <1209879517.54.0.220389917163.issue2753@psf.upfronthosting.co.za> Message-ID: <0016e644cc24ea0187044c62e020@google.com> svncodereview added the comment: Dear report at bugs.python.org, martin at v.loewis.de, New code review comments by mvloewis at gmail.com have been published. Please go to http://codereview.appspot.com/730 to read them. Message: Details: http://codereview.appspot.com/730/diff/1/21 File Lib/test/regrtest.py (right): http://codereview.appspot.com/730/diff/1/21#newcode3 Line 3: """Regression test driver. Comment 6 Issue Description: Sincerely, Your friendly code review daemon (http://codereview.appspot.com/). ---------- nosy: +svncodereview title: Test issue -> Test issue (different spelling) __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 09:54:52 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 04 May 2008 07:54:52 +0000 Subject: [issue2753] Test issue (different spelling) In-Reply-To: <1209879517.54.0.220389917163.issue2753@psf.upfronthosting.co.za> Message-ID: <1209887692.28.0.77172334823.issue2753@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 10:04:59 2008 From: report at bugs.python.org (Bob Ippolito) Date: Sun, 04 May 2008 08:04:59 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209888299.87.0.335559164607.issue2750@psf.upfronthosting.co.za> Bob Ippolito added the comment: it's isolated to json.scanner, if that was re-implemented in more general terms then it wouldn't be dependent on sre anymore. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 11:09:36 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 04 May 2008 09:09:36 +0000 Subject: [issue2656] Autodoc should skip inherited methods In-Reply-To: <1208552563.99.0.233047062632.issue2656@psf.upfronthosting.co.za> Message-ID: <1209892176.0.0.22162431574.issue2656@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks. In SVN (r62695), autodoc now skips inherited members unless the :inherited-members: flag option is given. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 11:15:35 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 04 May 2008 09:15:35 +0000 Subject: [issue2752] Wrong comment in socket documentation In-Reply-To: <1209877709.98.0.739134633667.issue2752@psf.upfronthosting.co.za> Message-ID: <1209892535.76.0.289950719563.issue2752@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r62695. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 11:38:03 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 04 May 2008 09:38:03 +0000 Subject: [issue2726] Autodoc's autoclass directive should include constructor docstring In-Reply-To: <1209564254.38.0.0869277765.issue2726@psf.upfronthosting.co.za> Message-ID: <1209893883.1.0.258821860341.issue2726@psf.upfronthosting.co.za> Georg Brandl added the comment: Okay, I added a config value ("autoclass_content") in r62697. Let me know what you think! ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 13:52:11 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 04 May 2008 11:52:11 +0000 Subject: [issue2748] ceil(), floor() and round() broken in Decimal In-Reply-To: <1209841852.4.0.852706642988.issue2748@psf.upfronthosting.co.za> Message-ID: <1209901931.49.0.367663635072.issue2748@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The patch basically looks good. The signature for __round__() should not grow beyond the spec for the built-in round() function that calls it: round(x[, n]). The context and rounding arguments are not part of that API. Just like __int__(), the __round__() method should stick to its basic purpose. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 14:26:16 2008 From: report at bugs.python.org (Alex Robinson) Date: Sun, 04 May 2008 12:26:16 +0000 Subject: [issue2754] Mac version of IDLE doesn't scroll as expected In-Reply-To: <1209903976.71.0.763172048838.issue2754@psf.upfronthosting.co.za> Message-ID: <1209903976.71.0.763172048838.issue2754@psf.upfronthosting.co.za> New submission from Alex Robinson : On a Mac running 10.5.2 in IDLE 1.2.1, the scroll bars don't move as expected & track pad/mouse scrolling is not enabled. I believe this is also the case on Tiger (10.4) When using the scroll bar to scroll up through code, the scroll bar moves much faster than the mouse pointer. When scrolling down, the mouse pointer moves slightly faster. Unlike Terminal, scrolling using a scroll wheel on a mouse or the two fingers on the trackpad doesn't work with IDLE. I realize these are fairly minor UI issues, but they're still frustrating and slow down my workflow. ---------- components: IDLE, Macintosh messages: 66202 nosy: alextrob severity: normal status: open title: Mac version of IDLE doesn't scroll as expected type: behavior versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 14:45:54 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 May 2008 12:45:54 +0000 Subject: [issue2748] ceil(), floor() and round() broken in Decimal In-Reply-To: <1209841852.4.0.852706642988.issue2748@psf.upfronthosting.co.za> Message-ID: <1209905154.37.0.507163388126.issue2748@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a revised patch, with the following changes - no keyword arguments to round - check that the second argument to round is an integer. Added file: http://bugs.python.org/file10188/decimal_ceilfloor2.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 14:46:40 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 04 May 2008 12:46:40 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209905200.69.0.736463933165.issue2750@psf.upfronthosting.co.za> Benjamin Peterson added the comment: BTW, the regression for not executing packages was intented. See #2751. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 15:03:49 2008 From: report at bugs.python.org (=?utf-8?q?Gerhard_H=C3=A4ring?=) Date: Sun, 04 May 2008 13:03:49 +0000 Subject: [issue2540] If HAVE_LONG_LONG is not defined, longval will not be initialized (_sqlite) In-Reply-To: <1207195232.04.0.450444474106.issue2540@psf.upfronthosting.co.za> Message-ID: <1209906229.88.0.552305946445.issue2540@psf.upfronthosting.co.za> Gerhard H?ring added the comment: SQLite requires 64-bit integers in order to build. So the whole HAVE_LONG_LONG #ifdefing was useless. I've removed it in r62700. ---------- resolution: -> rejected status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 15:15:53 2008 From: report at bugs.python.org (=?utf-8?q?Gerhard_H=C3=A4ring?=) Date: Sun, 04 May 2008 13:15:53 +0000 Subject: [issue2152] make sqlite.Row hashable correctly In-Reply-To: <1203590912.21.0.769567830293.issue2152@psf.upfronthosting.co.za> Message-ID: <1209906953.55.0.766928927662.issue2152@psf.upfronthosting.co.za> Gerhard H?ring added the comment: I applied your second patch in r62701. Thanks again! ---------- resolution: -> accepted __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 15:20:56 2008 From: report at bugs.python.org (Martin McNickle) Date: Sun, 04 May 2008 13:20:56 +0000 Subject: [issue2695] Ignore case when checking algorithm in urllib2 In-Reply-To: <1209199638.72.0.800736981101.issue2695@psf.upfronthosting.co.za> Message-ID: <1209907256.68.0.917754645231.issue2695@psf.upfronthosting.co.za> Martin McNickle added the comment: RFC2617 says that the authentication scheme should be case insensitive. Included is a patch which changes the string to uppercase before comparison. ---------- keywords: +patch nosy: +BitTorment Added file: http://bugs.python.org/file10189/case_insensitive_algorithm.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 15:43:13 2008 From: report at bugs.python.org (=?utf-8?q?Gerhard_H=C3=A4ring?=) Date: Sun, 04 May 2008 13:43:13 +0000 Subject: [issue2157] sqlite numeric type conversion problems In-Reply-To: <1203620223.11.0.994407753132.issue2157@psf.upfronthosting.co.za> Message-ID: <1209908593.04.0.47778479318.issue2157@psf.upfronthosting.co.za> Gerhard H?ring added the comment: Implemented in r62702. ---------- resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 15:54:30 2008 From: report at bugs.python.org (=?utf-8?q?Gerhard_H=C3=A4ring?=) Date: Sun, 04 May 2008 13:54:30 +0000 Subject: [issue2127] sqlite3 docs should mention utf8 requirement In-Reply-To: <1203170928.18.0.391446477108.issue2127@psf.upfronthosting.co.za> Message-ID: <1209909270.33.0.282429694669.issue2127@psf.upfronthosting.co.za> Gerhard H?ring added the comment: The implementation in SVN should in the meatntime behave like you expect now. Look for database_utf8 = PyUnicode_AsUTF8String(database); in connection.c to see the implementation. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 15:55:21 2008 From: report at bugs.python.org (Mark Veldhuis) Date: Sun, 04 May 2008 13:55:21 +0000 Subject: [issue2755] IDLE ignores module change before restart In-Reply-To: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za> Message-ID: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za> New submission from Mark Veldhuis : I changed module A, and then tested module B that imported module A. it took a while to realise that what went wrong was that the change had not registered in module B, even when I closed and reopened the window, the shell etc. I had to quit IDLE and restart before module B imported the changed module A. In the file enclosed is a step by step version that isolates the problem. At the moment I am working through a Python course using IDLE on UBUNTU Hardy, and it could be this is a beginners error and no bug after all. ---------- components: IDLE files: idleupdatebug.odt messages: 66210 nosy: mooz123 severity: normal status: open title: IDLE ignores module change before restart type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10190/idleupdatebug.odt __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 15:57:26 2008 From: report at bugs.python.org (Mark Veldhuis) Date: Sun, 04 May 2008 13:57:26 +0000 Subject: [issue2755] IDLE ignores module change before restart In-Reply-To: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za> Message-ID: <1209909446.68.0.96150268904.issue2755@psf.upfronthosting.co.za> Changes by Mark Veldhuis : Removed file: http://bugs.python.org/file10190/idleupdatebug.odt __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 15:58:23 2008 From: report at bugs.python.org (Mark Veldhuis) Date: Sun, 04 May 2008 13:58:23 +0000 Subject: [issue2755] IDLE ignores module change before restart In-Reply-To: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za> Message-ID: <1209909503.34.0.0433484963086.issue2755@psf.upfronthosting.co.za> Changes by Mark Veldhuis : Added file: http://bugs.python.org/file10191/idleupdatebug.odt __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 16:37:51 2008 From: report at bugs.python.org (Facundo Batista) Date: Sun, 04 May 2008 14:37:51 +0000 Subject: [issue2486] Decimal slowdown in 3.0 due to str/unicode changes In-Reply-To: <1206480975.35.0.923616350386.issue2486@psf.upfronthosting.co.za> Message-ID: <1209911871.11.0.723546687836.issue2486@psf.upfronthosting.co.za> Facundo Batista added the comment: I like this path, also. Beyond Deccoeff, this module could hold in the future other functions that are speed critical. Great work, Mark! __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 17:01:00 2008 From: report at bugs.python.org (david reid) Date: Sun, 04 May 2008 15:01:00 +0000 Subject: [issue2695] Ignore case when checking algorithm in urllib2 In-Reply-To: <1209199638.72.0.800736981101.issue2695@psf.upfronthosting.co.za> Message-ID: <1209913260.57.0.515689841034.issue2695@psf.upfronthosting.co.za> david reid added the comment: Looks like a sensible, simple fix to me :-) __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 17:11:38 2008 From: report at bugs.python.org (david reid) Date: Sun, 04 May 2008 15:11:38 +0000 Subject: [issue2756] urllib2 add_header fails with existing unredirected_header In-Reply-To: <1209913898.38.0.175541514636.issue2756@psf.upfronthosting.co.za> Message-ID: <1209913898.38.0.175541514636.issue2756@psf.upfronthosting.co.za> New submission from david reid : In urllib2 when using reusing a Request calling add_header doesn't work when an unredirected_header has been added. A good example (and the one that caught me out) is content-type. When making a POST request with no content-type set the current code sets the content-type as an unredirected_header to 'application/x-www-form-urlencoded' (line 1034 of urllib2.py) but in a subsequent request, setting the content type via add_header will see this ignored as unredirected_headers are appended after the headers. A possible solution is to check whether the header being added already exists in the requests undredirected_headers and remove it if it does. ---------- components: Library (Lib) messages: 66213 nosy: zathras severity: normal status: open title: urllib2 add_header fails with existing unredirected_header type: behavior versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 17:29:49 2008 From: report at bugs.python.org (Manuel Kaufmann) Date: Sun, 04 May 2008 15:29:49 +0000 Subject: [issue2757] Little error in unittest documentation In-Reply-To: <1209914989.11.0.259264141747.issue2757@psf.upfronthosting.co.za> Message-ID: <1209914989.11.0.259264141747.issue2757@psf.upfronthosting.co.za> New submission from Manuel Kaufmann : I found a more Enter ---------- assignee: georg.brandl components: Documentation files: unittest.diff keywords: patch messages: 66214 nosy: georg.brandl, humitos severity: normal status: open title: Little error in unittest documentation versions: Python 2.6 Added file: http://bugs.python.org/file10192/unittest.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 17:30:09 2008 From: report at bugs.python.org (Bob Ippolito) Date: Sun, 04 May 2008 15:30:09 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209915009.66.0.0468979203808.issue2750@psf.upfronthosting.co.za> Bob Ippolito added the comment: Well, that's unfortunate. I found it very useful __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 17:35:12 2008 From: report at bugs.python.org (atsuo ishimoto) Date: Sun, 04 May 2008 15:35:12 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1209915312.53.0.663707160016.issue2630@psf.upfronthosting.co.za> atsuo ishimoto added the comment: New patch agaist current py3k branch. All the regr tests faild by my patch is now fixed as far as I can run. I also modified a doctest module a bit, so should be reviewed by module owners. Added file: http://bugs.python.org/file10193/diff3.txt __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 17:45:21 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 04 May 2008 15:45:21 +0000 Subject: [issue2757] Little error in unittest documentation In-Reply-To: <1209914989.11.0.259264141747.issue2757@psf.upfronthosting.co.za> Message-ID: <1209915921.93.0.528679222312.issue2757@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r62703. Thanks! ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 19:05:13 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 04 May 2008 17:05:13 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209920713.24.0.524531299818.issue2750@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I've committed the reST docs. Bob, do you want to have a look? __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 19:42:09 2008 From: report at bugs.python.org (=?utf-8?q?Uwe_Kleine-K=C3=B6nig?=) Date: Sun, 04 May 2008 17:42:09 +0000 Subject: [issue2758] arg 2 of PyErr_SetFromErrnoWithFilename should be const In-Reply-To: <1209922929.05.0.442409778711.issue2758@psf.upfronthosting.co.za> Message-ID: <1209922929.05.0.442409778711.issue2758@psf.upfronthosting.co.za> New submission from Uwe Kleine-K?nig : Compiling an extension I get the warning: warning: passing argument 2 of ?PyErr_SetFromErrnoWithFilename? discards qualifiers from pointer target type I passed a const char *, which should be OK from looking at the implementation of PyErr_SetFromErrnoWithFilename. Attached is a patch. I don't expect this to break any API or ABI, but you might know better. ---------- components: Interpreter Core files: make_PyErr_SetFromErrnoWithFilename_filename_const messages: 66220 nosy: ukleinek severity: normal status: open title: arg 2 of PyErr_SetFromErrnoWithFilename should be const type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10194/make_PyErr_SetFromErrnoWithFilename_filename_const __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 19:42:08 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 May 2008 17:42:08 +0000 Subject: [issue2759] Bool makes filter(None,it) redundant; remove None option? In-Reply-To: <1209922927.71.0.76492509118.issue2759@psf.upfronthosting.co.za> Message-ID: <1209922927.71.0.76492509118.issue2759@psf.upfronthosting.co.za> New submission from Terry J. Reedy : Filter() allows None as a stand-in for either the still-nonexistent identity() or the now existent bool(). Removing the now redundant option would slightly simplify the language. It is certainly a glitch for newcomers. Would this option be included if filter were being added now? Fixer: I should think filter(None,it) => filter(bool,it) should be sufficient as I expect filter(f_f_exp, it), where f_f_exp is a filter function expression that sometimes gives None, should be fairly rare. Efficiency: filter() could (if it does not now) avoid calling bool twice internally by checking for bool instead of None). Even if removing None is rejected, filter should also check for bool (if it does not now) to not penalize those who write the obvious filter(bool,it). If this item is rejected, turn it into a doc item for PEP3099. ---------- components: Interpreter Core messages: 66219 nosy: tjreedy severity: normal status: open title: Bool makes filter(None,it) redundant; remove None option? type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 19:56:43 2008 From: report at bugs.python.org (Bob Ippolito) Date: Sun, 04 May 2008 17:56:43 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209923803.24.0.939314809245.issue2750@psf.upfronthosting.co.za> Bob Ippolito added the comment: They look good, but is there an easy way to look at them post-formatting or do I have to install the sphinx toolchain myself? I moved the command-line stuff to json.tool to get around the package problem. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 19:57:29 2008 From: report at bugs.python.org (Thomas Herve) Date: Sun, 04 May 2008 17:57:29 +0000 Subject: [issue2760] Recent change in socket.py breaks urllib2 In-Reply-To: <1209923849.77.0.999973042575.issue2760@psf.upfronthosting.co.za> Message-ID: <1209923849.77.0.999973042575.issue2760@psf.upfronthosting.co.za> New submission from Thomas Herve : The problematic change is here: http://svn.python.org/view/python/trunk/Lib/socket.py?rev=62627&r1=61008&r2=62627 The following script shows the problem: Python 2.6a2+ (trunk:62707, May 4 2008, 19:13:44) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib2 >>> r = urllib2.Request('http://pypi.python.org/simple') >>> f = urllib2.urlopen(r) >>> f.read() Traceback (most recent call last): File "", line 1, in File "/home/therve/.local/lib/python2.6/socket.py", line 326, in read data = self._sock.recv(rbufsize) File "/home/therve/.local/lib/python2.6/httplib.py", line 512, in read return self._read_chunked(amt) File "/home/therve/.local/lib/python2.6/httplib.py", line 548, in _read_chunked line = self.fp.readline() File "/home/therve/.local/lib/python2.6/socket.py", line 391, in readline assert buf.tell() == 0 AssertionError >>> ---------- components: Library (Lib) messages: 66222 nosy: therve severity: normal status: open title: Recent change in socket.py breaks urllib2 versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 20:00:10 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 04 May 2008 18:00:10 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209923803.24.0.939314809245.issue2750@psf.upfronthosting.co.za> Message-ID: <1afaf6160805041100h756c2f12gc9a661112c284743@mail.gmail.com> Benjamin Peterson added the comment: On Sun, May 4, 2008 at 12:56 PM, Bob Ippolito wrote: > > Bob Ippolito added the comment: > > They look good, but is there an easy way to look at them post-formatting > or do I have to install the sphinx toolchain myself? in the Doc directory, run make html. > I moved the command-line stuff to json.tool to get around the package > problem. Why not json.pp (for pretty-print)? __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 20:02:46 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 04 May 2008 18:02:46 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209924166.43.0.294245554704.issue2750@psf.upfronthosting.co.za> Georg Brandl added the comment: Benjamin, if you want you can send me the rst file for review. I tried to checkout the bzr branch, but cancelled it after waiting for 25 minutes. ---------- nosy: +georg.brandl __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 20:05:26 2008 From: report at bugs.python.org (Bob Ippolito) Date: Sun, 04 May 2008 18:05:26 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209924326.25.0.0716005354038.issue2750@psf.upfronthosting.co.za> Bob Ippolito added the comment: I don't think that makes sense, "tool" makes it pretty clear that it's something you use from the command-line rather than a module to import and call functions from where pp does not. I'd also rather call it pprint than pp if that were the decision.. EIBTI. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 20:08:12 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 04 May 2008 18:08:12 +0000 Subject: [issue2759] Bool makes filter(None,it) redundant; remove None option? In-Reply-To: <1209922927.71.0.76492509118.issue2759@psf.upfronthosting.co.za> Message-ID: <1209924492.78.0.670134940038.issue2759@psf.upfronthosting.co.za> Georg Brandl added the comment: FYI, filter() already special-cases "bool". I think the discussion whether to remove the None argument has been had, but I could be mistaken. Guido, do you remember more? ---------- assignee: -> gvanrossum nosy: +georg.brandl, gvanrossum __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 20:09:04 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 04 May 2008 18:09:04 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209924544.25.0.855060440185.issue2750@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Georg, I'm attaching json.rst. Bob, I personally would prefer pprint, but it's your choice. Added file: http://bugs.python.org/file10195/json.rst __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 20:12:08 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 May 2008 18:12:08 +0000 Subject: [issue2761] Doc: built-in callables and map In-Reply-To: <1209924728.67.0.122763475397.issue2761@psf.upfronthosting.co.za> Message-ID: <1209924728.67.0.122763475397.issue2761@psf.upfronthosting.co.za> New submission from Terry J. Reedy : StdLibMan Built-in Functions I believe that at one time this section only contained functions. But this has not been true since at least 2.2. Please add "and Classes" to the title and first sentence. Possibly add "('callables')" after "and classes" in the sentence to introduce the generic term. This would at least slightly help the sometimes confusion between 'function' as specific class and as generic callable. This change also applies to 2.6 (and earlier, but oh, well...). 3.0 entry for map() (now a class!) in this section. Please add "With multiple iterables, stops when the shortest iterable is exhausted" . (Copied from map.__doc__.) What's New in 3.0: Stumbling Blocks: map entry: Add same sentence or similar. I only checked help(map) and discovered the change because of reading about itertools.imap and knowing that 3.0 map was derived? copied? from that. ---------- assignee: georg.brandl components: Documentation messages: 66228 nosy: georg.brandl, tjreedy severity: normal status: open title: Doc: built-in callables and map type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 20:15:09 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 04 May 2008 18:15:09 +0000 Subject: [issue2761] Doc: built-in callables and map In-Reply-To: <1209924728.67.0.122763475397.issue2761@psf.upfronthosting.co.za> Message-ID: <1209924909.55.0.0543703508009.issue2761@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Guido is doing 3.0 whatsnew. ---------- nosy: +benjamin.peterson, gvanrossum __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 20:26:14 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 04 May 2008 18:26:14 +0000 Subject: [issue1736190] asyncore/asynchat patches Message-ID: <1209925574.0.0.073275699879.issue1736190@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: In attachment the Josiah Carlson's patch who currently seems to have problems in accessing the bug tracker. It should address all the problems raised on python-dev related discussion: http://groups.google.com/group/python-dev2/browse_thread/thread/eec1ddadefe09fd8/40e79742231076b9?lnk=gst&q=asyncore#40e79742231076b9 Added file: http://bugs.python.org/file10196/full_async_patch.patch _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sun May 4 21:22:37 2008 From: report at bugs.python.org (Brett Cannon) Date: Sun, 04 May 2008 19:22:37 +0000 Subject: [issue1736190] asyncore/asynchat patches Message-ID: <1209928957.6.0.200924305641.issue1736190@psf.upfronthosting.co.za> Brett Cannon added the comment: This is separate from issue1563, right? ---------- nosy: +brett.cannon _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sun May 4 21:32:03 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 04 May 2008 19:32:03 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209929523.61.0.349363916548.issue2750@psf.upfronthosting.co.za> Benjamin Peterson added the comment: When we're ready, I'll merge this into the trunk and Py3k. (There are no Py3k warnings on test, so it should only be a matter of running 2to3.) ---------- assignee: -> benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 21:41:37 2008 From: report at bugs.python.org (Christian Heimes) Date: Sun, 04 May 2008 19:41:37 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209930096.98.0.577640798977.issue2750@psf.upfronthosting.co.za> Christian Heimes added the comment: The ref leak and unit tests are passing on Windows, too. I'm going to change the import of the C extension and then you can commit the bzr branch into the trunk. For 3.0 the C module probably needs some changes. I'll look into it once the code is merged into the trunk. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 21:43:01 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 04 May 2008 19:43:01 +0000 Subject: [issue1736190] asyncore/asynchat patches Message-ID: <1209930181.14.0.288582050765.issue1736190@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Yes. _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sun May 4 21:45:48 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 04 May 2008 19:45:48 +0000 Subject: [issue2761] Doc: built-in callables and map In-Reply-To: <1209924728.67.0.122763475397.issue2761@psf.upfronthosting.co.za> Message-ID: <1209930348.34.0.0127766793429.issue2761@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, I think the title is clearer as-is. While it is technically true that some entries are callables of various types, it is simpler to think of all of them as functions. The proposed change makes the docs harder to understand and less usuable though technical more correct. ---------- nosy: +rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 21:48:55 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 04 May 2008 19:48:55 +0000 Subject: [issue2759] Bool makes filter(None,it) redundant; remove None option? In-Reply-To: <1209922927.71.0.76492509118.issue2759@psf.upfronthosting.co.za> Message-ID: <1209930535.61.0.740202508162.issue2759@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It was deferred to me and I decided to keep the None argument as this is the standard way of spelling a missing argument. Also, the None argument provides a pretty good clue that a special fast path is being taken. ---------- nosy: +rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 22:14:37 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 May 2008 20:14:37 +0000 Subject: [issue2762] Language Reference: obsolute 2.x notes In-Reply-To: <1209932077.37.0.181467307786.issue2762@psf.upfronthosting.co.za> Message-ID: <1209932077.37.0.181467307786.issue2762@psf.upfronthosting.co.za> New submission from Terry J. Reedy : The 3.0a4 docs have various obsolete references to 2.x not yet removed. I found these and other items by searching for '2.' in each section Lexical Analysis: Identifiers and Keywords Please specify the legal ascii chars rather than referring back to the 2.5 doc! I would delete the second sentence and add the reference to PEP3131 to the end of the third. As it is, 'additional characters' and 'other characters' seem like possibly two different sets. Data Model: instance methods: 'changed in 2.6' delete Data Model: New Style and Classic Classes Probably this whole section should go. I hope that the last sentence is no longer true ;-) Data Model: footnote 1 (which I believe came from above): delete Simple Statements: Raise: several changes suggested. The grammar is wrong. There is only one optional expression. PEP3131 does not mention .with_traceback. It should if people are referred to it. But I would leave out the note and reference. PEP3131 is irrelevant to anyone just learning Py3 and not useful to non-expert Py2 users. Anyway, those who need it will find the reference in What's New. The .with_traceback method has no doc string. I presume it should say "Sets the __traceback__ attribute and returns self." The manual should also mention that the method returns the exception instance (self) Suggestion: "method (which returns the exception instance), like so:" (There stuff in parens is suggested addition.) I think this is worth mentioning because mutators, including setters, typically do *not* return 'self'. Compound statements: Try Given my opinion that 3.0 documents (other that What's New and other explicit transition docs) should stand on their own, I would also remove the reference to PEP3110. But at least it applies to most users. But again, I am not sure it adds very much. The What's New/Exception Stuff entry for PEP3110 could usefully add "You must now use except SomeException as identifier: instead of except Exception,identifier" in parallel to the note for 3109 above it (including the shading of code). Compound statements: With: remove last two sentences The Library Reference needs similar treatment. There are several "2." references just in Built-in Functions. ---------- assignee: georg.brandl components: Documentation messages: 66237 nosy: georg.brandl, tjreedy severity: normal status: open title: Language Reference: obsolute 2.x notes versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 22:19:31 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 04 May 2008 20:19:31 +0000 Subject: [issue2748] ceil(), floor() and round() broken in Decimal In-Reply-To: <1209841852.4.0.852706642988.issue2748@psf.upfronthosting.co.za> Message-ID: <1209932371.6.0.894071840375.issue2748@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for the patch. Please apply. ---------- resolution: -> accepted __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 23:20:27 2008 From: report at bugs.python.org (david reid) Date: Sun, 04 May 2008 21:20:27 +0000 Subject: [issue1368312] fix for scheme identification in urllib2? Message-ID: <1209936027.89.0.251988903928.issue1368312@psf.upfronthosting.co.za> david reid added the comment: I've run into this as an issue with a server that replies with both digest and basic auth. When parsing the keys in the header it's possible to detect the start of a different auth method, so I'd suggest parsing the www-authenticate line and returning a dict for each type of auth containing the appropriate key,value pairs. This approach should allow every auth type to be catered for. ---------- nosy: +zathras _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sun May 4 23:22:02 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 04 May 2008 21:22:02 +0000 Subject: [issue2761] Doc: built-in callables and map In-Reply-To: <1209924728.67.0.122763475397.issue2761@psf.upfronthosting.co.za> Message-ID: <1209936121.78.0.756437049898.issue2761@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree with Raymond here. ---------- resolution: -> rejected status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 23:22:18 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 04 May 2008 21:22:18 +0000 Subject: [issue2759] Bool makes filter(None,it) redundant; remove None option? In-Reply-To: <1209922927.71.0.76492509118.issue2759@psf.upfronthosting.co.za> Message-ID: <1209936138.27.0.50204308727.issue2759@psf.upfronthosting.co.za> Georg Brandl added the comment: Okay, closing as won't fix. ---------- assignee: gvanrossum -> resolution: -> wont fix status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 23:37:52 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 04 May 2008 21:37:52 +0000 Subject: [issue2762] Language Reference: obsolute 2.x notes In-Reply-To: <1209932077.37.0.181467307786.issue2762@psf.upfronthosting.co.za> Message-ID: <1209937072.51.0.881614354445.issue2762@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, this is very useful to me. I'll work through it soon. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 23:40:53 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 04 May 2008 21:40:53 +0000 Subject: [issue2695] Ignore case when checking algorithm in urllib2 In-Reply-To: <1209199638.72.0.800736981101.issue2695@psf.upfronthosting.co.za> Message-ID: <1209937253.29.0.676292171271.issue2695@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in r62713. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 23:51:53 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 04 May 2008 21:51:53 +0000 Subject: [issue2763] A socket example code shown in doc doesn't work on FreeBSD In-Reply-To: <1209937912.94.0.0729718790941.issue2763@psf.upfronthosting.co.za> Message-ID: <1209937912.94.0.0729718790941.issue2763@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : This is the result from executing the second IPv4/IPv6 server example shown in socket module documentation on a FreeBSD-7 system. http://docs.python.org/dev/library/socket.html#example dhcppc1# cat server.py # Echo server program import socket import sys HOST = '' # Symbolic name meaning the local host PORT = 50007 # Arbitrary non-privileged port s = None for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE): af, socktype, proto, canonname, sa = res try: s = socket.socket(af, socktype, proto) except socket.error, msg: s = None continue try: s.bind(sa) s.listen(1) except socket.error, msg: s.close() s = None continue break if s is None: print 'could not open socket' sys.exit(1) conn, addr = s.accept() print 'Connected by', addr while 1: data = conn.recv(1024) if not data: break conn.send(data) conn.close() dhcppc1# dhcppc1# uname -a FreeBSD dhcppc1# 7.0-RC1 FreeBSD 7.0-RC1 #0 Mon Dec 24 12:18:24 UTC 2007 root at logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC o386 dhcppc1# dhcppc1# python2.5 server.py Traceback (most recent call last): File "server.py", line 8 in for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE): socket.gaierror: (8, 'hostname nor servname provided, or not known') dhcppc1# ---------- assignee: georg.brandl components: Documentation messages: 66244 nosy: georg.brandl, giampaolo.rodola severity: normal status: open title: A socket example code shown in doc doesn't work on FreeBSD versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 4 23:53:35 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 04 May 2008 21:53:35 +0000 Subject: [issue2752] Wrong comment in socket documentation In-Reply-To: <1209877709.98.0.739134633667.issue2752@psf.upfronthosting.co.za> Message-ID: <1209938015.09.0.9850987826.issue2752@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: http://docs.python.org/dev/library/socket.html#example The second example (the IPv4/IPv6 server) still reports the local interface. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 00:02:37 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 04 May 2008 22:02:37 +0000 Subject: [issue2752] Wrong comment in socket documentation In-Reply-To: <1209877709.98.0.739134633667.issue2752@psf.upfronthosting.co.za> Message-ID: <1209938557.6.0.201605589052.issue2752@psf.upfronthosting.co.za> Benjamin Peterson added the comment: The online docs probably haven't rebuilt yet. ---------- nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 00:12:16 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 May 2008 22:12:16 +0000 Subject: [issue2761] Doc: built-in callables and map In-Reply-To: <1209924728.67.0.122763475397.issue2761@psf.upfronthosting.co.za> Message-ID: <1209939136.8.0.599424915186.issue2761@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To the best of my memory, the fact that type(built_in_function_section_object) is sometimes 'type...' (soon to be 'class...') rather than 'built-in function...' has been a point of occasional confusion on c.l.p for years. Such confusion was part of a recent newbie post there. I actually suggested, only half jokingly, 'Built-in callables' (and got at least one positive response) but decided that that was both too general and maybe a bit obscure, even though the Language Reference has a section on Callables. Hence the more specific suggestion. Perhaps we need more newbie opinions as to which they find clearer. Even if the title is left alone, I urge the expansion of the first sentence, though 'and callable classes' might be better. The double use of 'function' is definitely an occasional point of confusion in Python I think the crux of our disagreement is alternate parsings of 'built-in functions': 1) 'built-in' 'function', 2) 'built-in function'. Under 1) the current title is fine. Under 2), it is not, and 'built-in functions and classes', interpreted as parsing 2 of 'built-in functions and [built-in] classes' is better. The map doc issues are, of course, separate from the title and lead sentence issue. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 00:16:54 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 May 2008 22:16:54 +0000 Subject: [issue2759] Bool makes filter(None,it) redundant; remove None option? In-Reply-To: <1209922927.71.0.76492509118.issue2759@psf.upfronthosting.co.za> Message-ID: <1209939414.44.0.141017047599.issue2759@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Reopening for the alternate suggested fix of adding a note to 3099, which I checked before submitting this, so this need not come up again. ---------- assignee: -> georg.brandl components: +Documentation -Interpreter Core resolution: wont fix -> status: closed -> open __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 00:22:20 2008 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sun, 04 May 2008 22:22:20 +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: <1209939740.06.0.12026323355.issue2704@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: Thanks for the patch, I'll look at it. In the future, please send unified diffs (-u), not plain diffs. ---------- assignee: -> kbk nosy: +kbk versions: +Python 2.6 -Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 00:26:54 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 04 May 2008 22:26:54 +0000 Subject: [issue2752] Wrong comment in socket documentation In-Reply-To: <1209877709.98.0.739134633667.issue2752@psf.upfronthosting.co.za> Message-ID: <1209940014.33.0.591118677292.issue2752@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Fine. I just thought you had modified it only in one place. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 00:28:40 2008 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sun, 04 May 2008 22:28:40 +0000 Subject: [issue2708] IDLE subprocess error In-Reply-To: <1209391841.34.0.293801648559.issue2708@psf.upfronthosting.co.za> Message-ID: <1209940120.02.0.676958998736.issue2708@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: 1. Which version of Python / IDLE are you running? 2. Why do you "have to kill" IDLE instead of doing a normal quit? ---------- nosy: +kbk __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 00:35:05 2008 From: report at bugs.python.org (Christian Heimes) Date: Sun, 04 May 2008 22:35:05 +0000 Subject: [issue2764] c_char doesn't implement py3k buffer interface In-Reply-To: <1209940505.31.0.9485811448.issue2764@psf.upfronthosting.co.za> Message-ID: <1209940505.31.0.9485811448.issue2764@psf.upfronthosting.co.za> New submission from Christian Heimes : I'm currently merging changes from trunk to 3.0. One unit test is failing: test test_ctypes failed -- Traceback (most recent call last): File "Lib/ctypes/test/test_frombuffer.py", line 67, in test_from_buffer_copy x = (c_char * 16).from_buffer_copy("a" * 16) TypeError: expected an object with a buffer interface ---------- assignee: theller components: ctypes messages: 66252 nosy: christian.heimes, theller priority: critical severity: normal status: open title: c_char doesn't implement py3k buffer interface type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 00:37:35 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 May 2008 22:37:35 +0000 Subject: [issue2762] Language Reference: obsolute 2.x notes In-Reply-To: <1209932077.37.0.181467307786.issue2762@psf.upfronthosting.co.za> Message-ID: <00d901c8ae37$71a01510$0200a8c0@HPPAVILION> Terry J. Reedy added the comment: Thanks again for your work on the docs. If you would sometime prefer to receive a similar batch of comments but in a perhaps more useful form (ie, changes and comments in-line) let me know. I am thinking of any of the following: 1) doc on the Guido's new code tracker (via null patch) 2) doc embedded in an OO .odf (or Word .doc) so as to use RecordChanges feature 3) .rst (?) with changes and that you can run a diff against. Terry Georg Brandl added the comment: Thanks, this is very useful to me. I'll work through it soon. __________________________________ Tracker __________________________________ __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 00:38:16 2008 From: report at bugs.python.org (Christian Heimes) Date: Sun, 04 May 2008 22:38:16 +0000 Subject: [issue2765] warnings: error in test_missing_filename_main_with_argv_empty_string In-Reply-To: <1209940696.14.0.256326344641.issue2765@psf.upfronthosting.co.za> Message-ID: <1209940696.14.0.256326344641.issue2765@psf.upfronthosting.co.za> New submission from Christian Heimes : I'm currently merging code from the trunk into 3.0. One warnings test is failing: test test_warnings failed -- Traceback (most recent call last): File "/home/heimes/dev/python/py3k/Lib/test/test_warnings.py", line 296, in test_missing_filename_main_with_argv_empty_stringt self.assertEqual(w.filename, '__main__') AssertionError: b'__main__' != '__main__' ---------- assignee: brett.cannon components: Extension Modules messages: 66254 nosy: brett.cannon, christian.heimes priority: critical severity: normal status: open title: warnings: error in test_missing_filename_main_with_argv_empty_string type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 01:11:56 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 04 May 2008 23:11:56 +0000 Subject: [issue2765] warnings: error in test_missing_filename_main_with_argv_empty_string In-Reply-To: <1209940696.14.0.256326344641.issue2765@psf.upfronthosting.co.za> Message-ID: <1209942716.24.0.34935218549.issue2765@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This was a merge error. You must have merged the fix for #2743 and not changed the PyString_FromString to PyUnicode_FromString. I'll commit a fix shortly. ---------- nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 01:22:32 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 04 May 2008 23:22:32 +0000 Subject: [issue2765] warnings: error in test_missing_filename_main_with_argv_empty_string In-Reply-To: <1209940696.14.0.256326344641.issue2765@psf.upfronthosting.co.za> Message-ID: <1209943352.53.0.907194475127.issue2765@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r62717. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 06:48:28 2008 From: report at bugs.python.org (Philip Jenvey) Date: Mon, 05 May 2008 04:48:28 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1209962908.21.0.296355300844.issue2750@psf.upfronthosting.co.za> Philip Jenvey added the comment: Bob, all of the simplejson tests have actually been passing on Jython trunk -- at least up until recently when you added a couple tests that utilize the 2.4 decimal module. I can also import simplejson.scanner with a recent build of pypy, so it at least has those sre imports you're using. ---------- nosy: +pjenvey __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 08:44:24 2008 From: report at bugs.python.org (Thomas Heller) Date: Mon, 05 May 2008 06:44:24 +0000 Subject: [issue2764] c_char doesn't implement py3k buffer interface In-Reply-To: <1209940505.31.0.9485811448.issue2764@psf.upfronthosting.co.za> Message-ID: <1209969863.78.0.167846608639.issue2764@psf.upfronthosting.co.za> Thomas Heller added the comment: Thanks for your efforts, Christian. This test needs an object which implements the readonly buffer interface. Unfortunately the bytes object that I would like to use is broken: http://bugs.python.org/issue2538 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 08:48:31 2008 From: report at bugs.python.org (Dieter Maurer) Date: Mon, 05 May 2008 06:48:31 +0000 Subject: [issue2766] Doubtfull code in 'doctest.DocTestSuite' In-Reply-To: <1209970110.99.0.739838799558.issue2766@psf.upfronthosting.co.za> Message-ID: <1209970110.99.0.739838799558.issue2766@psf.upfronthosting.co.za> New submission from Dieter Maurer : "doctest.DocTestSuite" has parameter "globs=None". It uses "globs" in the call to "test_finder.call". After this use, it potentually modifies "globs" but no longer uses it. Either the "globs" modification is irrelevant (then it should be removed) or it should happen before the "test_finder.find" call. ---------- components: Library (Lib) messages: 66259 nosy: dmaurer severity: normal status: open title: Doubtfull code in 'doctest.DocTestSuite' versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 10:29:50 2008 From: report at bugs.python.org (Kristian Lauridsen) Date: Mon, 05 May 2008 08:29:50 +0000 Subject: [issue2708] IDLE subprocess error In-Reply-To: <1209391841.34.0.293801648559.issue2708@psf.upfronthosting.co.za> Message-ID: <1209976190.85.0.966305480677.issue2708@psf.upfronthosting.co.za> Kristian Lauridsen added the comment: Python 2.5.2 IDLE 1.2.2 It dosnt matter how i try to "end" IDLE: red cross, close(alt+F4), exit (Ctrl+Q) or writing exit(), it will ask me to kill the program. I dont think it's IDLE im "killing" but the program im writing. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 11:32:26 2008 From: report at bugs.python.org (Dieter Maurer) Date: Mon, 05 May 2008 09:32:26 +0000 Subject: [issue2767] "doctest.DocTestCase.debug" clears "test.globs" too early In-Reply-To: <1209979946.64.0.074102110802.issue2767@psf.upfronthosting.co.za> Message-ID: <1209979946.64.0.074102110802.issue2767@psf.upfronthosting.co.za> New submission from Dieter Maurer : "doctest.DocTestCase.debug" calls "DebugRunner.run" without "clear_globs=False". As a consequence, already the runner clears "test.globs" and it is no longer available to "tearDown" (where is it cleared again). ---------- components: Library (Lib) messages: 66262 nosy: dmaurer severity: normal status: open title: "doctest.DocTestCase.debug" clears "test.globs" too early type: behavior versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 11:45:11 2008 From: report at bugs.python.org (Martin McNickle) Date: Mon, 05 May 2008 09:45:11 +0000 Subject: [issue2756] urllib2 add_header fails with existing unredirected_header In-Reply-To: <1209913898.38.0.175541514636.issue2756@psf.upfronthosting.co.za> Message-ID: <1209980709.72.0.185479087894.issue2756@psf.upfronthosting.co.za> Martin McNickle added the comment: I can see that there will be a problem in this case. However, it may be that the authors found it more intuitive to always set the Content-Type to application/x-www-form-urlencoded when data is set. Their implementation is inconsistent though: #------------------------------------------------------- request = urllib2.Request('http://www.somesite.com/') request.add_data(data) f = urllib2.urlopen(request) # 'Content-Type: application/x-www-form-urlencoded' is sent in the header #------------------------------------------------------- whereas: #------------------------------------------------------- request = urllib2.Request('http://www.somesite.com/') request.add_header('Content-Type', 'application/xml') request.add_data(data) # 'Content-Type: application/xml' is sent in the header #------------------------------------------------------- We need to decide what is the best way to handle this case. Should the normal headers be given preference, or should the unredirected headers be given preference? --- Martin ---------- nosy: +BitTorment __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 11:50:58 2008 From: report at bugs.python.org (Martin McNickle) Date: Mon, 05 May 2008 09:50:58 +0000 Subject: [issue2756] urllib2 add_header fails with existing unredirected_header In-Reply-To: <1209913898.38.0.175541514636.issue2756@psf.upfronthosting.co.za> Message-ID: <1209981058.4.0.897643740852.issue2756@psf.upfronthosting.co.za> Martin McNickle added the comment: Sorry, the first example should read: #------------------------------------------------------- request = urllib2.Request('http://www.whompbox.com/headertest.php') request.add_data(data) f = urllib2.urlopen(request) request.add_header('Content-Type', 'application/xml') f = urllib2.urlopen(request) # 'Content-Type: application/x-www-form-urlencoded' is sent in both headers. Second header (should?) be 'application/xml' #------------------------------------------------------- __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 11:56:18 2008 From: report at bugs.python.org (Yap Sok Ann) Date: Mon, 05 May 2008 09:56:18 +0000 Subject: [issue2697] Logging ancestors ignored after configuration In-Reply-To: <1209217597.75.0.0893619687269.issue2697@psf.upfronthosting.co.za> Message-ID: <1209981378.49.0.394792747543.issue2697@psf.upfronthosting.co.za> Yap Sok Ann added the comment: I'd think that it is a rather common situation where one wants to use use both fileConfig and module-level logger. As of now, the workaround suggested by Andrew seems to be the only viable way to achieve that. The alternative approach mentioned, i.e. to name all loggers explicitly in the configuration file, is just too unintuitive. ---------- nosy: +sayap __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 13:27:47 2008 From: report at bugs.python.org (Christian Heimes) Date: Mon, 05 May 2008 11:27:47 +0000 Subject: [issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor In-Reply-To: <1209986866.69.0.462896858511.issue2768@psf.upfronthosting.co.za> Message-ID: <1209986866.69.0.462896858511.issue2768@psf.upfronthosting.co.za> New submission from Christian Heimes : os.fstat doesn't accept a file object with a fileno() method. This can easily be fixed by using PyObject_AsFileDescriptor(). Other os.f* methods may suffer from the same issue. ---------- components: Extension Modules keywords: easy messages: 66266 nosy: christian.heimes priority: normal severity: normal status: open title: os.fstat and other os.f* methods should use PyObject_AsFileDescriptor type: feature request versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 14:47:29 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Mon, 05 May 2008 12:47:29 +0000 Subject: [issue2632] performance problem in socket._fileobject.read In-Reply-To: <1208197816.87.0.564994342754.issue2632@psf.upfronthosting.co.za> Message-ID: <1209991649.16.0.763997543169.issue2632@psf.upfronthosting.co.za> Ralf Schmitt added the comment: I have a case which triggers the assert in readline: File "build/bdist.linux-x86_64/egg/setuptools/command/develop.py", line 27, in run File "build/bdist.linux-x86_64/egg/setuptools/command/develop.py", line 102, in install_for_development File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 519, in process_distribution File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 522, in resolve File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 758, in best_match File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 770, in obtain File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 433, in easy_install File "build/bdist.linux-x86_64/egg/setuptools/package_index.py", line 462, in fetch_distribution File "build/bdist.linux-x86_64/egg/setuptools/package_index.py", line 303, in find_packages File "build/bdist.linux-x86_64/egg/setuptools/package_index.py", line 617, in scan_url File "build/bdist.linux-x86_64/egg/setuptools/package_index.py", line 198, in process_url File "/home/ralf/py26/lib/python2.6/socket.py", line 326, in read data = self._sock.recv(rbufsize) File "/home/ralf/py26/lib/python2.6/httplib.py", line 512, in read return self._read_chunked(amt) File "/home/ralf/py26/lib/python2.6/httplib.py", line 548, in _read_chunked line = self.fp.readline() File "/home/ralf/py26/lib/python2.6/socket.py", line 391, in readline assert buf.tell() == 0 AssertionError this happens when I run : easy_install 'mwlib<0.6' __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 15:27:58 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Mon, 05 May 2008 13:27:58 +0000 Subject: [issue2769] Small typo in whatsnew/2.6.rst In-Reply-To: <1209994077.95.0.123254037587.issue2769@psf.upfronthosting.co.za> Message-ID: <1209994077.95.0.123254037587.issue2769@psf.upfronthosting.co.za> New submission from Quentin Gallet-Gilles : In the "What's new" documentation for 2.6, a code marker is missing in the paragraph about itertools.permutations. Attached patch corrects this. ---------- assignee: georg.brandl components: Documentation files: whatsnew_2.6.patch keywords: patch messages: 66268 nosy: georg.brandl, quentin.gallet-gilles severity: normal status: open title: Small typo in whatsnew/2.6.rst versions: Python 2.6 Added file: http://bugs.python.org/file10197/whatsnew_2.6.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 15:59:51 2008 From: report at bugs.python.org (Raghuram Devarakonda) Date: Mon, 05 May 2008 13:59:51 +0000 Subject: [issue2632] performance problem in socket._fileobject.read In-Reply-To: <1208197816.87.0.564994342754.issue2632@psf.upfronthosting.co.za> Message-ID: <1209995991.07.0.949443719844.issue2632@psf.upfronthosting.co.za> Raghuram Devarakonda added the comment: Similar problem is reported in #2760. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 16:00:40 2008 From: report at bugs.python.org (Raghuram Devarakonda) Date: Mon, 05 May 2008 14:00:40 +0000 Subject: [issue2760] Recent change in socket.py breaks urllib2 In-Reply-To: <1209923849.77.0.999973042575.issue2760@psf.upfronthosting.co.za> Message-ID: <1209996040.56.0.721268428595.issue2760@psf.upfronthosting.co.za> Raghuram Devarakonda added the comment: Similar problem has been reported in #2632 as well. ---------- nosy: +draghuram __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 16:06:39 2008 From: report at bugs.python.org (Augie Fackler) Date: Mon, 05 May 2008 14:06:39 +0000 Subject: [issue2770] Subversion 1.5 Working Copies Break Setuptools In-Reply-To: <1209996399.45.0.153432540456.issue2770@psf.upfronthosting.co.za> Message-ID: <1209996399.45.0.153432540456.issue2770@psf.upfronthosting.co.za> New submission from Augie Fackler : Subversion 1.5 adds some fields to the entries file in the working copy administrative area. As a result of this, the way in which setuptools checks the entries files results in a raised exception. Having read the spec for the entries file, the issue can be fixed simply by looking for version 8 or version 9 in the opening of the entries file. I've attached a patch that does this. I've tested it extensively locally (been using it for months). ---------- components: Distutils files: setuptools_patch.txt messages: 66271 nosy: durin42 severity: normal status: open title: Subversion 1.5 Working Copies Break Setuptools versions: Python 2.5 Added file: http://bugs.python.org/file10198/setuptools_patch.txt __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 18:40:46 2008 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 05 May 2008 16:40:46 +0000 Subject: [issue2771] test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> New submission from Guido van Rossum : This is a very long line. I am wondering how it will be wrapped. What will happen to this exceedingly long line? Will it be wrapped? Will it? Really? What will happen? Here's an example: def fact(n): if n > 1: return n * fact(n-1) else: assert n in (0, 1) return 1 What do you think of that? ---------- messages: 66272 nosy: gvanrossum severity: normal status: open title: test issue __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 18:41:29 2008 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 05 May 2008 16:41:29 +0000 Subject: [issue2771] test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1210005689.84.0.834344170887.issue2771@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 18:59:41 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 05 May 2008 16:59:41 +0000 Subject: [issue2749] Raise a DeprecationWarning for warnings.showwarning(.., line) In-Reply-To: <1209847556.68.0.658997115031.issue2749@psf.upfronthosting.co.za> Message-ID: <1210006781.5.0.24684031262.issue2749@psf.upfronthosting.co.za> Brett Cannon added the comment: r62720 and r62722 have the fix (and a fix for the fix). In the Python code I check for an argument named 'line' and in the C code I make sure there are at least two default arguments. Both assume a Python implementation for showwarning(), which should be a reasonable assumption. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 19:18:56 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 05 May 2008 17:18:56 +0000 Subject: [issue1734346] patch for bug 1170311 "zipfile UnicodeDecodeError" Message-ID: <1210007936.38.0.587280766677.issue1734346@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the patch, committed as r62724. I didn't see the need to clear the UTF-8 flag, so I left it in (in case somebody wants to inspect it). ---------- resolution: -> accepted status: open -> closed _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 5 19:19:04 2008 From: report at bugs.python.org (Mike MacFaden) Date: Mon, 05 May 2008 17:19:04 +0000 Subject: [issue2741] documentation -- do serversockets work with ipv6 In-Reply-To: <1209754393.92.0.50120862505.issue2741@psf.upfronthosting.co.za> Message-ID: <1210007944.24.0.612561887255.issue2741@psf.upfronthosting.co.za> Mike MacFaden added the comment: so i suggest just removing this sentence -- AF_INET and socket.AF_UNIX are two possible values. this would imply that all socket address families are supported. but if that is not true just list the exceptions. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 20:05:08 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 05 May 2008 18:05:08 +0000 Subject: [issue2770] Subversion 1.5 Working Copies Break Setuptools In-Reply-To: <1209996399.45.0.153432540456.issue2770@psf.upfronthosting.co.za> Message-ID: <1210010708.12.0.00127797639687.issue2770@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> pje nosy: +pje __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 20:35:45 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 05 May 2008 18:35:45 +0000 Subject: [issue2760] Recent change in socket.py breaks urllib2 In-Reply-To: <1209923849.77.0.999973042575.issue2760@psf.upfronthosting.co.za> Message-ID: <1210012545.37.0.134141674183.issue2760@psf.upfronthosting.co.za> Gregory P. Smith added the comment: the change in socket was done as part of #2632. i'm marking this a duplicate, we'll track the issue in #2632. ---------- assignee: -> gregory.p.smith dependencies: +performance problem in socket._fileobject.read nosy: +gregory.p.smith priority: -> release blocker resolution: -> duplicate status: open -> closed superseder: -> performance problem in socket._fileobject.read __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 20:40:13 2008 From: report at bugs.python.org (Alexey Borzenkov) Date: Mon, 05 May 2008 18:40:13 +0000 Subject: [issue1734346] patch for bug 1170311 "zipfile UnicodeDecodeError" Message-ID: <1210012813.49.0.493278881137.issue1734346@psf.upfronthosting.co.za> Alexey Borzenkov added the comment: Martin, I cleared the flag bit because filename was changed in-place, to mark that filename does not need further processing. This was primarily compatibility concern, to accommodate for situations where users try to do such decoding in their own code (this way flag won't be there, so their code won't trigger). Without clearing the flag bit, calling _decodeFilenameFlags second time will fail, as well as any similar user code. I suggest that if users want to know if filename is unicode, they should check that filename is of class unicode. _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 5 21:21:00 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 05 May 2008 19:21:00 +0000 Subject: [issue2632] performance problem in socket._fileobject.read In-Reply-To: <1208197816.87.0.564994342754.issue2632@psf.upfronthosting.co.za> Message-ID: <1210015260.38.0.951403641797.issue2632@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I'm glad i put that assert in... The problem occurs due to a mixture of fixed size reads followed by unbounded readlines on an unbuffered _fileobject. A case that the code currently doesn't handle. I'm fixing it. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 21:32:02 2008 From: report at bugs.python.org (Christian Heimes) Date: Mon, 05 May 2008 19:32:02 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1210015922.29.0.976499471199.issue2750@psf.upfronthosting.co.za> Christian Heimes added the comment: Please merge the bzr into the svn trunk as soon as possible. I'd like to get it into the last alpha release. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 21:56:25 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 05 May 2008 19:56:25 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1210017385.13.0.669904779992.issue2750@psf.upfronthosting.co.za> Brett Cannon added the comment: So there is one failing test because json.dumps() tacks on extraneous whitespace. When you run the file through reindent it strips out the whitespace from the docstring, causing doctest to fail. Trying to fix it. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 22:11:17 2008 From: report at bugs.python.org (Christian Heimes) Date: Mon, 05 May 2008 20:11:17 +0000 Subject: [issue1799] Per user site-packages and setup.py install --user patch In-Reply-To: <1200086609.43.0.542576295235.issue1799@psf.upfronthosting.co.za> Message-ID: <1210018277.58.0.167995209819.issue1799@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file9158/trunk_usersite4.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 22:12:32 2008 From: report at bugs.python.org (Christian Heimes) Date: Mon, 05 May 2008 20:12:32 +0000 Subject: [issue1799] PEP 370 In-Reply-To: <1200086609.43.0.542576295235.issue1799@psf.upfronthosting.co.za> Message-ID: <1210018352.62.0.879438949349.issue1799@psf.upfronthosting.co.za> Christian Heimes added the comment: The new patch applies cleanly in the trunk. ---------- priority: normal -> critical title: Per user site-packages and setup.py install --user patch -> PEP 370 Added file: http://bugs.python.org/file10199/pep370.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 22:22:30 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 05 May 2008 20:22:30 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1210018950.19.0.0416425365915.issue2750@psf.upfronthosting.co.za> Brett Cannon added the comment: r62734 has it in the trunk. I had to change a doctest to use repr() in order to get around the extraneous whitespace that pretty-printing spits out, but otherwise I only added a Misc/NEWS entry. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 22:23:22 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 05 May 2008 20:23:22 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1210019002.81.0.648110510737.issue2750@psf.upfronthosting.co.za> Brett Cannon added the comment: I am leaving this issue open until 'json' is ported to 3.0 (and thus why I am assigning this to Christian). ---------- assignee: benjamin.peterson -> christian.heimes __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 22:23:30 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 05 May 2008 20:23:30 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1210019010.16.0.583225709282.issue2750@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- versions: -Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 22:54:17 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 05 May 2008 20:54:17 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1210020857.44.0.293218593545.issue2750@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed up the docs in r62736. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 22:59:15 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 05 May 2008 20:59:15 +0000 Subject: [issue2769] Small typo in whatsnew/2.6.rst In-Reply-To: <1209994077.95.0.123254037587.issue2769@psf.upfronthosting.co.za> Message-ID: <1210021155.02.0.314981299762.issue2769@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r62737. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 23:00:28 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 05 May 2008 21:00:28 +0000 Subject: [issue2759] Bool makes filter(None,it) redundant; remove None option? In-Reply-To: <1209922927.71.0.76492509118.issue2759@psf.upfronthosting.co.za> Message-ID: <1210021228.52.0.621682241542.issue2759@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't think this is important enough to get into 3099. ---------- status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 23:05:57 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 05 May 2008 21:05:57 +0000 Subject: [issue2761] Doc: built-in callables and map In-Reply-To: <1209924728.67.0.122763475397.issue2761@psf.upfronthosting.co.za> Message-ID: <1210021556.82.0.456769623584.issue2761@psf.upfronthosting.co.za> Georg Brandl added the comment: Problem is, we already have a section "Builtin types". Fixed the map() docs in r62738, and added a note to the first sentence in r62739. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 23:07:24 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 05 May 2008 21:07:24 +0000 Subject: [issue2752] Wrong comment in socket documentation In-Reply-To: <1209877709.98.0.739134633667.issue2752@psf.upfronthosting.co.za> Message-ID: <1210021644.57.0.699031540533.issue2752@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r62740, thanks! __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 23:16:04 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 05 May 2008 21:16:04 +0000 Subject: [issue1734346] patch for bug 1170311 "zipfile UnicodeDecodeError" In-Reply-To: <1210012813.49.0.493278881137.issue1734346@psf.upfronthosting.co.za> Message-ID: <481F790D.8030206@v.loewis.de> Martin v. L?wis added the comment: > Martin, I cleared the flag bit because filename was changed in-place, to > mark that filename does not need further processing. This was primarily > compatibility concern, to accommodate for situations where users try to > do such decoding in their own code (this way flag won't be there, so > their code won't trigger). Without clearing the flag bit, calling > _decodeFilenameFlags second time will fail, as well as any similar user > code. I'm not concerned about the compatibility; code that actually does the decoding still might break since it would expect the filename to be a byte string if it doesn't explicitly decode. Such assumption would still break under your change. I am concerned about silently faking data. The library shouldn't do that; it should present the flags unmodified, as some application might perform further processing (such as displaying the flags to the user). It would then be confusing if the data processed isn't the one that was read from disk. > I suggest that if users want to know if filename is unicode, they should > check that filename is of class unicode. That won't work in Py3k, which will always decode the filename. _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 5 23:17:00 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 05 May 2008 21:17:00 +0000 Subject: [issue2741] documentation -- do serversockets work with ipv6 In-Reply-To: <1210007944.24.0.612561887255.issue2741@psf.upfronthosting.co.za> Message-ID: <481F794A.5030004@v.loewis.de> Martin v. L?wis added the comment: > so i suggest just removing this sentence -- > > AF_INET and socket.AF_UNIX are two possible values. > > this would imply that all socket address families are supported. > but if that is not true just list the exceptions. I think this will confuse users which don't know what an "address family" is - they are left guessing what possibly could be in this field. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 23:42:07 2008 From: report at bugs.python.org (Mike MacFaden) Date: Mon, 05 May 2008 21:42:07 +0000 Subject: [issue2741] documentation -- do serversockets work with ipv6 In-Reply-To: <1209754393.92.0.50120862505.issue2741@psf.upfronthosting.co.za> Message-ID: <1210023727.32.0.700172991289.issue2741@psf.upfronthosting.co.za> Mike MacFaden added the comment: then change 'possible values' to 'for example' __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 23:43:06 2008 From: report at bugs.python.org (Shish) Date: Mon, 05 May 2008 21:43:06 +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: <1210023786.18.0.00579200265277.issue2732@psf.upfronthosting.co.za> Shish added the comment: Also present in 2.5 ---------- components: +Library (Lib) -Extension Modules versions: +Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 23:45:15 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 05 May 2008 21:45:15 +0000 Subject: [issue2762] Language Reference: obsolute 2.x notes In-Reply-To: <1209932077.37.0.181467307786.issue2762@psf.upfronthosting.co.za> Message-ID: <1210023915.35.0.676592016774.issue2762@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks very much, Terry! I've done almost all your suggestions in r62742, and added a docstring to with_traceback in r62741. For future issues, please feel free to choose either method 1 or 3 (I think 3 may be the simplest for you.) ---------- resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 23:54:34 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 05 May 2008 21:54:34 +0000 Subject: [issue2632] performance problem in socket._fileobject.read In-Reply-To: <1208197816.87.0.564994342754.issue2632@psf.upfronthosting.co.za> Message-ID: <1210024474.8.0.918497928943.issue2632@psf.upfronthosting.co.za> Gregory P. Smith added the comment: The bug introduced in r62627 has been fixed in r62744. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 5 23:55:55 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 05 May 2008 21:55:55 +0000 Subject: [issue2760] Recent change in socket.py breaks urllib2 In-Reply-To: <1209923849.77.0.999973042575.issue2760@psf.upfronthosting.co.za> Message-ID: <1210024555.03.0.98912003528.issue2760@psf.upfronthosting.co.za> Gregory P. Smith added the comment: The bug introduced in r62627 has been fixed in r62744. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 00:02:02 2008 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 05 May 2008 22:02:02 +0000 Subject: [issue1736190] asyncore/asynchat patches Message-ID: <1210024922.15.0.693917341731.issue1736190@psf.upfronthosting.co.za> Guido van Rossum added the comment: FWIW, I've added Giampaolo's latest patch to Rietveld: http://codereview.appspot.com/744 Review comments added there should automatically be CC'ed here. _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 6 00:02:27 2008 From: report at bugs.python.org (svncodereview) Date: Mon, 05 May 2008 22:02:27 +0000 Subject: [issue1736190] asyncore/asynchat patches Message-ID: <0016e642d64aefd7c1044c82e222@google.com> svncodereview added the comment: Dear report at bugs.python.org, New code review comments by gvanrossum at gmail.com have been published. Please go to http://codereview.appspot.com/744 to read them. Message: (This is mostly a test of the bug/rietveld integration.) Details: http://codereview.appspot.com/744/diff/1/22 File Doc/library/asyncore.rst (right): http://codereview.appspot.com/744/diff/1/22#newcode226 Line 226: A file_dispatcher takes a file descriptor or file object along with an optional Mind keeping the line length under 80 chars? Issue Description: http://bugs.python.org/issue1736190 Sincerely, Your friendly code review daemon (http://codereview.appspot.com/). ---------- nosy: +svncodereview _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 6 00:07:36 2008 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 05 May 2008 22:07:36 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <48085FC6.2070008@egenix.com> Message-ID: Guido van Rossum added the comment: On Fri, Apr 18, 2008 at 1:46 AM, Marc-Andre Lemburg wrote: > On 2008-04-18 05:35, atsuo ishimoto wrote: > > atsuo ishimoto added the comment: > > > > Is a codec which encode() returns an Unicode allowed in Python3? > > Sure, why not ? Actually, it is not. In Py3k, x.encode() always requires x to be a str (i.e. unicode) instance and return a bytes instance. y.decode() requires y to be a bytes instance and returns a str (i.e. unicode) instance. > I think you have to ask another question: Is repr() allowed to > return a string (instead of Unicode) in Py3k ? In Py3k, "strings" *are* unicode. The str data type is Unicode. If you're asking about repr() possibly returning a bytes instance, definitely not. > If not, then unicode_repr() will have to check the return value of > the codec and convert it back to Unicode as necessary. What codec? > > I started to think codec is not nessesary, but python function is enough. > > That's what we currently have with unicode_repr(), but it doesn't > solve the problem. I'm lost here. PS. Atsuo's PEP has now been checked in as PEP 3138. Discussion should start soon on the python-3000 list. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 00:17:52 2008 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 05 May 2008 22:17: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: <1210025872.43.0.753821418597.issue2630@psf.upfronthosting.co.za> Guido van Rossum added the comment: FWIW, I've uploaded diff3.txt to Rietveld: http://codereview.appspot.com/767 Code review comments should be reflected here. I had to skip the change to Modules/unicodename_db.h which were too large for Rietveld to handle. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 03:41:30 2008 From: report at bugs.python.org (andrew cooke) Date: Tue, 06 May 2008 01:41:30 +0000 Subject: [issue2697] Logging ancestors ignored after configuration In-Reply-To: <1209217597.75.0.0893619687269.issue2697@psf.upfronthosting.co.za> Message-ID: <1210038090.71.0.683144845737.issue2697@psf.upfronthosting.co.za> andrew cooke added the comment: Got more important things than this to worry about, but yes, original response not very helpful. In a perfect world this might be either justified more clearly or addressed. OTOH, I get the impression hardly anyone uses this package (docs were pretty opaque...) Also, isn't this a "won't fix" rather than an "invalid"? __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 04:17:25 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 06 May 2008 02:17:25 +0000 Subject: [issue2621] rename test_support to support In-Reply-To: <1207960346.09.0.959941490384.issue2621@psf.upfronthosting.co.za> Message-ID: <1210040244.89.0.388342205851.issue2621@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Now that the stdlib-reorg PEP has been accepted, would you like you me to apply this patch? (Of course, I'll account for recent changes in the test suite.) __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 06:30:33 2008 From: report at bugs.python.org (atsuo ishimoto) Date: Tue, 06 May 2008 04:30:33 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1210048232.8.0.629944733272.issue2630@psf.upfronthosting.co.za> atsuo ishimoto added the comment: I forgot to mention to Modules/unicodename_db.h. The current unicodename_db.h looks it was generated by old Tools/unicode/makeunicodedata.py. This patch includes newly generated unicodename_db.h, but we can exclude the change if not necessary. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 06:39:18 2008 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 06 May 2008 04:39:18 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1210048232.8.0.629944733272.issue2630@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: No need to change anything, the diff is just too big for the code review tool (Rietveld), but since it consists only of numbers we don't need to review it anyway. :) __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 09:07:26 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 06 May 2008 07:07:26 +0000 Subject: [issue2707] Tiny fix for os.walk docstring In-Reply-To: <1209364994.21.0.532528115565.issue2707@psf.upfronthosting.co.za> Message-ID: <1210057646.1.0.431141741936.issue2707@psf.upfronthosting.co.za> Gregory P. Smith added the comment: fixed in trunk r62756 and release25-maint r62757. thanks for the report. ---------- assignee: -> gregory.p.smith keywords: +easy nosy: +gregory.p.smith resolution: -> fixed status: open -> closed versions: +Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 09:23:28 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 06 May 2008 07:23:28 +0000 Subject: [issue2628] ftplib Persistent data connection In-Reply-To: <1208130611.58.0.0933193390026.issue2628@psf.upfronthosting.co.za> Message-ID: <1210058607.88.0.585038766303.issue2628@psf.upfronthosting.co.za> Gregory P. Smith added the comment: rather than using the array.array for your three byte header with manual parsing, please use struct.unpack. Whats a good way to test that this works? It'd be nice to have a unit test (a test_ftplib_net.py perhaps?) though I realize ftplib currently has poor test coverage with no such explicit network test existing beyond things the urllib tests might do. also, could you make the appropriate documentation updates against python trunk's Doc/lib/ftplib.rst. Mention when & what servers you found using this mode useful with if at all possible. ---------- nosy: +gregory.p.smith __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 10:23:32 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Tue, 06 May 2008 08:23:32 +0000 Subject: [issue2632] performance problem in socket._fileobject.read In-Reply-To: <1208197816.87.0.564994342754.issue2632@psf.upfronthosting.co.za> Message-ID: <1210062212.8.0.466752935244.issue2632@psf.upfronthosting.co.za> Ralf Schmitt added the comment: the above easy_install now works for me. thanks. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 10:26:36 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 06 May 2008 08:26:36 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: Message-ID: <48201630.9020602@egenix.com> Marc-Andre Lemburg added the comment: On 2008-05-06 00:07, Guido van Rossum wrote: > Guido van Rossum added the comment: > > On Fri, Apr 18, 2008 at 1:46 AM, Marc-Andre Lemburg > wrote: >> On 2008-04-18 05:35, atsuo ishimoto wrote: >> > atsuo ishimoto added the comment: >> > >> > Is a codec which encode() returns an Unicode allowed in Python3? >> >> Sure, why not ? > > Actually, it is not. In Py3k, x.encode() always requires x to be a str > (i.e. unicode) instance and return a bytes instance. y.decode() > requires y to be a bytes instance and returns a str (i.e. unicode) > instance. So you've limited the codec design to just doing Unicode<->bytes conversions ? The original codec design was to have the codec decide which types to take on input and to generate on output, e.g. to escape characters in Unicode (converting Unicode to Unicode), work on compressed 8-bit strings (converting 8-bit strings to 8-bit strings), etc. >> I think you have to ask another question: Is repr() allowed to >> return a string (instead of Unicode) in Py3k ? > > In Py3k, "strings" *are* unicode. The str data type is Unicode. With "strings" I always refer to 8-bit strings, ie. 8-bit data that is encoded in some encoding. > If you're asking about repr() possibly returning a bytes instance, > definitely not. > >> If not, then unicode_repr() will have to check the return value of >> the codec and convert it back to Unicode as necessary. > > What codec? The idea is to have a codec which takes the Unicode object and converts it to its repr()-value. Now, since you apparently cannot go the direct way anymore (ie. have the codec encode Unicode to Unicode), you'd have to first use a codec which converts the Unicode object to its repr()-value represented as bytes object and then convert the bytes object back to Unicode in unicode_repr(). With the original design, this extra step wouldn't have been necessary. >> > I started to think codec is not nessesary, but python function is enough. >> >> That's what we currently have with unicode_repr(), but it doesn't >> solve the problem. > > I'm lost here. See my previous replies on this ticket. > PS. Atsuo's PEP has now been checked in as PEP 3138. Discussion should > start soon on the python-3000 list. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 11:00:58 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 May 2008 09:00:58 +0000 Subject: [issue1751] Fast BytesIO implementation + misc changes In-Reply-To: <1199690432.25.0.839683390385.issue1751@psf.upfronthosting.co.za> Message-ID: <1210064458.2.0.957153315858.issue1751@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Since nothing happened for almost one month here, perhaps it would be better to merge Alexandre's changes as they are? We'll see quickly if unexpected things happen :-) It would also allow to progress on other issues, e.g. #2523. Also, I stand by the suggestion I made about the resizing logic, but it shouldn't be a showstopper either. We can improve that later. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 13:05:57 2008 From: report at bugs.python.org (Martin McNickle) Date: Tue, 06 May 2008 11:05:57 +0000 Subject: [issue2756] urllib2 add_header fails with existing unredirected_header In-Reply-To: <1209913898.38.0.175541514636.issue2756@psf.upfronthosting.co.za> Message-ID: <1210071957.76.0.70307306161.issue2756@psf.upfronthosting.co.za> Martin McNickle added the comment: I decided that the user should have full control over the headers sent. Any call to add_header() or add_redirected_header() will now check if a header with that same name has been set in the Request before (in both the header and the unredirected header dictionaries), and if so overwrite it. The tests run fine with the patch installed, and also included is a patch for the urllib2 documentation. ---------- keywords: +patch Added file: http://bugs.python.org/file10200/add_header_complete.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 13:10:26 2008 From: report at bugs.python.org (Martin McNickle) Date: Tue, 06 May 2008 11:10:26 +0000 Subject: [issue2756] urllib2 add_header fails with existing unredirected_header In-Reply-To: <1209913898.38.0.175541514636.issue2756@psf.upfronthosting.co.za> Message-ID: <1210072226.78.0.996742423622.issue2756@psf.upfronthosting.co.za> Changes by Martin McNickle : Removed file: http://bugs.python.org/file10200/add_header_complete.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 13:11:17 2008 From: report at bugs.python.org (Martin McNickle) Date: Tue, 06 May 2008 11:11:17 +0000 Subject: [issue2756] urllib2 add_header fails with existing unredirected_header In-Reply-To: <1209913898.38.0.175541514636.issue2756@psf.upfronthosting.co.za> Message-ID: <1210072277.49.0.951817640601.issue2756@psf.upfronthosting.co.za> Changes by Martin McNickle : Added file: http://bugs.python.org/file10201/add_header_complete.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 13:43:46 2008 From: report at bugs.python.org (atsuo ishimoto) Date: Tue, 06 May 2008 11:43: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: <1210074226.08.0.789014385682.issue2630@psf.upfronthosting.co.za> atsuo ishimoto added the comment: > No need to change anything, the diff is just too big for the code > review tool (Rietveld), but since it consists only of numbers we don't > need to review it anyway. :) I wonder why unicodename_db.h have not updated after makeunicodedata.py was modified. If new makeunicodedata.py breaks something, I should remove the chage to unicodename_db.h from this patch (My patch works whether unicodename_db.h is updated or not.). I'll post a question to python-3000 list. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 14:21:46 2008 From: report at bugs.python.org (Martin McNickle) Date: Tue, 06 May 2008 12:21:46 +0000 Subject: [issue2275] urllib2 header capitalization In-Reply-To: <1205270540.47.0.336665756101.issue2275@psf.upfronthosting.co.za> Message-ID: <1210076506.46.0.590277446088.issue2275@psf.upfronthosting.co.za> Martin McNickle added the comment: This looks good. I would suggest that the unredirected_hdrs would use the CaseInsensitiveDict too. There is still the problem (from the test documentation) that accessing .headers directly will only show a subset of headers i.e. it won't show any headers from .unredirected_hdrs. Have you any suggestions as to how they both can be accessed from the same interface? The test documentation also says: "Note the case normalization of header names here, to .capitalize()-case. This should be preserved for backwards-compatibility. (In the HTTP case, normalization to .title()-case is done by urllib2 before sending headers to httplib)." It suggests that capitalize() should be kept for backwards compatibility. I have tested and the headers actually sent to the server are in title()-case even though they are stored in the Request object as captitalize()-case. This would initially suggest that the case-normalization should be removed from the patch. However, as .headers would now be using a case-insensitive dictionary, this would still ensure backwards compatibily. ---------- nosy: +BitTorment __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 15:21:21 2008 From: report at bugs.python.org (Eric Smith) Date: Tue, 06 May 2008 13:21:21 +0000 Subject: [issue2598] "{ +(}".format(**{' +(': 44}) should produce ValueError: invalid identifier, ' +(' in format In-Reply-To: <1207683524.11.0.610086195192.issue2598@psf.upfronthosting.co.za> Message-ID: <1210080081.04.0.477255088497.issue2598@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- assignee: -> eric.smith nosy: +eric.smith __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 15:52:04 2008 From: report at bugs.python.org (Christian Heimes) Date: Tue, 06 May 2008 13:52:04 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1210081924.63.0.681402816077.issue2750@psf.upfronthosting.co.za> Christian Heimes added the comment: The Python 3.0 port is going to be tricky. Can somebody with more knowledge about the code please annotate which methods accept/return bytes and/or unicode? __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 15:54:07 2008 From: report at bugs.python.org (Eric Smith) Date: Tue, 06 May 2008 13:54:07 +0000 Subject: [issue1588] str.format() wrongly formats complex() numbers (Py30a2) In-Reply-To: <1197379851.58.0.0476028374566.issue1588@psf.upfronthosting.co.za> Message-ID: <1210082047.99.0.351183304044.issue1588@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 16:14:11 2008 From: report at bugs.python.org (Eric Smith) Date: Tue, 06 May 2008 14:14:11 +0000 Subject: [issue2772] Add PendingDeprecationWarning for % formatting In-Reply-To: <1210083250.98.0.889504486731.issue2772@psf.upfronthosting.co.za> Message-ID: <1210083250.98.0.889504486731.issue2772@psf.upfronthosting.co.za> New submission from Eric Smith : Per http://mail.python.org/pipermail/python-3000/2008-April/013094.html, add a PendingDeprecationWarning to 3.0 for % formatting. The attached patch implements this for 3.0. For 2.6, it should only be a PendingDeprecationWarning if -3 warnings are turned on. I'll work on that after the 3.0 patch is accepted. I'm not wild about using a global variable to disallow recursion, but it's probably the way to go. Question: Do I need to acquire the GIL here? Another issue is that the interpreter should probably at least start up without triggering these warnings. I'll add an issue for that at a later date. ---------- assignee: eric.smith components: Interpreter Core files: percent_formatting_pending_deprecation.diff keywords: easy, patch, patch messages: 66313 nosy: eric.smith priority: normal severity: normal status: open title: Add PendingDeprecationWarning for % formatting versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10202/percent_formatting_pending_deprecation.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 16:48:31 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 06 May 2008 14:48:31 +0000 Subject: [issue2772] Add PendingDeprecationWarning for % formatting In-Reply-To: <1210083250.98.0.889504486731.issue2772@psf.upfronthosting.co.za> Message-ID: <1210085311.62.0.917703691704.issue2772@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > Do I need to acquire the GIL here? No, the GIL has already been acquired. The problem with the static variable is that while the main thread is PyErr_WarnEx(), another thread may gain focus. And it will not trigger the warning. ---------- nosy: +amaury.forgeotdarc __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 16:52:24 2008 From: report at bugs.python.org (Bob Ippolito) Date: Tue, 06 May 2008 14:52:24 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1210085543.77.0.263029907178.issue2750@psf.upfronthosting.co.za> Bob Ippolito added the comment: loads will take unicode or str. if it's str then it assumes utf-8, otherwise the explicitly specified encoding. All of the string instances generated by loads will be unicode objects (some of them may be str objects if they're all ASCII as an optimization, I'm not sure if I implemented that or not). dumps produces an ASCII str, but if you explicitly specify ensure_ascii=False then it will return a unicode object. obviously load and dump will be working on a file-like object so should be dealing with bytes... I'm not entirely sure whether semantically dumps should produce bytes or str in py3k, I guess whatever the other text-based encodings do is appropriate (e.g. base64, mime). __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 16:55:35 2008 From: report at bugs.python.org (Eric Smith) Date: Tue, 06 May 2008 14:55:35 +0000 Subject: [issue2772] Add PendingDeprecationWarning for % formatting In-Reply-To: <1210083250.98.0.889504486731.issue2772@psf.upfronthosting.co.za> Message-ID: <1210085735.05.0.954899390137.issue2772@psf.upfronthosting.co.za> Eric Smith added the comment: Right. But is it worth adding per-thread machinery to this? I was going to do that, but it seemed like overkill. Upon further reflection, however, I think you may be right. I'll remove the "easy" keyword! ---------- keywords: -easy __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 18:28:05 2008 From: report at bugs.python.org (Tim Lesher) Date: Tue, 06 May 2008 16:28:05 +0000 Subject: [issue1674032] Make threading.Event().wait(timeout=3) return isSet Message-ID: <1210091285.06.0.686623637937.issue1674032@psf.upfronthosting.co.za> Tim Lesher added the comment: This one-line change to threading.py makes Event.wait() return isSet(). Also includes the corresponding update to documentation in threading.rst. ---------- keywords: +patch nosy: +tlesher Added file: http://bugs.python.org/file10203/event-wait-retval.diff _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 6 18:28:46 2008 From: report at bugs.python.org (=?utf-8?q?Artur_Zaprza=C5=82a?=) Date: Tue, 06 May 2008 16:28:46 +0000 Subject: [issue2773] Wrong description of 'g' conversion type of string formatting operator % In-Reply-To: <1210091326.8.0.357572062479.issue2773@psf.upfronthosting.co.za> Message-ID: <1210091326.8.0.357572062479.issue2773@psf.upfronthosting.co.za> New submission from Artur Zaprza?a : Description of 'g' and 'G' conversion types of string formatting operator at http://www.python.org/doc/2.5.2/lib/typesseq-strings.html is: Floating point format. Uses exponential format if exponent is greater than -4 or less than precision, decimal format otherwise. Should be: Floating point format. Uses exponential format if exponent is less than -4 or not less than precision, decimal format otherwise. ---------- assignee: georg.brandl components: Documentation messages: 66318 nosy: georg.brandl, zybi severity: normal status: open title: Wrong description of 'g' conversion type of string formatting operator % versions: Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5, Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 18:38:38 2008 From: report at bugs.python.org (Bill Janssen) Date: Tue, 06 May 2008 16:38:38 +0000 Subject: [issue2774] ctypes documentation not effective In-Reply-To: <1210091918.21.0.990068864292.issue2774@psf.upfronthosting.co.za> Message-ID: <1210091918.21.0.990068864292.issue2774@psf.upfronthosting.co.za> New submission from Bill Janssen : Once again I'm reading through the ctypes documentation and finding it wildly confusing/contradictory. For instance, there's no discussion of how ctypes types interact with malloc and free. The tutorial section is discursive and rambling. The type "c_size_t" isn't mentioned in the section labelled "Fundamental Data Types", but does show up in another section also labelled "Fundamental Data Types". The "reference" doesn't document the use of pointers or arrays. I find it hard to see how anyone who doesn't read the ctypes code (several times) could find out how to use it from the documentation. I'd suggest getting rid of the Tutorial section, moving it to a standalone document somewhere, and finishing the writing of the Reference section. Adding a chapter discussing when to use ctypes and when to use the C API might also be a good idea. ---------- assignee: georg.brandl components: Documentation messages: 66319 nosy: georg.brandl, janssen priority: normal severity: normal status: open title: ctypes documentation not effective type: performance versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 18:43:17 2008 From: report at bugs.python.org (Tim Lesher) Date: Tue, 06 May 2008 16:43:17 +0000 Subject: [issue1674032] Make threading.Event().wait(timeout=3) return isSet Message-ID: <1210092197.59.0.825877498249.issue1674032@psf.upfronthosting.co.za> Changes by Tim Lesher : ---------- assignee: -> georg.brandl components: +Documentation, Library (Lib) -Interpreter Core nosy: +georg.brandl _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 6 18:46:43 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 06 May 2008 16:46:43 +0000 Subject: [issue2774] ctypes documentation not effective In-Reply-To: <1210091918.21.0.990068864292.issue2774@psf.upfronthosting.co.za> Message-ID: <1210092403.73.0.13564437512.issue2774@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: georg.brandl -> theller nosy: +theller __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 19:10:32 2008 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 06 May 2008 17:10:32 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <48201630.9020602@egenix.com> Message-ID: Guido van Rossum added the comment: On Tue, May 6, 2008 at 1:26 AM, Marc-Andre Lemburg wrote: > So you've limited the codec design to just doing Unicode<->bytes > conversions ? Yes. This was quite a conscious decision that was not taken lightly, with lots of community input, quite a while ago. > The original codec design was to have the codec decide which > types to take on input and to generate on output, e.g. to > escape characters in Unicode (converting Unicode to Unicode), > work on compressed 8-bit strings (converting 8-bit strings to > 8-bit strings), etc. Unfortunately this design made it hard to reason about the correctness of code, since (especially in Py3k, where bytes and str are more different than str and unicode were in 2.x) it's hard to write code that uses .encode() or .decode() unless it knows which codec is being used. IOW, when translated to 3.0, the design violates the general design principle that the *type* of a function's or method's return value should not depend on the *value* of one of the arguments. > >> I think you have to ask another question: Is repr() allowed to > >> return a string (instead of Unicode) in Py3k ? > > > > In Py3k, "strings" *are* unicode. The str data type is Unicode. > > With "strings" I always refer to 8-bit strings, ie. 8-bit data that > is encoded in some encoding. You will have to change this habit or you will thoroughly confuse both users and developers of 3.0. "String" refers to the built-in "str" type which in Py3k is PyUnicode. For the PyString type we use the built-in type "bytes". > > If you're asking about repr() possibly returning a bytes instance, > > definitely not. > > > >> If not, then unicode_repr() will have to check the return value of > >> the codec and convert it back to Unicode as necessary. > > > > What codec? > > The idea is to have a codec which takes the Unicode object and > converts it to its repr()-value. > > Now, since you apparently cannot > go the direct way anymore (ie. have the codec encode Unicode to > Unicode), you'd have to first use a codec which converts the Unicode > object to its repr()-value represented as bytes object and then > convert the bytes object back to Unicode in unicode_repr(). > > With the original design, this extra step wouldn't have been > necessary. Why does everything have to be a codec? __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 19:11:53 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 06 May 2008 17:11:53 +0000 Subject: [issue2773] Wrong description of 'g' conversion type of string formatting operator % In-Reply-To: <1210091326.8.0.357572062479.issue2773@psf.upfronthosting.co.za> Message-ID: <1210093913.82.0.592547802603.issue2773@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r62774. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 19:18:38 2008 From: report at bugs.python.org (=?utf-8?q?Artur_Zaprza=C5=82a?=) Date: Tue, 06 May 2008 17:18:38 +0000 Subject: [issue2773] Wrong description of 'g' conversion type of string formatting operator % In-Reply-To: <1210091326.8.0.357572062479.issue2773@psf.upfronthosting.co.za> Message-ID: <1210094318.63.0.403363715607.issue2773@psf.upfronthosting.co.za> Artur Zaprza?a added the comment: The fix is wrong. not less == greater than or equal to __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 19:21:12 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 06 May 2008 17:21:12 +0000 Subject: [issue2773] Wrong description of 'g' conversion type of string formatting operator % In-Reply-To: <1210091326.8.0.357572062479.issue2773@psf.upfronthosting.co.za> Message-ID: <1210094471.68.0.410997948018.issue2773@psf.upfronthosting.co.za> Georg Brandl added the comment: Argh, fixed in r62775. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 19:22:05 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 06 May 2008 17:22:05 +0000 Subject: [issue1674032] Make threading.Event().wait(timeout=3) return isSet Message-ID: <1210094525.58.0.768307990239.issue1674032@psf.upfronthosting.co.za> Georg Brandl added the comment: Tim, you said this was a bad idea for conditions in #1175933 - is the same true for Events? ---------- assignee: georg.brandl -> tim_one nosy: +tim_one _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 6 20:06:57 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 06 May 2008 18:06:57 +0000 Subject: [issue1751] Fast BytesIO implementation + misc changes In-Reply-To: <1199690432.25.0.839683390385.issue1751@psf.upfronthosting.co.za> Message-ID: <1210097216.84.0.910965212695.issue1751@psf.upfronthosting.co.za> Brett Cannon added the comment: Alexandre, you have until the end of the week to commit it or someone else will. =) I don't want this going in so close to the alphas, but it should go in almost immediately afterwards. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 20:11:10 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 06 May 2008 18:11:10 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> New submission from Brett Cannon : This is to keep track of who is working on what for PEP 3108 (http://www.python.org/dev/peps/pep-3108/). Once something is complete it should be denoted in the PEP itself, so always check the PEP to see what is left to be done (for both 2.6 and 3.0). ---------- components: Library (Lib) messages: 66326 nosy: brett.cannon priority: critical severity: normal status: open title: Implement PEP 3108 type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 20:11:27 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 06 May 2008 18:11:27 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210097487.52.0.456366626656.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 20:15:06 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 May 2008 18:15:06 +0000 Subject: [issue1751] Fast BytesIO implementation + misc changes In-Reply-To: <1199690432.25.0.839683390385.issue1751@psf.upfronthosting.co.za> Message-ID: <1210097706.23.0.581570780849.issue1751@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, is someone already working on a C-accelerated TextIO? __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 21:28:51 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 06 May 2008 19:28:51 +0000 Subject: [issue2523] binary buffered reading is quadratic In-Reply-To: <1206987085.65.0.944826780657.issue2523@psf.upfronthosting.co.za> Message-ID: <1210102131.95.0.63677450062.issue2523@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- nosy: +alexandre.vassalotti __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 22:03:17 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 06 May 2008 20:03:17 +0000 Subject: [issue1751] Fast BytesIO implementation + misc changes In-Reply-To: <1199690432.25.0.839683390385.issue1751@psf.upfronthosting.co.za> Message-ID: <1210104197.24.0.440097948413.issue1751@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Patch committed in r62778. Antoine wrote: > Also, I stand by the suggestion I made about the resizing logic, but it > shouldn't be a showstopper either. We can improve that later. I made your suggested change to the resizing logic. Thanks again for the review! > By the way, is someone already working on a C-accelerated TextIO? Yes. I was waiting to commit the C optimization for io.BytesIO, before continuing the one for io.StringIO. The implementation is mostly done---it just needs to be updated with respect to the recent changes to TextIO. ---------- assignee: -> alexandre.vassalotti resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 22:08:07 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 06 May 2008 20:08:07 +0000 Subject: [issue1779700] urlparse.urljoin does not obey current uri rfc (rfc 3986) Message-ID: <1210104487.53.0.0730443299003.issue1779700@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing then. ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> update urlparse to RFC 3986 _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 6 22:12:03 2008 From: report at bugs.python.org (Jeremy Hylton) Date: Tue, 06 May 2008 20:12:03 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210104723.27.0.730079378901.issue2775@psf.upfronthosting.co.za> Jeremy Hylton added the comment: I'm working on the new urllib package. ---------- nosy: +jhylton __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 22:13:59 2008 From: report at bugs.python.org (Christian Heimes) Date: Tue, 06 May 2008 20:13:59 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1210104839.45.0.646749405142.issue2750@psf.upfronthosting.co.za> Christian Heimes added the comment: Since dumps and loads deal with raw data they should accept/return bytes, too. I'm re-adding 2.6 as version again because I believe we should clean up the API in 2.6 first. It's also a good chance to document how to port a library to Python 2.6 and 3.0. *wink* ---------- versions: +Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 22:18:03 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 06 May 2008 20:18:03 +0000 Subject: [issue2152] make sqlite.Row hashable correctly In-Reply-To: <1203590912.21.0.769567830293.issue2152@psf.upfronthosting.co.za> Message-ID: <1210105083.92.0.739315863191.issue2152@psf.upfronthosting.co.za> Georg Brandl added the comment: Can this be closed? ---------- nosy: +georg.brandl __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 22:26:32 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 06 May 2008 20:26:32 +0000 Subject: [issue1591035] update urlparse to RFC 3986 Message-ID: <1210105592.35.0.971924873938.issue1591035@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> jhylton nosy: +jhylton _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 6 23:16:25 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 06 May 2008 21:16:25 +0000 Subject: [issue2772] Add PendingDeprecationWarning for % formatting In-Reply-To: <1210083250.98.0.889504486731.issue2772@psf.upfronthosting.co.za> Message-ID: <1210108585.3.0.180488086365.issue2772@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Would it be practical to add a _PyErr_InErrorProcessing function to prevent recursion? ---------- nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 23:30:16 2008 From: report at bugs.python.org (Ambarish Malpani) Date: Tue, 06 May 2008 21:30:16 +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: <1210109415.44.0.221361539235.issue2776@psf.upfronthosting.co.za> New submission from Ambarish Malpani : Try the following code: import urllib import urllib2 url = 'http://features.us.reuters.com//autos/news/95ED98EE-A837-11DC-BCB3-4F218271.html' data = urllib.urlopen(url).read() data2 = urllib2.urlopen(url).read() The attempt to get it with urllib works fine. With urllib2, the request is malformed and I get back a HTTP 404 Request in the 2nd case is: GET //autos/news/95ED98EE-A837-11DC-BCB3-4F218271.html HTTP/1.1\r\n Accept-Encoding: identity\r\n Host: autos\r\n Connection: close\r\n .... The host line seems to be looking for the last // rather than the first. ---------- components: Extension Modules messages: 66334 nosy: ambarish severity: normal status: open title: urllib2.urlopen() gets confused with path with // in it type: behavior versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 23:33:34 2008 From: report at bugs.python.org (Ambarish Malpani) Date: Tue, 06 May 2008 21:33:34 +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: <1210109614.03.0.397345379597.issue2776@psf.upfronthosting.co.za> Ambarish Malpani added the comment: Sorry, should have added another line: The reason this is important to fix, is I am getting that URL with a // in a Moved (HTTP 302) message, so I can't just get rid of the // __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 23:50:11 2008 From: report at bugs.python.org (Eric Smith) Date: Tue, 06 May 2008 21:50:11 +0000 Subject: [issue2772] Add PendingDeprecationWarning for % formatting In-Reply-To: <1210083250.98.0.889504486731.issue2772@psf.upfronthosting.co.za> Message-ID: <1210110611.23.0.959001741141.issue2772@psf.upfronthosting.co.za> Eric Smith added the comment: Since we're just trying to prevent this function from recursing (indirectly) into itself, I think all of the logic can go here. What would you suggest the function _PyErr_InErrorProcessing do differently? I think the real issue is: Does the additional logic and execution time involved in adding per-thread state justify being "more correct", or can we occasionally lose a warning message? __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 6 23:58:52 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 06 May 2008 21:58:52 +0000 Subject: [issue2772] Add PendingDeprecationWarning for % formatting In-Reply-To: <1210110611.23.0.959001741141.issue2772@psf.upfronthosting.co.za> Message-ID: <1afaf6160805061458k3b85ef41ld276b53de15ea3ca@mail.gmail.com> Benjamin Peterson added the comment: On Tue, May 6, 2008 at 4:50 PM, Eric Smith wrote: > > Eric Smith added the comment: > > Since we're just trying to prevent this function from recursing > (indirectly) into itself, I think all of the logic can go here. > > What would you suggest the function _PyErr_InErrorProcessing do differently? I was just thinking that this problem would probably come up again. > I think the real issue is: Does the additional logic and execution time > involved in adding per-thread state justify being "more correct", or can > we occasionally lose a warning message? Well, the first thing to check for is Py_Py3kWarning. Then do the extra logic and execution speed. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 00:54:57 2008 From: report at bugs.python.org (Tom Pinckney) Date: Tue, 06 May 2008 22:54:57 +0000 Subject: [issue2637] urllib.quote() escapes characters unnecessarily and contrary to docs In-Reply-To: <1208272151.95.0.897886992301.issue2637@psf.upfronthosting.co.za> Message-ID: <1210114497.74.0.820140532546.issue2637@psf.upfronthosting.co.za> Tom Pinckney added the comment: It also looks like urllib.quote (and quote_plus) do not properly handle unicode strings. urllib.urlencode() properly converts unicode strings to utf-8 encoded ascii strings before then calling urllib.quote() on them. ---------- nosy: +thomaspinckney3 __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 00:59:35 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 06 May 2008 22:59:35 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210114775.93.0.360508406551.issue2775@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm working on removing mac modules. ---------- nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 01:02:57 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 06 May 2008 23:02:57 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210114977.23.0.430155495683.issue2775@psf.upfronthosting.co.za> Brett Cannon added the comment: I am working on audiodev to get the basic structure of removals worked out (testing infrastructure, etc.). __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 01:12:03 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 06 May 2008 23:12:03 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210115523.0.0.0295760752343.issue2775@psf.upfronthosting.co.za> Brett Cannon added the comment: For the TextMate users, I am going to be checking in a Python-Dev bundle into svn soon which will include a command to insert the warnpy3k() call for module deletions. Might want to wait for that if you want to cut out at least one copy-and-paste step. =) __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 01:22:12 2008 From: report at bugs.python.org (Martin McNickle) Date: Tue, 06 May 2008 23:22:12 +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: <1210116132.51.0.133133375194.issue2776@psf.upfronthosting.co.za> Martin McNickle added the comment: The problem lines are in AbstractHTTPHandler.do_request(): scheme, sel = splittype(request.get_selector()) sel_host, sel_path = splithost(sel) if not request.has_header('Host'): request.add_unredirected_header('Host', sel_host or host) When there is a double '/' sel is something like '//path/to/resource'. splithost(sel) then gives ('path', '/to/resource'). Therefore the header 'Host' gets set to 'path'. I don't understand why sel_host is used in preference for host. host holds the correct value, even with the double slashes. Could someone explain why sel_host is used at all? ---------- nosy: +BitTorment __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 01:22:28 2008 From: report at bugs.python.org (Martin McNickle) Date: Tue, 06 May 2008 23:22:28 +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: <1210116148.45.0.211123315757.issue2776@psf.upfronthosting.co.za> Changes by Martin McNickle : ---------- components: +Library (Lib) -Extension Modules versions: +Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 01:26:08 2008 From: report at bugs.python.org (Collin Winter) Date: Tue, 06 May 2008 23:26:08 +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: <1210116368.56.0.988646977742.issue2507@psf.upfronthosting.co.za> Collin Winter added the comment: Looks good to me. Antoine, do you have commit privileges? __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 01:30:17 2008 From: report at bugs.python.org (Collin Winter) Date: Tue, 06 May 2008 23:30:17 +0000 Subject: [issue2370] operator.{isCallable,sequenceIncludes} needs a fixer In-Reply-To: <1205784272.93.0.866002228926.issue2370@psf.upfronthosting.co.za> Message-ID: <1210116616.93.0.332807993503.issue2370@psf.upfronthosting.co.za> Collin Winter added the comment: I believe you forgot to add fix_operator.py to this patch. ---------- components: +Build, Demos and Tools, Distutils, Documentation, Documentation tools (Sphinx), Extension Modules, IDLE, Installation, Interpreter Core, Library (Lib), Macintosh, Regular Expressions, Tests, Tkinter, Unicode, Windows, XML, ctypes __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 01:32:52 2008 From: report at bugs.python.org (Collin Winter) Date: Tue, 06 May 2008 23:32:52 +0000 Subject: [issue2370] operator.{isCallable,sequenceIncludes} needs a fixer In-Reply-To: <1205784272.93.0.866002228926.issue2370@psf.upfronthosting.co.za> Message-ID: <1210116772.48.0.752560483087.issue2370@psf.upfronthosting.co.za> Changes by Collin Winter : ---------- components: -Build, Demos and Tools, Distutils, Documentation, Documentation tools (Sphinx), IDLE, Installation, Interpreter Core, Library (Lib), Macintosh, Regular Expressions, Tests, Tkinter, Unicode, Windows, XML, ctypes __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 01:36:58 2008 From: report at bugs.python.org (Eric Smith) Date: Tue, 06 May 2008 23:36:58 +0000 Subject: [issue2772] Add PendingDeprecationWarning for % formatting In-Reply-To: <1210083250.98.0.889504486731.issue2772@psf.upfronthosting.co.za> Message-ID: <1210117018.04.0.855596183649.issue2772@psf.upfronthosting.co.za> Eric Smith added the comment: > Well, the first thing to check for is Py_Py3kWarning. Then do the > extra logic and execution speed. In 3.0, it's always a PendingDeprecationWarning, so that won't work. The test needs to be: if not recursing and warning_is_not_suppressed: warn() The recursion test is expensive if using thread local storage; the warning suppressed test looks expensive, too. So there's no quick short circuit test that I see. Of course all of this is just hot air until coded and benchmarked. I'll cook up a patch, but it will probably not be ready before the next alpha releases. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 01:40:55 2008 From: report at bugs.python.org (Christian Heimes) Date: Tue, 06 May 2008 23:40:55 +0000 Subject: [issue2777] subprocess unit tests for kill, term and send_signal flaky In-Reply-To: <1210117255.49.0.763796854564.issue2777@psf.upfronthosting.co.za> Message-ID: <1210117255.49.0.763796854564.issue2777@psf.upfronthosting.co.za> New submission from Christian Heimes : The unit tests for the kill, term and send_signal methods of the subprocess.Popen object are still flaky and sometimes cause the test suite to hang. I'm going to disable them for the upcoming alpha until I've found a better solution. ---------- assignee: christian.heimes components: Tests messages: 66347 nosy: christian.heimes priority: critical severity: normal status: open title: subprocess unit tests for kill, term and send_signal flaky type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 01:55:14 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 06 May 2008 23:55:14 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210118114.21.0.808780785886.issue2775@psf.upfronthosting.co.za> Brett Cannon added the comment: If you use TextMate, get the Python-Dev bundle and use the command in there to insert the deprecation boilerplate for removing a module. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 01:55:27 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 06 May 2008 23:55:27 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210118127.45.0.185328996778.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- keywords: +easy __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 04:19:32 2008 From: report at bugs.python.org (Adam Olsen) Date: Wed, 07 May 2008 02:19:32 +0000 Subject: [issue2778] set_swap_bodies is unsafe In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za> Message-ID: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za> New submission from Adam Olsen : set_swap_bodies() is used to cheaply create a frozenset from a set, which is then used for lookups within a set. It does this by creating a temporary empty frozenset, swapping its contents with the original set, doing the lookup using the frozenset, then swapping the contents back and releasing the temporary frozenset. Unfortunately, the lookup can invoke arbitrary code, which may examine the original set and find it empty (until the lookup completes). The lookup may also save a reference to the temporary frozenset, which mutates to being empty after the lookup completes. The purpose seems to be allowing "someset in someotherset" to automatically convert someset to a frozenset. A brief search didn't reveal a rationale for this, and in fact PEP 218's history section claims the opposite: "Auto-conversion between mutable and immutable sets was dropped." Perhaps this is a forgotten vestige of that? set_intersection_update uses set_swap_bodies for a different purpose and it may be safe. It depends on whether subclasses of set may retain a reference to the tmp set somehow. ---------- files: brokensetswap.py messages: 66349 nosy: Rhamphoryncus severity: normal status: open title: set_swap_bodies is unsafe type: behavior Added file: http://bugs.python.org/file10204/brokensetswap.py __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 04:36:54 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 07 May 2008 02:36:54 +0000 Subject: [issue2778] set_swap_bodies is unsafe In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za> Message-ID: <1210127814.53.0.567144583058.issue2778@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> rhettinger nosy: +rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 06:03:32 2008 From: report at bugs.python.org (Neal Norwitz) Date: Wed, 07 May 2008 04:03:32 +0000 Subject: [issue2772] Add PendingDeprecationWarning for % formatting In-Reply-To: <1210083250.98.0.889504486731.issue2772@psf.upfronthosting.co.za> Message-ID: <1210133012.39.0.648396690911.issue2772@psf.upfronthosting.co.za> Neal Norwitz added the comment: Why not use the normal recursion check mechanism? Specifically, if (Py_EnterRecursiveCall("unicode % ")) return NULL; // err = Warn(); Py_LeaveRecursiveCall(); I don't see where the problem with threads comes in. The GIL is held and shouldn't be released during this call. That may not be quite true (it's conceivable the GIL is released when warning). I'm not sure what happens with the I/O system at this point, it's possible that releases the GIL. However, if GIL is released and re-acquired in PyWarn_WarnEx() there are probably bigger issues than this patch that will need to be addressed. Note that since the warnings module is now implemented in C, this should be easier to deal with. Using the macros above in essence uses TLS, but through Python's PyThreadState. ---------- nosy: +nnorwitz __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 07:01:41 2008 From: report at bugs.python.org (Jeff Balogh) Date: Wed, 07 May 2008 05:01:41 +0000 Subject: [issue2370] operator.{isCallable,sequenceIncludes} needs a fixer In-Reply-To: <1205784272.93.0.866002228926.issue2370@psf.upfronthosting.co.za> Message-ID: <1210136501.04.0.936372265597.issue2370@psf.upfronthosting.co.za> Changes by Jeff Balogh : Removed file: http://bugs.python.org/file9779/issue2370.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 07:04:25 2008 From: report at bugs.python.org (Jeff Balogh) Date: Wed, 07 May 2008 05:04:25 +0000 Subject: [issue2370] operator.{isCallable,sequenceIncludes} needs a fixer In-Reply-To: <1205784272.93.0.866002228926.issue2370@psf.upfronthosting.co.za> Message-ID: <1210136665.52.0.718808568442.issue2370@psf.upfronthosting.co.za> Jeff Balogh added the comment: doh! Attaching a new patch that actually contains a fixer. Added file: http://bugs.python.org/file10205/issue2370.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 07:22:55 2008 From: report at bugs.python.org (Jeff Balogh) Date: Wed, 07 May 2008 05:22:55 +0000 Subject: [issue2370] operator.{isCallable,sequenceIncludes} needs a fixer In-Reply-To: <1205784272.93.0.866002228926.issue2370@psf.upfronthosting.co.za> Message-ID: <1210137775.3.0.865817102059.issue2370@psf.upfronthosting.co.za> Changes by Jeff Balogh : Removed file: http://bugs.python.org/file9787/operator-warnings.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 07:25:00 2008 From: report at bugs.python.org (Jeff Balogh) Date: Wed, 07 May 2008 05:25:00 +0000 Subject: [issue2370] operator.{isCallable,sequenceIncludes} needs a fixer In-Reply-To: <1205784272.93.0.866002228926.issue2370@psf.upfronthosting.co.za> Message-ID: <1210137900.65.0.659524936361.issue2370@psf.upfronthosting.co.za> Jeff Balogh added the comment: Updating the deprecation warnings patch to use PyErr_WarnPy3k and apply correctly against current trunk. Added file: http://bugs.python.org/file10206/operator-warnings.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 10:11:07 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 07 May 2008 08:11:07 +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: <1210147867.33.0.695605979735.issue2507@psf.upfronthosting.co.za> Antoine Pitrou added the comment: No, I don't. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 13:35:15 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 07 May 2008 11:35:15 +0000 Subject: [issue2521] ABC caches should use weak refs In-Reply-To: <1206976350.45.0.982533625998.issue2521@psf.upfronthosting.co.za> Message-ID: <1210160115.28.0.327987440629.issue2521@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +pitrou __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 13:58:52 2008 From: report at bugs.python.org (Tim Pietzcker) Date: Wed, 07 May 2008 11:58:52 +0000 Subject: [issue2779] Python 3.0a4 crashes on script in a path with non-ASCII characters (Windows) In-Reply-To: <1210161524.54.0.447554475094.issue2779@psf.upfronthosting.co.za> Message-ID: <1210161524.54.0.447554475094.issue2779@psf.upfronthosting.co.za> New submission from Tim Pietzcker : When I try to run a script that is contained in a directory whose path contains non-ASCII characters (e. g. Umlauts), Python 3.0a4 crashes with the following error message: (Windows cmd console): E:\Eigene Dateien\Klinikum\Qualit?tsmanagement\Qualit?tsbericht 2007>c:\programme\python30\python zaehle_aerzte.py Fatal Python error: no mem for sys.path insertion UnicodeDecodeError: 'utf8' codec can't decode bytes in position 33-35: invalid data This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Moving the script to a directory without Umlauts in the path "solves" the problem ---------- components: Windows messages: 66354 nosy: pietzcker severity: normal status: open title: Python 3.0a4 crashes on script in a path with non-ASCII characters (Windows) versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 13:59:08 2008 From: report at bugs.python.org (Tim Pietzcker) Date: Wed, 07 May 2008 11:59:08 +0000 Subject: [issue2780] Python 3.0a4 crashes on script in a path with non-ASCII characters (Windows) In-Reply-To: <1210161548.39.0.205186069105.issue2780@psf.upfronthosting.co.za> Message-ID: <1210161548.39.0.205186069105.issue2780@psf.upfronthosting.co.za> New submission from Tim Pietzcker : Apologies if this has been reported before; I couldn#T find it on a search but maybe I used the wrong search terms. When I try to run a script that is contained in a directory whose path contains non-ASCII characters (e. g. Umlauts), Python 3.0a4 crashes with the following error message: (Windows cmd console): E:\Eigene Dateien\Klinikum\Qualit?tsmanagement\Qualit?tsbericht 2007>c:\programme\python30\python zaehle_aerzte.py Fatal Python error: no mem for sys.path insertion UnicodeDecodeError: 'utf8' codec can't decode bytes in position 33-35: invalid data This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Moving the script to a directory without Umlauts in the path "solves" the problem. Best regards, Tim ---------- components: Windows messages: 66355 nosy: pietzcker severity: normal status: open title: Python 3.0a4 crashes on script in a path with non-ASCII characters (Windows) versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 14:00:51 2008 From: report at bugs.python.org (Tim Pietzcker) Date: Wed, 07 May 2008 12:00:51 +0000 Subject: [issue2779] Python 3.0a4 crashes on script in a path with non-ASCII characters (Windows) In-Reply-To: <1210161524.54.0.447554475094.issue2779@psf.upfronthosting.co.za> Message-ID: <1210161651.02.0.756544873748.issue2779@psf.upfronthosting.co.za> Tim Pietzcker added the comment: Please delete this issue - clicked on "Submit" too soon. Sorry again. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 14:02:42 2008 From: report at bugs.python.org (Brad Miller) Date: Wed, 07 May 2008 12:02:42 +0000 Subject: [issue2610] string representation of range and dictionary views In-Reply-To: <1207858708.98.0.537185652213.issue2610@psf.upfronthosting.co.za> Message-ID: <1210161762.87.0.96533296288.issue2610@psf.upfronthosting.co.za> Brad Miller added the comment: Is there any chance this patch will make it into the latest alpha?? Brad __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 14:07:44 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 07 May 2008 12:07:44 +0000 Subject: [issue2778] set_swap_bodies is unsafe In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za> Message-ID: <1210162064.77.0.35714814408.issue2778@psf.upfronthosting.co.za> Raymond Hettinger added the comment: set_swap_bodies() is fine as it involves pure C with no possible callbacks. The issue is in its use in the __contains__() check. I'll take a look at it and see what if anything needs to be changed. Am lowering the priority because you really have to be trying to create this behavior. ---------- priority: -> low __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 16:35:13 2008 From: report at bugs.python.org (Tim Golden) Date: Wed, 07 May 2008 14:35:13 +0000 Subject: [issue2781] Tiny patch to _winreg docs In-Reply-To: <1210170913.28.0.4675266514.issue2781@psf.upfronthosting.co.za> Message-ID: <1210170913.28.0.4675266514.issue2781@psf.upfronthosting.co.za> New submission from Tim Golden : The docs for _winreg refer to RegLoadKey, which is the underlying API. The function is actually exposed as LoadKey. Patch attached. ---------- assignee: georg.brandl components: Documentation files: _winreg.patch keywords: patch messages: 66359 nosy: georg.brandl, tim.golden severity: normal status: open title: Tiny patch to _winreg docs versions: Python 2.6 Added file: http://bugs.python.org/file10207/_winreg.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 16:45:43 2008 From: report at bugs.python.org (Andrii V. Mishkovskyi) Date: Wed, 07 May 2008 14:45:43 +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: <1210171543.31.0.364893974178.issue2782@psf.upfronthosting.co.za> New submission from Andrii V. Mishkovskyi : datetime and date strftime() method does additional check on input format, thus being completely different from time's module time.strftime() method behavior. There are two ways to fix this: 1. Add an explicit note about this behavior (e.g., "only 'str' objects are allowed for format strings") in docs (section 5.1.7). 2. Allow 'unicode' objects for format strings (backport time.strftime() from 3.0?). Here is a traceback for a more complete overview: Python 2.6a2+ (trunk:62762, May 6 2008, 14:37:27) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from datetime import datetime, date >>> import time >>> uformat = u'%Y-%m-%D %H-%M-%S' >>> format = '%Y-%m-%D %H-%M-%S' >>> datetime.today().strftime(uformat) Traceback (most recent call last): File "", line 1, in TypeError: strftime() argument 1 must be str, not unicode >>> datetime.today().strftime(format) '2008-05-05/07/08 17-19-03' >>> time.strftime(uformat) '2008-05-05/07/08 17-19-10' >>> time.strftime(format) '2008-05-05/07/08 17-19-16' >>> date.today() datetime.date(2008, 5, 7) >>> date.today().strftime(format) '2008-05-05/07/08 00-00-00' >>> date.today().strftime(uformat) Traceback (most recent call last): File "", line 1, in TypeError: strftime() argument 1 must be str, not unicode ---------- components: Library (Lib) messages: 66360 nosy: mishok13 severity: normal status: open title: datetime/date strftime() method and time.strftime() inconsistency type: behavior versions: Python 2.5, Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 17:33:32 2008 From: report at bugs.python.org (Eric Smith) Date: Wed, 07 May 2008 15:33:32 +0000 Subject: [issue2772] Add PendingDeprecationWarning for % formatting In-Reply-To: <1210083250.98.0.889504486731.issue2772@psf.upfronthosting.co.za> Message-ID: <1210174411.83.0.986226476112.issue2772@psf.upfronthosting.co.za> Eric Smith added the comment: I'm not sure Py_EnterRecursiveCall is what I want, because that allows the recursion to happen, but just aborts it when it gets too deep. What I want to achieve is to have the warning not called if it's the warning that's being formatted. I coded this up and couldn't get it to do the right thing. I think a better approach will be to remove % formatting from warnings.py. I think that will remove the need for any checks at all. I'll investigate that. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 17:59:32 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 07 May 2008 15:59:32 +0000 Subject: [issue2779] Python 3.0a4 crashes on script in a path with non-ASCII characters (Windows) In-Reply-To: <1210161524.54.0.447554475094.issue2779@psf.upfronthosting.co.za> Message-ID: <1210175972.33.0.033716379663.issue2779@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 18:47:16 2008 From: report at bugs.python.org (Bill Janssen) Date: Wed, 07 May 2008 16:47:16 +0000 Subject: [issue2783] ctypes.util.find_library() doesn't find OS X .bundle or .so libraries In-Reply-To: <1210178835.82.0.184035684731.issue2783@psf.upfronthosting.co.za> Message-ID: <1210178835.82.0.184035684731.issue2783@psf.upfronthosting.co.za> New submission from Bill Janssen : On OS X, dynamically loadable libraries come in several flavors: .bundle (or, often, .so) a standard dynamically loadable module; .dylib, a dynamically loadable module that is also a library that can be linked against like a .a file; .framework, a collection of modules similar to a Python package. find_library() currently looks for .dylib and .framework libraries, but not for .bundle or .so libraries. ---------- assignee: theller components: Library (Lib) keywords: easy messages: 66362 nosy: janssen, theller priority: normal severity: normal status: open title: ctypes.util.find_library() doesn't find OS X .bundle or .so libraries type: behavior versions: Python 2.5, Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 19:51:12 2008 From: report at bugs.python.org (Adam Olsen) Date: Wed, 07 May 2008 17:51:12 +0000 Subject: [issue1348] httplib closes socket, then tries to read from it In-Reply-To: <1193532553.16.0.237482805264.issue1348@psf.upfronthosting.co.za> Message-ID: <1210182672.03.0.766520755148.issue1348@psf.upfronthosting.co.za> Changes by Adam Olsen : ---------- nosy: +Rhamphoryncus __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 20:11:55 2008 From: report at bugs.python.org (Adam Olsen) Date: Wed, 07 May 2008 18:11:55 +0000 Subject: [issue1856] shutdown (exit) can hang or segfault with daemon threads running In-Reply-To: <1200535276.53.0.276618350299.issue1856@psf.upfronthosting.co.za> Message-ID: <1210183915.75.0.0624230391664.issue1856@psf.upfronthosting.co.za> Adam Olsen added the comment: Cleaned up version of Amaury's patch. I stop releasing the GIL after sys.exitfunc is called, which protects threads from the ensuing teardown. I also grab the import lock (and never release it). This should prevent the nasty issue with daemon threads doing imports mentioned in issue 1720705, so that part of the documentation change can be removed. I didn't do any significant testing though. Importing raises a potential issue with this approach. The standard meme of "release GIL; grab lock; acquire GIL" becomes invalid. A child may grab the lock, then block on the GIL, while the main thread (which never releases the GIL) will block on acquiring the lock. I worked around it with the import lock due to it's recursive behaviour, but if it exists anywhere else in CPython it may cause a problem if used during shutdown. ---------- keywords: +patch Added file: http://bugs.python.org/file10208/python-thread_noswap-2.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 20:16:16 2008 From: report at bugs.python.org (Rafael Zanella) Date: Wed, 07 May 2008 18:16:16 +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: <1210184176.91.0.126235589476.issue2302@psf.upfronthosting.co.za> Rafael Zanella added the comment: >With the code as it stands, calls to shutdown that happen before >serve_forever enters its loop will deadlock, and there's no simple way >for the user to avoid this. The attached patch prevents the deadlock and >allows multiple serve_forever..shutdown cycles, but it's pretty >complicated. I could make it a lot simpler by making shutdown permanent: >any later serve_forever calls would return immediately. Never thought of using the SocketServer taht way, wouldn't the person doing this bunch of shutdown()s and serve_forever()s be better off using handle_request() on a loop instead ? >A third choice would be to add a .serve_in_thread function that returns >a token that can be used to shut down exactly that loop, instead of >putting .shutdown() on the server. Any opinions? I don't think I understand this part, what loop do you refer to ? ---------- nosy: +zanella __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 20:49:32 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 07 May 2008 18:49:32 +0000 Subject: [issue2772] Add PendingDeprecationWarning for % formatting In-Reply-To: <1210174411.83.0.986226476112.issue2772@psf.upfronthosting.co.za> Message-ID: <1afaf6160805071149j14c08b5fs5dc6787bbba99718@mail.gmail.com> Benjamin Peterson added the comment: On Wed, May 7, 2008 at 10:33 AM, Eric Smith wrote: > I think a better approach will be to remove % formatting from > warnings.py. I think that will remove the need for any checks at all. > I'll investigate that. That would make user code warning that uses '%"' brittle. However, if we warn about it, I think it's ok. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 20:55:32 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 07 May 2008 18:55:32 +0000 Subject: [issue2610] string representation of range and dictionary views In-Reply-To: <1210161762.87.0.96533296288.issue2610@psf.upfronthosting.co.za> Message-ID: <4821FB21.7070305@v.loewis.de> Martin v. L?wis added the comment: > Is there any chance this patch will make it into the latest alpha?? I don't think there is any such chance. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 21:32:40 2008 From: report at bugs.python.org (Brad Miller) Date: Wed, 07 May 2008 19:32:40 +0000 Subject: [issue2610] string representation of range and dictionary views In-Reply-To: <4821FB21.7070305@v.loewis.de> Message-ID: <9720DFAE-D880-4B29-ACFD-F0B0186A627D@gmail.com> Brad Miller added the comment: On May 7, 2008, at 1:55 PM, Martin v. L?wis wrote: Thanks for the very clear answer. This being my first attempt at contributing to the Python core, I am looking for some sort of clarity on the future of this patch. It feels like some sort of consensus was reached and now the patch has been lingering without additional comment for several weeks. I have some sense of urgency in knowing the future as the final opportunity to include these changes in my introduction to CS book is looming on the horizon. Thanks, Brad > __________________________________ > Tracker > > __________________________________ __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 21:45:39 2008 From: report at bugs.python.org (Jean Brouwers) Date: Wed, 07 May 2008 19:45:39 +0000 Subject: [issue2784] fast builtin sum may leak In-Reply-To: <1210189539.52.0.670446684288.issue2784@psf.upfronthosting.co.za> Message-ID: <1210189539.52.0.670446684288.issue2784@psf.upfronthosting.co.za> New submission from Jean Brouwers : The new, fast builtin sum implementation may cause a memory leak in the float loop. Both lines PyFPE_START_PROTECT("add", return 0) should be changed to PyFPE_START_PROTECT("add", Py_DECREF(item); Py_DECREF(iter); return 0) The attached file bltinmodule1.c.diff contain a patch to that extent. /Jean Brouwers ---------- components: Interpreter Core files: bltinmodule1.c.diff keywords: patch messages: 66368 nosy: MrJean1 severity: normal status: open title: fast builtin sum may leak type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file10209/bltinmodule1.c.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 21:53:43 2008 From: report at bugs.python.org (Jean Brouwers) Date: Wed, 07 May 2008 19:53:43 +0000 Subject: [issue2785] alternate fast builtin sum In-Reply-To: <1210190023.19.0.40382803719.issue2785@psf.upfronthosting.co.za> Message-ID: <1210190023.19.0.40382803719.issue2785@psf.upfronthosting.co.za> New submission from Jean Brouwers : The attached patch bltmodule2.c.diff is a different implementation of the fast summation code for your consideration. It uses three separate sums to add ints, floats and other objects. All ints are accumulated into a C long, reset even after overflow. All floats are added into a C double without mixing ints. Other objects are handled as before. This version has been tested with Python 2.5.2 as well and passed the existing regressions. /Jean Brouwers ---------- components: Interpreter Core files: bltinmodule2.c.diff keywords: patch messages: 66369 nosy: MrJean1 severity: normal status: open title: alternate fast builtin sum type: performance versions: Python 2.6 Added file: http://bugs.python.org/file10210/bltinmodule2.c.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 22:01:59 2008 From: report at bugs.python.org (Matthias Urlichs) Date: Wed, 07 May 2008 20:01:59 +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: <1210190519.63.0.914806928742.issue2722@psf.upfronthosting.co.za> Matthias Urlichs added the comment: MAX_PATH is a compile time constant which, like FD_BITS for select(), may be too small for the system you're ultimately running on. Using that as default initial size is OK, but handling ERANGE is still a very good idea. ---------- nosy: +smurfix __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 22:11:49 2008 From: report at bugs.python.org (Adam Olsen) Date: Wed, 07 May 2008 20:11:49 +0000 Subject: [issue2778] set_swap_bodies is unsafe In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za> Message-ID: <1210191109.29.0.0649338240652.issue2778@psf.upfronthosting.co.za> Adam Olsen added the comment: The intended use is unsafe. contains, remove, and discard all use it for a lookup, which can't be fixed. Upon further inspection, intersection_update is fine. Only a temporary set (not frozenset!) is given junk, which I don't see as a problem. If someone can confirm that contains/remove/discard's usage is an artifact I'll submit a patch that removes it. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 22:21:04 2008 From: report at bugs.python.org (Abhik Shah) Date: Wed, 07 May 2008 20:21:04 +0000 Subject: [issue2726] Autodoc's autoclass directive should include constructor docstring In-Reply-To: <1209893883.1.0.258821860341.issue2726@psf.upfronthosting.co.za> Message-ID: <823e60360805071321ha5fe6a5rcb18d0c91d8103f6@mail.gmail.com> Abhik Shah added the comment: Works great.. Thanks! On Sun, May 4, 2008 at 5:38 AM, Georg Brandl wrote: > > Georg Brandl added the comment: > > Okay, I added a config value ("autoclass_content") in r62697. Let me > know what you think! > > ---------- > resolution: -> fixed > status: open -> closed > > > > __________________________________ > Tracker > > __________________________________ > __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 22:25:59 2008 From: report at bugs.python.org (Matthias Urlichs) Date: Wed, 07 May 2008 20:25:59 +0000 Subject: [issue2786] Names in traceback should have class names, if they're methods In-Reply-To: <1210191958.85.0.412869826908.issue2786@psf.upfronthosting.co.za> Message-ID: <1210191958.85.0.412869826908.issue2786@psf.upfronthosting.co.za> New submission from Matthias Urlichs : Consider this simple error: >>> class foo(object): ... def __init__(self,bar): ... pass ... >>> foo() Traceback (most recent call last): File "", line 1, in TypeError: __init__() takes exactly 2 positional arguments (1 given) >>> The problem is that if that "foo" call is through a variable (or anything else that obscures which class I'm actually calling) there's no good way to figure this from the traceback. The last line should read TypeError: foo.__init__() takes exactly 2 positional arguments (1 given) or similar. ---------- messages: 66373 nosy: smurfix severity: normal status: open title: Names in traceback should have class names, if they're methods type: behavior __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 22:29:08 2008 From: report at bugs.python.org (Jean Brouwers) Date: Wed, 07 May 2008 20:29:08 +0000 Subject: [issue2784] fast builtin sum may leak In-Reply-To: <1210189539.52.0.670446684288.issue2784@psf.upfronthosting.co.za> Message-ID: <1210192148.28.0.0746449633576.issue2784@psf.upfronthosting.co.za> Jean Brouwers added the comment: There is one other, similar issue in the Modules/imgfile.c file. Line 327 is PyFPE_START_PROTECT("readscaled", return 0) and should probably be PyFPE_START_PROTECT("readscaled", iclose(image); return 0) /Jean Brouwers __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 23:27:27 2008 From: report at bugs.python.org (Adam Olsen) Date: Wed, 07 May 2008 21:27:27 +0000 Subject: [issue2787] Patch to flush unittest output In-Reply-To: <1210195645.66.0.390222470388.issue2787@psf.upfronthosting.co.za> Message-ID: <1210195645.66.0.390222470388.issue2787@psf.upfronthosting.co.za> New submission from Adam Olsen : In 3.0, unittest's output has become line buffered. Instead of printing the test name when it starts a test, then "ok" when it finishes, the test name is delayed until the "ok" is printed. This makes it unnecessarily hard to determine which test is hanging or segfaulted. The attached patch adds explicit flushes. An alternative approach would be to force stdout to be unbuffered somehow. I don't know how difficult that would be. ---------- files: python-unittest_flush.diff keywords: patch messages: 66375 nosy: Rhamphoryncus severity: normal status: open title: Patch to flush unittest output versions: Python 3.0 Added file: http://bugs.python.org/file10211/python-unittest_flush.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 7 23:48:24 2008 From: report at bugs.python.org (Adam Olsen) Date: Wed, 07 May 2008 21:48:24 +0000 Subject: [issue2787] Patch to flush unittest output In-Reply-To: <1210195645.66.0.390222470388.issue2787@psf.upfronthosting.co.za> Message-ID: <1210196904.17.0.594164633618.issue2787@psf.upfronthosting.co.za> Adam Olsen added the comment: Hrm, this behaviour exists in trunk as well. I must be confused about the cause (but the patch still fixes it.) __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 00:07:35 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 07 May 2008 22:07:35 +0000 Subject: [issue2788] ignore file for Mercurial In-Reply-To: <1210198055.49.0.340334928408.issue2788@psf.upfronthosting.co.za> Message-ID: <1210198055.49.0.340334928408.issue2788@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Here is an .hgignore file to put in the base directory of both the trunk and the py3k branch. ---------- components: Build files: .hgignore messages: 66377 nosy: pitrou severity: normal status: open title: ignore file for Mercurial versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10212/.hgignore __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 00:09:42 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 07 May 2008 22:09:42 +0000 Subject: [issue2785] alternate fast builtin sum In-Reply-To: <1210190023.19.0.40382803719.issue2785@psf.upfronthosting.co.za> Message-ID: <1210198182.61.0.602223500306.issue2785@psf.upfronthosting.co.za> Antoine Pitrou added the comment: What is the benefit of this new implementation? If it is faster, can you give us any performance numbers? (for example using timeit) ---------- nosy: +pitrou __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 00:41:27 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 07 May 2008 22:41:27 +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: <1210200087.53.0.676849170014.issue2507@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a last patch fixing without lines longer than 78 chars. Added file: http://bugs.python.org/file10213/exc_cleanup4.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 02:08:25 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 08 May 2008 00:08:25 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1210205305.04.0.690808452005.issue2750@psf.upfronthosting.co.za> Christian Heimes added the comment: Command to merge json into 3.0: svnmerge.py unblock -r62734,62736,62748,62769; svnmerge.py merge --force -r62734,62736,62748,62769 __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 02:18:54 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 08 May 2008 00:18:54 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1210205305.04.0.690808452005.issue2750@psf.upfronthosting.co.za> Message-ID: <1afaf6160805071718x26d25af2r513de903ed9de2bb@mail.gmail.com> Benjamin Peterson added the comment: On Wed, May 7, 2008 at 7:08 PM, Christian Heimes wrote: > > Christian Heimes added the comment: > > Command to merge json into 3.0: > > svnmerge.py unblock -r62734,62736,62748,62769; svnmerge.py merge --force > -r62734,62736,62748,62769 Why is the --force needed? __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 02:21:13 2008 From: report at bugs.python.org (Jean Brouwers) Date: Thu, 08 May 2008 00:21:13 +0000 Subject: [issue2785] alternate fast builtin sum In-Reply-To: <1210190023.19.0.40382803719.issue2785@psf.upfronthosting.co.za> Message-ID: <1210206072.67.0.713526860386.issue2785@psf.upfronthosting.co.za> Jean Brouwers added the comment: I did not compare performance (yet). If there is a particular test case, I am happy to measure that. Also, I made sure that the results and errors (!) for non-numeric items are the same as for the original, Slow Summation case. The version I submitted is perhaps only slightly faster for most int and float cases, since it never creates and adds the 0 int default for the optional 'start' argument. For other int and float cases it will certainly be faster. Here are a few (extreme) examples. 1) Assume a long list consisting of one float followed by all ints. The existing code will switch to the float loop at the very first float encountered and then use C double add (plus the FPE protection overhead) to add all subsequent ints. My version will use C long adds for all ints, C double add for the float plus one C double add to combine the long and double results. 2) Consider a list of just 2 items, one float and one int (and no 'start' argument). The current code will first create a result object for the 'start' default 0. Then, it enters the int loop (since result is an int, 0) and gets the first item, the float. Since the item is not an int, it is added to the current result using PyNumber_Add. Next, it falls into the float loop, since the result is now a float, presumably. Next, it gets the int item and adds that int as C double to the C double in f_result. The end result C double f_result is returned as float. Quite costly for just one float and one int and maybe worse than than Slow Summation. 3) My version does not create a 0 int for the missing 'start'. That is only created when absolutely needed at some later time. In addition, all int items are added in C long i_sum and all floats are added in C double f_sum, regardless of the order they occur in the sequence. At the end of the iteration loop, the C long i_sum is added to C double f_sum once and a single float object is created and returned. That is very efficient and without any unnecessary overhead. In other words, for sequences with mixed int and float objects the difference can be significant, depending on where the very first float item is located in the sequence and how may int follow. However, for sequences with items of the same type, all int or all float, there will be little or no difference. /Jean Brouwers PS) There are two additional things to consider for the float case: - Ooverflow (ERANGE) and value (EDOM) errors in C double adds - Using a compensating summation for floats, like Kahan's method. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 02:22:34 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 08 May 2008 00:22:34 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1210206154.41.0.0223135823281.issue2750@psf.upfronthosting.co.za> Christian Heimes added the comment: Because I haven't committed the result of svnmerge.py unblock yet. svnmerge.py refuses to work on a sandbox with uncommitted changes. 2to3: ./python Tools/scripts/2to3 -w Lib/json/ ./python Tools/scripts/2to3 -w -d Lib/json/ __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 03:26:51 2008 From: report at bugs.python.org (Eric Smith) Date: Thu, 08 May 2008 01:26:51 +0000 Subject: [issue2772] Add PendingDeprecationWarning for % formatting In-Reply-To: <1210083250.98.0.889504486731.issue2772@psf.upfronthosting.co.za> Message-ID: <1210210010.72.0.432960909659.issue2772@psf.upfronthosting.co.za> Eric Smith added the comment: > That would make user code warning that uses '%"' brittle. However, if > we warn about it, I think it's ok. True enough. Then I think we should go with: 1. Use .format() in the warnings module. 2. Tell the users not to use % formatting in user code for warnings. 3. Add my original, simple, global check for recursion. It will work incorrectly in an insignificant number of cases, and will typically result in at least one warning about % formatting, anyway. I'll have a patch ready soon. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 03:32:01 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 08 May 2008 01:32:01 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1210210320.88.0.791355384596.issue2750@psf.upfronthosting.co.za> Christian Heimes added the comment: I got the JSON module working under Python 3.0. I'm still not happy with the mixing of bytes and unicode, though. The patch contains additional changes to "svnmerge.py unblock -r62734,62736,62748,62769; svnmerge.py merge --force -r62734,62736,62748,62769" Added file: http://bugs.python.org/file10214/json_py3k.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 03:36:00 2008 From: report at bugs.python.org (Rafael Zanella) Date: Thu, 08 May 2008 01:36:00 +0000 Subject: [issue2650] re.escape should not escape underscore In-Reply-To: <1208441650.53.0.945063086485.issue2650@psf.upfronthosting.co.za> Message-ID: <1210210560.0.0.788065430326.issue2650@psf.upfronthosting.co.za> Rafael Zanella added the comment: AFAIK the lookup on dictionaries is faster than on lists. Patch added, mainly a compilation of the previous patches with an expanded test. ---------- nosy: +zanella Added file: http://bugs.python.org/file10215/re_patch.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 03:45:16 2008 From: report at bugs.python.org (Jean Brouwers) Date: Thu, 08 May 2008 01:45:16 +0000 Subject: [issue2785] alternate fast builtin sum In-Reply-To: <1210190023.19.0.40382803719.issue2785@psf.upfronthosting.co.za> Message-ID: <1210211116.49.0.504085883344.issue2785@psf.upfronthosting.co.za> Jean Brouwers added the comment: Here is one, simple comparison between 3 different builtin_sum's, all measured on the same machine, MacOS X 10.4.11 (Intel Duo): 1) Python 2.5.1 ActiveState with standard Slow Summation: % python2.5.1 -mtimeit --setup="x=[1.0e12, 7]*1000000" "sum(x)" 10 loops, best of 3: 177 msec per loop 2) Python 2.6a2 (built from source) with the existing Fast Summation: % python2.6a2 -mtimeit --setup="x=[1.0e12, 7]*1000000" "sum(x)" 10 loops, best of 3: 52.5 msec per loop 3) Python 2.5.2 (built from source) with the submitted Fast Summation: % python2.5.2 -mtimeit --setup="x=[1.0e12, 7]*1000000" "sum(x)" 10 loops, best of 3: 48.2 msec per loop __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 04:01:40 2008 From: report at bugs.python.org (Thomas Lee) Date: Thu, 08 May 2008 02:01:40 +0000 Subject: [issue1346238] A constant folding optimization pass for the AST Message-ID: <1210212100.27.0.557184284245.issue1346238@psf.upfronthosting.co.za> Thomas Lee added the comment: I'm working on the AST optimization code for 2.7 (?) in the tlee-ast-optimize branch. I've since adopted some of the ideas from this patch, but I'll take another look when I get a chance. The folding operation is already mostly in-place. ---------- nosy: +thomas.lee _____________________________________ Tracker _____________________________________ From report at bugs.python.org Thu May 8 04:12:37 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 08 May 2008 02:12:37 +0000 Subject: [issue2785] alternate fast builtin sum In-Reply-To: <1210190023.19.0.40382803719.issue2785@psf.upfronthosting.co.za> Message-ID: <1210212757.31.0.106867431033.issue2785@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Will take a look at this one but am inclined to reject it. The timing benefits are marginal at best and only help in the atypical case of mixed floats and ints. The patch changes the type and ordering of intermediate sums, resulting in different answers than the standard sum (). In contrast, the existing fast sum() was carefully designed to mimick the operations of the original sum(), so it always produces the same results. ---------- assignee: -> rhettinger nosy: +rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 04:14:28 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 08 May 2008 02:14:28 +0000 Subject: [issue2784] fast builtin sum may leak In-Reply-To: <1210189539.52.0.670446684288.issue2784@psf.upfronthosting.co.za> Message-ID: <1210212868.24.0.41843273024.issue2784@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 04:14:56 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 May 2008 02:14:56 +0000 Subject: [issue2523] binary buffered reading is quadratic In-Reply-To: <1206987085.65.0.944826780657.issue2523@psf.upfronthosting.co.za> Message-ID: <1210212896.64.0.824348724876.issue2523@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a pure Python patch removing the quadratic behaviour and trying to make read operations generally faster. Here are some numbers: ./python -m timeit -s "f = open('50KB', 'rb')" "f.seek(0)" "while f.read(11): pass" -> py3k without patch: 23.6 msec per loop -> py3k with patch: 14.5 msec per loop -> Python 2.5: 4.72 msec per loop ./python -m timeit -s "f = open('50KB', 'rb')" "f.seek(0); f.read()" -> py3k without patch: 284 usec per loop -> py3k with patch: 90.1 usec per loop -> Python 2.5: 33.8 usec per loop ./python -m timeit -s "f = open('100KB', 'rb')" "f.seek(0); f.read()" -> py3k without patch: 828 usec per loop -> py3k with patch: 142 usec per loop -> Python 2.5: 62.5 usec per loop ./python -m timeit -s "f = open('200KB', 'rb')" "f.seek(0); f.read()" -> py3k without patch: 3.67 msec per loop -> py3k with patch: 375 usec per loop -> Python 2.5: 131 usec per loop And, for the record, with a 10MB file: ./python -m timeit -s "f = open('10MB', 'rb')" "f.seek(0); f.read()" -> py3k without patch: still running after more than one minute, gave up -> py3k with patch: 38.6 msec per loop -> Python 2.5: 20.4 msec per loop ---------- keywords: +patch Added file: http://bugs.python.org/file10216/binaryio1.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 04:18:26 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 08 May 2008 02:18:26 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1210213106.46.0.580870259734.issue2750@psf.upfronthosting.co.za> Benjamin Peterson added the comment: When you've merged it, I'll alter the 3.0 docs. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 04:28:24 2008 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 08 May 2008 02:28:24 +0000 Subject: [issue2717] tempfile.mkstempf In-Reply-To: <1209435088.71.0.390956063195.issue2717@psf.upfronthosting.co.za> Message-ID: <1210213704.29.0.768693517662.issue2717@psf.upfronthosting.co.za> Skip Montanaro added the comment: The conclusion on python-dev is that NamedTemporaryFile is an adequate replacement for mktemp, so this isn't needed. ---------- resolution: -> rejected status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 04:48:49 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 08 May 2008 02:48:49 +0000 Subject: [issue2523] binary buffered reading is quadratic In-Reply-To: <1206987085.65.0.944826780657.issue2523@psf.upfronthosting.co.za> Message-ID: <1210214929.14.0.972798570859.issue2523@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I see that the code is still using the immutable bytes object for its buffer (which forces Python to create a new buffer every time its modified). Also, I think it worthwhile to check if using a pre-allocated bytearray object (i.e., bytearray(buffer_size) where `buffer_size` is an integer) would have any performance benefits. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 04:59:08 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 08 May 2008 02:59:08 +0000 Subject: [issue1179] [CVE-2007-4965] Integer overflow in imageop module In-Reply-To: <1190163754.35.0.664170861932.issue1179@psf.upfronthosting.co.za> Message-ID: <1210215548.45.0.93990637817.issue1179@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: This is not a release blocker for 2.6 or 3.0. ---------- nosy: +barry priority: release blocker -> critical __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 05:10:14 2008 From: report at bugs.python.org (Adam Olsen) Date: Thu, 08 May 2008 03:10:14 +0000 Subject: [issue2778] set_swap_bodies is unsafe In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za> Message-ID: <1210216214.56.0.126333139598.issue2778@psf.upfronthosting.co.za> Adam Olsen added the comment: I decided not to wait. Here's a patch. Several of set's unit tests covered the auto-conversion, so I've modified them. ---------- keywords: +patch Added file: http://bugs.python.org/file10217/python-setswap.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 05:12:47 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 May 2008 03:12:47 +0000 Subject: [issue2523] binary buffered reading is quadratic In-Reply-To: <1206987085.65.0.944826780657.issue2523@psf.upfronthosting.co.za> Message-ID: <1210216367.0.0.425286483865.issue2523@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hi Alexandre, I first tried to use a (non-preallocated) bytearray object and, after trying several optimization schemes, I found out that the best one worked as well with an immutable bytes object :) I also found out that the bytes <-> bytearray conversion costs can be noticeable in some benchmarks. The internal buffer is rarely reallocated because the current offset inside it is remembered instead; also, when reading bytes from the underlying unbuffered stream, a list of bytes objects is accumulated and then joined at the end. I think a preallocated bytearray would not make a lot of sense since we can't readinto() an arbitrary position, so we still have a memory copy from the bytes object returned by raw.read() to the bytearray buffer, and then when returning the result to the user as a bytes object we have another memory copy. In other words each read byte is copied twice more. Of course, if this code was rewritten in C, different compromises would be possible. cheers Antoine. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 05:19:58 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 08 May 2008 03:19:58 +0000 Subject: [issue2788] ignore file for Mercurial In-Reply-To: <1210198055.49.0.340334928408.issue2788@psf.upfronthosting.co.za> Message-ID: <1210216798.09.0.192649569772.issue2788@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I have a slightly different .hgignore for my personal mercurial branch. Although, I don't really like the idea of polluting the main subversion repository with the ignore files of other VCS. ---------- nosy: +alexandre.vassalotti Added file: http://bugs.python.org/file10218/hgignore.txt __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 05:39:36 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 08 May 2008 03:39:36 +0000 Subject: [issue2548] Undetected error in exception handling In-Reply-To: <1207297002.01.0.980429495002.issue2548@psf.upfronthosting.co.za> Message-ID: <1210217976.41.0.958038862047.issue2548@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'm not going to hold up the 2.6 alpha release for this, but will bump it up for the first 2.6 beta. ---------- nosy: +barry priority: release blocker -> critical __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 05:43:13 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 08 May 2008 03:43:13 +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: <1210218193.42.0.280647373176.issue2235@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Guido, can you comment on Amaury's latest patch? I'm going to bump this back to critical so as not to hold up 2.6 alpha, but it should be marked as a release blocker for the first beta. ---------- nosy: +barry priority: release blocker -> critical __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 05:46:37 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 08 May 2008 03:46:37 +0000 Subject: [issue2632] performance problem in socket._fileobject.read In-Reply-To: <1208197816.87.0.564994342754.issue2632@psf.upfronthosting.co.za> Message-ID: <1210218397.35.0.14868894795.issue2632@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Bumping this down to critical for the alpha release. It should be release blocker for the first beta. ---------- nosy: +barry priority: release blocker -> critical __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 06:06:42 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 08 May 2008 04:06:42 +0000 Subject: [issue2778] set_swap_bodies is unsafe In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za> Message-ID: <1210219602.12.0.61405935643.issue2778@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Rejecting this patch which simply disables a feature that some users consider to be important. I will look at it further. Right now, I'm inclined to simply document that the three temporary autoconversions deny meaningful contemporaneous access to a set used as a key. The set_swap_bodies() function itself is fine -- it behaves just like an atomic version of the pure python sequence: t=set(a); a.clear(); a.update(b); b.clear(); b.update(t); del t. The issue is simply that the swap/search/swap dance allows the possibility that a determined user could graft onto the search step and access but not modify the temporary swapped-in frozenset. It doesn't crash; it simply produces an undefined result. I'm not losing sleep over this scenario. I'm am entertaining an alternative where contains/discard/remove would duplicate instead of swap the set bodies; however, that approach may do more harm than good. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 06:17:18 2008 From: report at bugs.python.org (Alexandr Zamaraev) Date: Thu, 08 May 2008 04:17:18 +0000 Subject: [issue2789] Comparsion datetime objects with None In-Reply-To: <1210220237.26.0.0391645804782.issue2789@psf.upfronthosting.co.za> Message-ID: <1210220237.26.0.0391645804782.issue2789@psf.upfronthosting.co.za> New submission from Alexandr Zamaraev : When comparing any standard objects with None returned True or False. When comparing the object of the module datetime with None raised exception TypeError. Example Python session: 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 datetime as dt >>> import decimal as dc >>> None == 1 False >>> None == "s" False >>> None == [1, 2, 3] False >>> None == (1, 2, 3) False >>> None == dc.Decimal() False >>> None == dt.date.today() False >>> None == dt.datetime.today() False >>> None == dt.time() False >>> None == dt.timedelta() False >>> None < 1 True >>> None < "s" True >>> None < [1, 2, 3] True >>> None < (1, 2, 3) True >>> None < dc.Decimal() True >>> None < dt.date.today() Traceback (most recent call last): File "", line 1, in TypeError: can't compare datetime.date to NoneType >>> None < dt.datetime.today() Traceback (most recent call last): File "", line 1, in TypeError: can't compare datetime.datetime to NoneType >>> None < dt.time() Traceback (most recent call last): File "", line 1, in TypeError: can't compare datetime.time to NoneType >>> None < dt.timedelta() Traceback (most recent call last): File "", line 1, in TypeError: can't compare datetime.timedelta to NoneType ---------- components: Library (Lib) files: datetimemodule.diff keywords: patch messages: 66402 nosy: shura_zam severity: normal status: open title: Comparsion datetime objects with None versions: Python 2.5 Added file: http://bugs.python.org/file10219/datetimemodule.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 06:19:52 2008 From: report at bugs.python.org (Rodrigo Bernardo Pimentel) Date: Thu, 08 May 2008 04:19:52 +0000 Subject: [issue2532] file that breaks 2to3 (despite being correct python) In-Reply-To: <1207095014.88.0.392837207981.issue2532@psf.upfronthosting.co.za> Message-ID: <1210220392.03.0.385347245703.issue2532@psf.upfronthosting.co.za> Changes by Rodrigo Bernardo Pimentel : ---------- nosy: +rbp __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 06:26:45 2008 From: report at bugs.python.org (Neal Norwitz) Date: Thu, 08 May 2008 04:26:45 +0000 Subject: [issue2222] Memory leak in os.rename? In-Reply-To: <1204549533.94.0.102574866059.issue2222@psf.upfronthosting.co.za> Message-ID: <1210220805.07.0.736502332378.issue2222@psf.upfronthosting.co.za> Changes by Neal Norwitz : ---------- priority: normal -> critical __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 06:27:01 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 08 May 2008 04:27:01 +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: <1210220819.45.0.302057799949.issue2507@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: r62847 ---------- priority: release blocker -> critical resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 06:29:54 2008 From: report at bugs.python.org (Adam Olsen) Date: Thu, 08 May 2008 04:29:54 +0000 Subject: [issue2778] set_swap_bodies is unsafe In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za> Message-ID: <1210220994.17.0.152578346237.issue2778@psf.upfronthosting.co.za> Adam Olsen added the comment: PEP 218 explicitly dropped auto-conversion as a feature. Why should this be an exception? __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 06:51:39 2008 From: report at bugs.python.org (Ismail Donmez) Date: Thu, 08 May 2008 04:51:39 +0000 Subject: [issue1179] [CVE-2007-4965] Integer overflow in imageop module In-Reply-To: <1190163754.35.0.664170861932.issue1179@psf.upfronthosting.co.za> Message-ID: <1210222299.78.0.122543506207.issue1179@psf.upfronthosting.co.za> Ismail Donmez added the comment: This _must_ be a release blocker for Python 3.0, Its a shame that this bug still is not fixed and a patch is available for months now. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 06:52:15 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 08 May 2008 04:52:15 +0000 Subject: [issue2778] set_swap_bodies is unsafe In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za> Message-ID: <1210222335.88.0.134412931652.issue2778@psf.upfronthosting.co.za> Raymond Hettinger added the comment: If needed, I'll update the PEP to be more clear. The sets.py module had two protocols: __as_immutable__() and __as_temporarily_immutable__ (). The first protocol was the one that was dropped -- it triggered with something like "s1.add(s2)" and it automatically created a frozenset copy of s2. The second protocol is used in contains/remove/discard. Alex Martelli successfully lobbied for its retention. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 06:55:00 2008 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 08 May 2008 04:55:00 +0000 Subject: [issue1179] [CVE-2007-4965] Integer overflow in imageop module In-Reply-To: <1190163754.35.0.664170861932.issue1179@psf.upfronthosting.co.za> Message-ID: <1210222500.0.0.133411790487.issue1179@psf.upfronthosting.co.za> Guido van Rossum added the comment: imageop is deleted in 3.0. See PEP 3108. So it can't be a release blocker. This also explains my general lack of interest in this module. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 07:42:11 2008 From: report at bugs.python.org (Ismail Donmez) Date: Thu, 08 May 2008 05:42:11 +0000 Subject: [issue1179] [CVE-2007-4965] Integer overflow in imageop module In-Reply-To: <1190163754.35.0.664170861932.issue1179@psf.upfronthosting.co.za> Message-ID: <1210225331.26.0.699148594644.issue1179@psf.upfronthosting.co.za> Ismail Donmez added the comment: I am sorry for the drama then, :) __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 08:42:23 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 08 May 2008 06:42:23 +0000 Subject: [issue2788] ignore file for Mercurial In-Reply-To: <1210198055.49.0.340334928408.issue2788@psf.upfronthosting.co.za> Message-ID: <1210228943.09.0.65354378797.issue2788@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> georg.brandl nosy: +georg.brandl __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 09:13:49 2008 From: report at bugs.python.org (Jean Brouwers) Date: Thu, 08 May 2008 07:13:49 +0000 Subject: [issue2785] alternate fast builtin sum In-Reply-To: <1210190023.19.0.40382803719.issue2785@psf.upfronthosting.co.za> Message-ID: <1210230829.11.0.472398333965.issue2785@psf.upfronthosting.co.za> Jean Brouwers added the comment: The one example given may not be convincing, other ones may be. What is it in the submitted version which is not designed carefully or which may not produce the same results? __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 09:45:11 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 08 May 2008 07:45:11 +0000 Subject: [issue2785] alternate fast builtin sum In-Reply-To: <1210190023.19.0.40382803719.issue2785@psf.upfronthosting.co.za> Message-ID: <1210232711.36.0.890949904548.issue2785@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The approach of using separate accumulations is intrinsically flawed if you want the same result as a regular sum(). Here's a small dataset that shows why you can't accumulate separate sums by type: >>> d = [1000000000000000, - 1000000000000000.0, .0000000000000001, .0000000000000001] >>> sum(d) 2e-16 >>> d[0] + sum(d[1:]) 0.0 Closing this one. The approach is doomed and the possible benefits over the current approach are microscopic at best and only apply to unusual corner cases. I also prefer the current approach because it is easily extended to LongLongs and it is easy to show that the code is correct (at least with respect to producing the same result as a regular sum()). ---------- resolution: -> rejected status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 12:20:01 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 08 May 2008 10:20:01 +0000 Subject: [issue2790] sys.flags is missing bytes_warning In-Reply-To: <1210242000.56.0.446699742835.issue2790@psf.upfronthosting.co.za> Message-ID: <1210242000.56.0.446699742835.issue2790@psf.upfronthosting.co.za> New submission from Ralf Schmitt : sys.flags is missing bytes_warning: Python 2.6a2+ (trunk, May 8 2008, 12:09:50) [GCC 4.2.3 (Debian 4.2.3-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> sys.flags sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0) This is only used from warnings.py currently: ~/pydev/trunk/ ack bytes_warning Lib/warnings.py 311: bytes_warning = sys.flags.bytes_warning 312: if bytes_warning > 1: 314: elif bytes_warning: Python/sysmodule.c 1172: {"bytes_warning", "-b"}, (I only see an attribute error in frozen programs). The attached patch fixes it by not using the sizeof operator to compute the size of the array. This gives: >>> sys.flags sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0, bytes_warning=0) ---------- files: bytes_warning.patch keywords: patch messages: 66411 nosy: schmir severity: normal status: open title: sys.flags is missing bytes_warning type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file10220/bytes_warning.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 12:23:48 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 08 May 2008 10:23:48 +0000 Subject: [issue2790] sys.flags is missing bytes_warning In-Reply-To: <1210242000.56.0.446699742835.issue2790@psf.upfronthosting.co.za> Message-ID: <1210242228.77.0.38564643108.issue2790@psf.upfronthosting.co.za> Ralf Schmitt added the comment: brett, I added you to the nosy list, as you seem to have committed this in r62303 (http://hgpy.de/py/trunk/rev/ac1ae32a476c) ---------- nosy: +brett.cannon __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 12:36:08 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 08 May 2008 10:36:08 +0000 Subject: [issue1770190] platform.mac_ver() returning incorrect patch version Message-ID: <1210242967.91.0.0646476534568.issue1770190@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've tested the patch on 10.4.10 as wel as 10.5.2 and it returns the right version on both platforms. Commited as revision 62854 (trunk) and 62855 (python2.5 branch) ---------- assignee: jackjansen -> ronaldoussoren resolution: -> fixed status: open -> closed _____________________________________ Tracker _____________________________________ From report at bugs.python.org Thu May 8 13:55:10 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 08 May 2008 11:55:10 +0000 Subject: [issue2547] Py30a4 RELNOTES only cover 30a1 and 30a2 In-Reply-To: <1207290588.7.0.806597302139.issue2547@psf.upfronthosting.co.za> Message-ID: <1210247710.02.0.210073560245.issue2547@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I've updated the release script to at least touch RELNOTES, but I'm unsure as to what the policy is for updating the content of this file. I'm closing this issue but will bring it up on the mailing list. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 13:55:34 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 08 May 2008 11:55:34 +0000 Subject: [issue2547] Py30a4 RELNOTES only cover 30a1 and 30a2 In-Reply-To: <1207290588.7.0.806597302139.issue2547@psf.upfronthosting.co.za> Message-ID: <1210247734.16.0.888171969171.issue2547@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 14:22:45 2008 From: report at bugs.python.org (Joel Rosdahl) Date: Thu, 08 May 2008 12:22:45 +0000 Subject: [issue2791] subprocess.py leaks fd in communicate In-Reply-To: <1210249364.92.0.977353677692.issue2791@psf.upfronthosting.co.za> Message-ID: <1210249364.92.0.977353677692.issue2791@psf.upfronthosting.co.za> New submission from Joel Rosdahl : The optimization in SVN rev 38556 seems to have changed Popen.communicate's behavior when stdout is subprocess.PIPE (and maybe for other cases as well). See the attached file. In Python 2.4.5, all three counts are the same. In Python 2.5.2, the middle count has increased by 1. In other words: A file descriptor is leaked until the last reference to the Popen instance is dropped. ---------- components: Library (Lib) files: subprocess-fd-problem.py messages: 66415 nosy: jrosdahl severity: normal status: open title: subprocess.py leaks fd in communicate type: resource usage versions: Python 2.5 Added file: http://bugs.python.org/file10221/subprocess-fd-problem.py __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 15:54:16 2008 From: report at bugs.python.org (Jeremy Hylton) Date: Thu, 08 May 2008 13:54:16 +0000 Subject: [issue1346238] A constant folding optimization pass for the AST Message-ID: <1210254856.09.0.950143719913.issue1346238@psf.upfronthosting.co.za> Changes by Jeremy Hylton : ---------- nosy: +jhylton _____________________________________ Tracker _____________________________________ From report at bugs.python.org Thu May 8 16:08:29 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 08 May 2008 14:08:29 +0000 Subject: [issue2650] re.escape should not escape underscore In-Reply-To: <1208441650.53.0.945063086485.issue2650@psf.upfronthosting.co.za> Message-ID: <1210255709.4.0.944861854389.issue2650@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Lorenz's patch uses a set, not a list for special characters. Set lookup is as fast as dict lookup, but a set takes less memory because it does not have to store dummy values. More importantly, use of frozenset instead of dict makes the code clearer. On the other hand, I would simply use a string. For a dozen entries, hash lookup does not buy you much. Another nit: why use "\\%c" % (c) instead of obvious "\\" + c? Finally, you can eliminate use of index and a temporary list altogether by using a generator expression: ''.join(("\\" + c if c in _special else '\\000' if c == "\000" else c), for c in pattern) ---------- nosy: +belopolsky __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 16:35:38 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 May 2008 14:35:38 +0000 Subject: [issue2523] binary buffered reading is quadratic In-Reply-To: <1206987085.65.0.944826780657.issue2523@psf.upfronthosting.co.za> Message-ID: <1210257337.86.0.153151899585.issue2523@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Some code relies on -1 being usable as the default value for read() (instead of None), this new patch conforms to this expectation. It fixes some failures in test_mailbox. Added file: http://bugs.python.org/file10222/binaryio2.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 16:36:10 2008 From: report at bugs.python.org (Russ Cox) Date: Thu, 08 May 2008 14:36:10 +0000 Subject: [issue2650] re.escape should not escape underscore In-Reply-To: <1210255709.4.0.944861854389.issue2650@psf.upfronthosting.co.za> Message-ID: <20080508143906.D71FF1E8C55@holo.morphisms.net> Russ Cox added the comment: > Lorenz's patch uses a set, not a list for special characters. Set > lookup is as fast as dict lookup, but a set takes less memory because it > does not have to store dummy values. More importantly, use of frozenset > instead of dict makes the code clearer. On the other hand, I would > simply use a string. For a dozen entries, hash lookup does not buy you > much. > > Another nit: why use "\\%c" % (c) instead of obvious "\\" + c? > > Finally, you can eliminate use of index and a temporary list altogether > by using a generator expression: > > ''.join(("\\" + c if c in _special else '\\000' if c == "\000" else c), > for c in pattern) The title of this issue (#2650) is "re.escape should not escape underscore", not "re.escape is too slow and too easy to read". If you have an actual, measured performance problem with re.escape, please open a new issue with numbers to back it up. That's not what this one is about. Thanks. Russ __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 17:08:51 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 08 May 2008 15:08:51 +0000 Subject: [issue2650] re.escape should not escape underscore In-Reply-To: <20080508143906.D71FF1E8C55@holo.morphisms.net> Message-ID: Alexander Belopolsky added the comment: On Thu, May 8, 2008 at 10:36 AM, Russ Cox wrote: .. > The title of this issue (#2650) is "re.escape should not escape underscore", > not "re.escape is too slow and too easy to read". > Neither does the title say "re.escape should only escape .^$*+?{}[]\|()". I reviewed the patch rather than its conformance with the title. (BTW, the patch does not update documentation in Doc/library/re.rst.) > If you have an actual, measured performance problem with re.escape, > please open a new issue with numbers to back it up. > That's not what this one is about. You don't need to get so defensive. I did not raise a performance problem, I was simply responding to Rafael's "AFAIK the lookup on dictionaries is faster than on lists" comment. I did not say that you *should* rewrite your patch the way I suggested, only that you *can* use new language features to simplify the code. In any case, I am -0 on the patch. The current documentation says: """ escape(string) Return *string* with all non-alphanumerics backslashed; this is useful if you want to match an arbitrary literal string that may have regular expression metacharacters in it. """ and the current implementation serves the intended use case well. I did not see a compelling use case presented for the change. On the downside, since there is no mechanism to assure that _special indeed contains all re metacharacters, it may present a maintenance problem if additional metacharacters are added in the future. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 17:45:39 2008 From: report at bugs.python.org (Russ Cox) Date: Thu, 08 May 2008 15:45:39 +0000 Subject: [issue2650] re.escape should not escape underscore In-Reply-To: Message-ID: <20080508154749.DEBBB1E8C5C@holo.morphisms.net> Russ Cox added the comment: > You don't need to get so defensive. I did not raise a performance > problem, I was simply responding to Rafael's "AFAIK the lookup on > dictionaries is faster than on lists" comment. I did not say that you > *should* rewrite your patch the way I suggested, only that you *can* > use new language features to simplify the code. I was responding to the entire thread more than your mail. I'm frustrated because the only substantial discussion has focused on details of how to implement set lookup the fastest in a function that likely doesn't matter for speed. > In any case, I am -0 on the patch. The current documentation says: Now these are the kinds of comments I was hoping for. Thank you. > Return *string* with all non-alphanumerics backslashed; this is useful if you > want to match an arbitrary literal string that may have regular expression > metacharacters in it. Sure; the documentation is wrong too. > I did not see a compelling use case presented for the change. The usual convention in regular expressions is that escaping a word character means you intend a special meaning, and underscore is a word character. Even though the current re module does accept \_ as synonymous with _ (just as it accepts \q as synonymous with q), it is no more correct to escape _ than to escape q. I think it is fine to escape all non-word characters, but someone else suggested that it would be easier when moving to larger character sets to escape just the special ones. I'm happy with either version. My argument is only that Python should behave the same in this respect as other systems that use substantially the same regular expressions. > since there is no mechanism to assure that _special indeed > contains all re metacharacters, it may present a maintenance problem > if additional metacharacters are added in the future. The test suite will catch these easily, since it checks that re.escape(c) matches c for all characters c. But again, I'm happy with escaping all ASCII non-word characters. Russ __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 18:12:29 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 08 May 2008 16:12:29 +0000 Subject: [issue2650] re.escape should not escape underscore In-Reply-To: <20080508154749.DEBBB1E8C5C@holo.morphisms.net> Message-ID: Alexander Belopolsky added the comment: On Thu, May 8, 2008 at 11:45 AM, Russ Cox wrote: .. > My argument is only that Python should behave the same in > this respect as other systems that use substantially the same > regular expressions. > This is not enough to justify the change in my view. After all, "A Foolish Consistency is the Hobgoblin of Little Minds" . I don't know if there is much code out there that relies on the current behavior, but technically speaking, this is an incompatible change. A backward compatible way to add your desired functionality would be to add the "escape_special" function, but not every useful 3-line function belongs to stdlib. This said, I would prefer simply adding '_' to _alphanum over _special approach, but still -1 on the whole idea. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 18:19:14 2008 From: report at bugs.python.org (Russ Cox) Date: Thu, 08 May 2008 16:19:14 +0000 Subject: [issue2650] re.escape should not escape underscore In-Reply-To: Message-ID: Russ Cox added the comment: On Thu, May 8, 2008 at 12:12 PM, Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Thu, May 8, 2008 at 11:45 AM, Russ Cox wrote: > .. >> My argument is only that Python should behave the same in >> this respect as other systems that use substantially the same >> regular expressions. >> > > This is not enough to justify the change in my view. After all, "A > Foolish Consistency is the Hobgoblin of Little Minds" > . > > I don't know if there is much code out there that relies on the > current behavior, but technically speaking, this is an incompatible > change. A backward compatible way to add your desired functionality > would be to add the "escape_special" function, but not every useful > 3-line function belongs to stdlib. In my mind, arguing that re.escape can't possibly be changed due to imagined backward incompatibilities is the foolish consistency. > This said, I would prefer simply adding '_' to _alphanum over _special > approach, but still -1 on the whole idea. I don't use Python enough to care one way or the other. I noticed a bug, I reported it. Y'all are welcome to do as you see fit. Russ __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 19:01:03 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Thu, 08 May 2008 17:01:03 +0000 Subject: [issue2650] re.escape should not escape underscore In-Reply-To: <1208441650.53.0.945063086485.issue2650@psf.upfronthosting.co.za> Message-ID: <1210266063.31.0.538894061008.issue2650@psf.upfronthosting.co.za> A.M. Kuchling added the comment: I haven't assessed the patch, but wouldn't mind to see it applied to an alpha release or to 3.0; +0 from me. Given that the next 2.6 release is planned to be a beta, though, the release manager would have to rule. Note that I don't think this change is actually backwards-incompatible and is actually fairly low-risk. It does change what re.escape will return, but the common use-case is escaping some user- or data-supplied string so that it can be passed to re.compile()without triggering a syntax error or very long loop. In that use-case, whether it returns _ or \_ is immaterial; the result is the same. Doing a Google code search for re.escape confirms that this is the general usage. Interestingly, SCons defines its own re_escape, with a comment saying '# re.escape escapes too much'. But their function doesn't escape \ or $ at all, so I don't understand why they bothered. On the other hand, if this patch doesn't affect the usage of the function, why bother? Matching Perl or other systems probably won't improve interoperability very much, so the release manager might decide to leave well enough alone. ---------- nosy: +akuchling __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 19:10:49 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 08 May 2008 17:10:49 +0000 Subject: [issue2790] sys.flags is missing bytes_warning In-Reply-To: <1210242000.56.0.446699742835.issue2790@psf.upfronthosting.co.za> Message-ID: <1210266649.47.0.402556306174.issue2790@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: -> christian.heimes nosy: +christian.heimes priority: -> high __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 19:15:36 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 08 May 2008 17:15:36 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: Message-ID: <48233530.90600@egenix.com> Marc-Andre Lemburg added the comment: On 2008-05-06 19:10, Guido van Rossum wrote: > Guido van Rossum added the comment: > > On Tue, May 6, 2008 at 1:26 AM, Marc-Andre Lemburg wrote: >> So you've limited the codec design to just doing Unicode<->bytes >> conversions ? > > Yes. This was quite a conscious decision that was not taken lightly, > with lots of community input, quite a while ago. > >> The original codec design was to have the codec decide which >> types to take on input and to generate on output, e.g. to >> escape characters in Unicode (converting Unicode to Unicode), >> work on compressed 8-bit strings (converting 8-bit strings to >> 8-bit strings), etc. > > Unfortunately this design made it hard to reason about the correctness > of code, since (especially in Py3k, where bytes and str are more > different than str and unicode were in 2.x) it's hard to write code > that uses .encode() or .decode() unless it knows which codec is being > used. > > IOW, when translated to 3.0, the design violates the general design > principle that the *type* of a function's or method's return value > should not depend on the *value* of one of the arguments. I understand where this concept originates and usual apply this rule to software design as well, however, in the particular case of codecs, the codec registry and its helper functions are merely interfaces to code that is defined elsewhere. In comparison, the approach is very much like getattr() - you know what the attribute is called, but know nothing about its type until you receive it from the function. The reason codecs where designed like this was to be able to easily stack them. For this to work, only the interfaces need to be defined, without restricting the codecs too much in terms of which types may be used. I'd suggest to lift the type restrictions from the general codecs.c access APIs (PyCodec_*), since they don't really belong there and instead only impose the limitation on PyUnicode and PyString methods .encode() and .decode(). If you then also allow those methods to return *both* PyUnicode and PyString, you'd still have strong typing (only 1 of two possible types is allowed) and stacking streams or having codecs that work on PyUnicode->PyUnicode or PyString->PyString would still be accessible via .encode()/.decode(). >> >> I think you have to ask another question: Is repr() allowed to >> >> return a string (instead of Unicode) in Py3k ? >> > >> > In Py3k, "strings" *are* unicode. The str data type is Unicode. >> >> With "strings" I always refer to 8-bit strings, ie. 8-bit data that >> is encoded in some encoding. > > You will have to change this habit or you will thoroughly confuse both > users and developers of 3.0. "String" refers to the built-in "str" > type which in Py3k is PyUnicode. For the PyString type we use the > built-in type "bytes". Well, I'm confused by the P3k use of terms (esp. because the C type names don't match the Python ones), which is why I'm talking about 8-bit strings and Unicode. Perhaps it's better to use PyString and PyUnicode. >> > If you're asking about repr() possibly returning a bytes instance, >> > definitely not. >> > >> >> If not, then unicode_repr() will have to check the return value of >> >> the codec and convert it back to Unicode as necessary. >> > >> > What codec? >> >> The idea is to have a codec which takes the Unicode object and >> converts it to its repr()-value. >> >> Now, since you apparently cannot >> go the direct way anymore (ie. have the codec encode Unicode to >> Unicode), you'd have to first use a codec which converts the Unicode >> object to its repr()-value represented as bytes object and then >> convert the bytes object back to Unicode in unicode_repr(). >> >> With the original design, this extra step wouldn't have been >> necessary. > > Why does everything have to be a codec? It doesn't. It's just that codecs are so easy to add, change and adjust that reusing the existing code is more attractive than reinventing the wheel every time you need to make a conversion from one text form to another adjustable in some way. In the case addresses by this ticket, I see the usefulness of having native language being written to the console using native glyphs, but there are so many drawbacks to this (see the discussion on the ticket and the mailing list), that I think there needs to be a way to adjust the mechanism or at least be able to revert to the existing repr() output. Furthermore, a codec implementation of what Atsuo has in mind would also be useful in other contexts, e.g. where you want to write PyUnicode to a stream without introducing line breaks. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 19:19:55 2008 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 08 May 2008 17:19: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: <1210267195.01.0.998732048289.issue2630@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'd be happy to have a separate more relaxed API for stackable codecs, however, the API should not be overloaded on the .encode() and .decode() methods on str and bytes objects. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 19:21:10 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 08 May 2008 17:21:10 +0000 Subject: [issue2778] set_swap_bodies is unsafe In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za> Message-ID: <1210267270.09.0.651917902051.issue2778@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Added documentation in r62873. Leaving the code as-is. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 19:24:40 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 08 May 2008 17:24:40 +0000 Subject: [issue2748] ceil(), floor() and round() broken in Decimal In-Reply-To: <1209841852.4.0.852706642988.issue2748@psf.upfronthosting.co.za> Message-ID: <1210267480.47.0.88205882765.issue2748@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> marketdickinson __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 19:29:15 2008 From: report at bugs.python.org (Adam Olsen) Date: Thu, 08 May 2008 17:29:15 +0000 Subject: [issue2778] set_swap_bodies is unsafe In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za> Message-ID: <1210267755.36.0.212287394666.issue2778@psf.upfronthosting.co.za> Adam Olsen added the comment: I've been unable to find any discussion on this feature. If anything, I think when PEP 218 was discussed and accepted (and PEP 351 rejected), the assumption was it didn't exist. Adding it now should be regarded as a new feature and discussed on python-dev. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 19:31:30 2008 From: report at bugs.python.org (Adam Olsen) Date: Thu, 08 May 2008 17:31:30 +0000 Subject: [issue2778] set_swap_bodies is unsafe In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za> Message-ID: <1210267890.83.0.331943297291.issue2778@psf.upfronthosting.co.za> Adam Olsen added the comment: Nevermind that the current implementation *is* broken, even if you consider fixing it to be a low priority. Closing the report with a doc tweak isn't right. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 19:38:28 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 08 May 2008 17:38:28 +0000 Subject: [issue2778] set_swap_bodies is unsafe In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za> Message-ID: <1210268308.31.0.465341338426.issue2778@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, you don't like the search with autopromotion feature. It has been around since sets were first coded in C. It is a natural extension/consequence of the idea that frozenset('abc')==set('abc'). __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 19:43:11 2008 From: report at bugs.python.org (Adam Olsen) Date: Thu, 08 May 2008 17:43:11 +0000 Subject: [issue2778] set_swap_bodies is unsafe In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za> Message-ID: <1210268591.75.0.894874748758.issue2778@psf.upfronthosting.co.za> Adam Olsen added the comment: So why doesn't set() in {} work? Why was PEP 351 rejected when it would do this properly? __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 20:02:29 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 08 May 2008 18:02:29 +0000 Subject: [issue2790] sys.flags is missing bytes_warning In-Reply-To: <1210242000.56.0.446699742835.issue2790@psf.upfronthosting.co.za> Message-ID: <1210269747.55.0.919807868411.issue2790@psf.upfronthosting.co.za> Brett Cannon added the comment: Ralf, can you do a ``make clean`` and then try again? I had this happen to me with an old checkout until I did that and then everything worked fine. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 20:51:52 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 May 2008 18:51:52 +0000 Subject: [issue2651] Strings passed to KeyError do not round trip In-Reply-To: <1208453081.65.0.886847251895.issue2651@psf.upfronthosting.co.za> Message-ID: <1210272712.05.0.342996840873.issue2651@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Wouldn't it be nice to also store the offending key as a "key" attribute? Writing key_error.key is a lot intuitive than key_error.args[0] (or is it key_error.args[1] ? I've already forgotten :-)). ---------- nosy: +pitrou __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 21:32:49 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 08 May 2008 19:32:49 +0000 Subject: [issue2786] Names in traceback should have class names, if they're methods In-Reply-To: <1210191958.85.0.412869826908.issue2786@psf.upfronthosting.co.za> Message-ID: <1210275169.6.0.397473906905.issue2786@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This is similar to issue2516. ---------- nosy: +belopolsky __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 21:53:21 2008 From: report at bugs.python.org (Jean Brouwers) Date: Thu, 08 May 2008 19:53:21 +0000 Subject: [issue2792] alternate fast builtin sum, rev'd In-Reply-To: <1210276400.51.0.762850955818.issue2792@psf.upfronthosting.co.za> Message-ID: <1210276400.51.0.762850955818.issue2792@psf.upfronthosting.co.za> New submission from Jean Brouwers : Here is one more, final attempt to improve fast summation, somewhat. This version inspects the type of both the sum and the first item and adds all ints and floats without any PyNumber_Add() call and in order. Also, the results for this test case are compatible: >>> d = [1000000000000000, -1000000000000000.0, .0000000000000001, .0000000000000001] >>> sum(d) 2e-16 >>> d[0] + sum(d[1:]) 0.0 /Jean Brouwers ---------- components: Interpreter Core files: bltinmodule3.c.diff keywords: patch messages: 66434 nosy: MrJean1 severity: normal status: open title: alternate fast builtin sum, rev'd type: performance versions: Python 2.6 Added file: http://bugs.python.org/file10223/bltinmodule3.c.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 21:58:58 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 08 May 2008 19:58:58 +0000 Subject: [issue2790] sys.flags is missing bytes_warning In-Reply-To: <1210242000.56.0.446699742835.issue2790@psf.upfronthosting.co.za> Message-ID: <1210276737.91.0.592758694771.issue2790@psf.upfronthosting.co.za> Ralf Schmitt added the comment: sure, I even removed the whole source tree: ~/pydev/trunk/ ./python ralf at rat64 ok Python 2.6a3+ (trunk, May 8 2008, 21:52:39) [GCC 4.2.3 (Debian 4.2.3-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> sys.flags sys.flags(debug=0, py3k_warning=0, division_warning=0, division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, unicode=0) You can count the entries manually if you don't believe. The given count is off by one. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 22:02:45 2008 From: report at bugs.python.org (James Nadir) Date: Thu, 08 May 2008 20:02:45 +0000 Subject: [issue2793] Dictionary fails to index when adding list when in a deeply nested loop In-Reply-To: <1210276965.56.0.576720171368.issue2793@psf.upfronthosting.co.za> Message-ID: <1210276965.56.0.576720171368.issue2793@psf.upfronthosting.co.za> New submission from James Nadir : Python fails to correctly add 'lists' into a 'dictionary' in nested loop. The attached py file has two examples; the first is the failing example, the seond is the passing example. This might be a known issue. If so, please accept my apologies, I couldn't find it. Or it could be operator error. Again, my apolgies if it is. ---------- files: play parser.py messages: 66436 nosy: jreadon severity: normal status: open title: Dictionary fails to index when adding list when in a deeply nested loop type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10224/play parser.py __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 22:11:26 2008 From: report at bugs.python.org (Ali Afshar) Date: Thu, 08 May 2008 20:11:26 +0000 Subject: [issue2794] Figure directive not handled for latex writing in Sphinx In-Reply-To: <1210277486.1.0.0867984749288.issue2794@psf.upfronthosting.co.za> Message-ID: <1210277486.1.0.0867984749288.issue2794@psf.upfronthosting.co.za> New submission from Ali Afshar : .. figure:: directive is not handled when writing to latex, and this directive seems the only way to have a captioned image in rst. I have added a patch that simply handles the figure, and captions. Note that figures have an additional component of "legends" but I can't seem to work out what these are. ---------- assignee: georg.brandl components: Documentation tools (Sphinx) files: latex-figure.diff keywords: patch messages: 66437 nosy: aafshar, georg.brandl severity: normal status: open title: Figure directive not handled for latex writing in Sphinx versions: Python 2.5 Added file: http://bugs.python.org/file10225/latex-figure.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 22:25:20 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 08 May 2008 20:25:20 +0000 Subject: [issue2790] sys.flags is missing bytes_warning In-Reply-To: <1210242000.56.0.446699742835.issue2790@psf.upfronthosting.co.za> Message-ID: <1210278320.91.0.511409754469.issue2790@psf.upfronthosting.co.za> Brett Cannon added the comment: Fixed in r62896. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 22:26:38 2008 From: report at bugs.python.org (Tim Pietzcker) Date: Thu, 08 May 2008 20:26:38 +0000 Subject: [issue2780] Python 3.0a4 crashes on script in a path with non-ASCII characters (Windows) In-Reply-To: <1210161548.39.0.205186069105.issue2780@psf.upfronthosting.co.za> Message-ID: <1210278398.09.0.553066067829.issue2780@psf.upfronthosting.co.za> Tim Pietzcker added the comment: I should perhaps add that this happened on a German Windows XP Pro SP2 installation. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 22:27:41 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 08 May 2008 20:27:41 +0000 Subject: [issue2790] sys.flags is missing bytes_warning In-Reply-To: <1210242000.56.0.446699742835.issue2790@psf.upfronthosting.co.za> Message-ID: <1210278460.98.0.0750770603077.issue2790@psf.upfronthosting.co.za> Ralf Schmitt added the comment: why not use sizeof? you'll probably run into this again.. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 22:38:05 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 08 May 2008 20:38:05 +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: <1210279085.65.0.360791989756.issue1342@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm increasing the severity of the bug. It's a still a major show stopper for non-English Windows users. For example see #2780 ---------- priority: normal -> release blocker __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 22:38:26 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 08 May 2008 20:38:26 +0000 Subject: [issue2793] Dictionary fails to index when adding list when in a deeply nested loop In-Reply-To: <1210276965.56.0.576720171368.issue2793@psf.upfronthosting.co.za> Message-ID: <1210279105.98.0.538102654764.issue2793@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: No, there is no problem with Python here. In your "failing" example, you insert the same object ("new_record") into the dictionary. Right, you modify its content, but it is still the same list object; All values in the dictionary are the same object, and are identical... A list object is said "mutable": if you modify it, you modify all other references to the list. A solution is to *copy* the list before adding it into the dictionary, so that the initial list can be modified without impacting the previous entries. By the way, there are at least two more inconsistencies in your example: 1) record!=''or'\n' does not mean what I think you intended. Python reads this as (record != '') or ('\n') Since the right-hand side is a non-empty string, python will evaluate the condition as True value, always. I think you meant something like: record != '' or record != '\n' which can also be written: record not in ('', '\n') 2) new_record !='\n' always succeed, since new_record is a list... ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 22:38:45 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 08 May 2008 20:38:45 +0000 Subject: [issue2790] sys.flags is missing bytes_warning In-Reply-To: <1210242000.56.0.446699742835.issue2790@psf.upfronthosting.co.za> Message-ID: <1210279125.06.0.670152286945.issue2790@psf.upfronthosting.co.za> Ralf Schmitt added the comment: btw, I guess that sentinel entry in that array could also be removed? __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 22:38:37 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 08 May 2008 20:38:37 +0000 Subject: [issue2780] Python 3.0a4 crashes on script in a path with non-ASCII characters (Windows) In-Reply-To: <1210161548.39.0.205186069105.issue2780@psf.upfronthosting.co.za> Message-ID: <1210279117.43.0.670668751938.issue2780@psf.upfronthosting.co.za> Christian Heimes added the comment: Das Problem ist bekannt. Trotzdem danke! ---------- nosy: +christian.heimes resolution: -> duplicate status: open -> closed superseder: -> Crash on Windows if Python runs from a directory with umlauts __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 22:41:33 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 08 May 2008 20:41:33 +0000 Subject: [issue2790] sys.flags is missing bytes_warning In-Reply-To: <1210242000.56.0.446699742835.issue2790@psf.upfronthosting.co.za> Message-ID: <1210279293.22.0.668823437315.issue2790@psf.upfronthosting.co.za> Brett Cannon added the comment: I didn't use sizeof because I didn't think of it; the solution to just change the numbers was right in front of me and I am swamped with other work so I went with what I knew would work. As for removing the array, perhaps, but I don't have time to try that out. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 22:43:28 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 08 May 2008 20:43:28 +0000 Subject: [issue2448] namedtuple breaks refleak tests In-Reply-To: <1206125690.78.0.550983870823.issue2448@psf.upfronthosting.co.za> Message-ID: <1210279408.64.0.367197238172.issue2448@psf.upfronthosting.co.za> Christian Heimes added the comment: The tests are passing again. ---------- resolution: -> out of date status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 22:44:02 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 08 May 2008 20:44:02 +0000 Subject: [issue2790] sys.flags is missing bytes_warning In-Reply-To: <1210242000.56.0.446699742835.issue2790@psf.upfronthosting.co.za> Message-ID: <1210279442.92.0.541224177628.issue2790@psf.upfronthosting.co.za> Ralf Schmitt added the comment: ok brett, I see in IRC you're doing lot's of commits currently. sorry for bothering you. I'll maybe try myself, it's a minor issue anyway... __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 22:44:15 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 08 May 2008 20:44:15 +0000 Subject: [issue1799] PEP 370 In-Reply-To: <1200086609.43.0.542576295235.issue1799@psf.upfronthosting.co.za> Message-ID: <1210279454.9.0.920978729453.issue1799@psf.upfronthosting.co.za> Christian Heimes added the comment: The PEP370 has been accepted and the patch has been applied. ---------- resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 8 23:33:34 2008 From: report at bugs.python.org (Jean Brouwers) Date: Thu, 08 May 2008 21:33:34 +0000 Subject: [issue2792] alternate fast builtin sum, rev'd In-Reply-To: <1210276400.51.0.762850955818.issue2792@psf.upfronthosting.co.za> Message-ID: <1210282413.96.0.173811109782.issue2792@psf.upfronthosting.co.za> Jean Brouwers added the comment: Attached is a slightly better version, making the float loop cleaner. Use this one and disregard the earlier one, bltinmodule3.c.diff. /Jean Brouwers Added file: http://bugs.python.org/file10226/bltinmodule4.c.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 02:31:54 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 09 May 2008 00:31:54 +0000 Subject: [issue2795] rename "Caveat" to "Warning" In-Reply-To: <1210293113.69.0.486539736073.issue2795@psf.upfronthosting.co.za> Message-ID: <1210293113.69.0.486539736073.issue2795@psf.upfronthosting.co.za> New submission from Benjamin Peterson : The reST directive "warning" gives a orange box with "Caveat" in bold letters. I think this makes assumptions about the contents of the box (Warning is broader than caveat). Could it be changed to just "Warning?" ---------- assignee: georg.brandl components: Documentation messages: 66450 nosy: benjamin.peterson, georg.brandl priority: low severity: normal status: open title: rename "Caveat" to "Warning" type: feature request __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 05:54:49 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 09 May 2008 03:54:49 +0000 Subject: [issue2792] alternate fast builtin sum, rev'd In-Reply-To: <1210276400.51.0.762850955818.issue2792@psf.upfronthosting.co.za> Message-ID: <1210305289.36.0.968376189348.issue2792@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 06:42:02 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 09 May 2008 04:42:02 +0000 Subject: [issue2792] alternate fast builtin sum, rev'd In-Reply-To: <1210276400.51.0.762850955818.issue2792@psf.upfronthosting.co.za> Message-ID: <1210308121.97.0.954853334743.issue2792@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, I really do not want to change the existing code. It's clear, does exactly what it's supposed to do, is easily checked for correctness, been seen and exercised in the alphas for a good while. It gives a good tenfold speed-up (YMMV depending on machine and compiler). Also, it is setup in a way that will make it easy to add special handling of LongLongs. I spend several days on the existing code to make sure that the conversions and accumulations exactly matches what sum() was already doing behind the scenes. Then, a good deal of time was spent making before/after timings of various cases and comparing the result to psyco generated code. I'm reluctant to throw-away those efforts and then invest the same time with another patch that cannot produce any signficant speedups. The submitted code is longer and is harder for me to verify that it is correct -- I've spent hours with it already and am not confident about the code. ISTM, that the code is twisting itself in knots just to avoid a single call to PyNumber_Add in an uncommon case. I find the coding style uncomfortable and do not readily see how to extend it to the LongLong case. The existing code follows are series of required steps to assume a type and continuously verify that assumption. Those steps which comprise the bulk of the work are mandatory. So, all you can do with alternate patches is rearrange the loops and in-inlining for a microscopic speed- up at best. There is no new approach here that is worth the time spent reviewing and re-reviewing patches. Unless you can get meaningful speed-ups in the common cases, please stop re-arranging this code. Also, the submission should have been accompanied by a full set of before/after timings across a variety of use cases including short lists, summing all ints, summing all floats, summing a random mix of ints and floats, all longs, etc. And, it would have been nice to have a conceptual statement of what the code purports to do differently -- what you think makes it better. Sorry. I know you're having fun with this. But micro-tweaks at this point are a total waste of time. It takes too much effort to verify correctness, run all the timings, and create code that is maintainable/extendable. Try to be content with the tenfold speedup we've already gotten. A better use of time would be to scan the code base for other places that would benefit from the pattern of assuming a type, verifying the assumption, running type specific code, and falling back if the assumption fails. Focus the effort of common use cases (like for sum() where the effort focused on all ints or all floats and a mixed-case. ---------- resolution: -> rejected status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 07:40:02 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 09 May 2008 05:40:02 +0000 Subject: [issue2795] rename "Caveat" to "Warning" In-Reply-To: <1210293113.69.0.486539736073.issue2795@psf.upfronthosting.co.za> Message-ID: <1210311602.07.0.103957392544.issue2795@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 ---------- nosy: +rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 07:54:12 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 09 May 2008 05:54:12 +0000 Subject: [issue2784] fast builtin sum may leak In-Reply-To: <1210189539.52.0.670446684288.issue2784@psf.upfronthosting.co.za> Message-ID: <1210312452.17.0.746609369218.issue2784@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: -> high __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 08:02:45 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 09 May 2008 06:02:45 +0000 Subject: [issue2795] rename "Caveat" to "Warning" In-Reply-To: <1210293113.69.0.486539736073.issue2795@psf.upfronthosting.co.za> Message-ID: <1210312965.79.0.242396908584.issue2795@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r62926. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 08:09:32 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 09 May 2008 06:09:32 +0000 Subject: [issue2788] ignore file for Mercurial In-Reply-To: <1210198055.49.0.340334928408.issue2788@psf.upfronthosting.co.za> Message-ID: <1210313372.88.0.610579112803.issue2788@psf.upfronthosting.co.za> Georg Brandl added the comment: Added in r62927. ---------- resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 08:10:55 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 09 May 2008 06:10:55 +0000 Subject: [issue2781] Tiny patch to _winreg docs In-Reply-To: <1210170913.28.0.4675266514.issue2781@psf.upfronthosting.co.za> Message-ID: <1210313455.4.0.0454860635375.issue2781@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r62928. ---------- resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 08:52:01 2008 From: report at bugs.python.org (Fredrik Johansson) Date: Fri, 09 May 2008 06:52:01 +0000 Subject: [issue2487] ldexp(x,n) misbehaves when abs(n) is large In-Reply-To: <1206487537.98.0.104101200523.issue2487@psf.upfronthosting.co.za> Message-ID: <1210315921.28.0.629194726624.issue2487@psf.upfronthosting.co.za> Fredrik Johansson added the comment: I'm not qualified to comment on the implementation. The test cases all look right. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 09:07:58 2008 From: report at bugs.python.org (Hasso Tepper) Date: Fri, 09 May 2008 07:07:58 +0000 Subject: [issue2796] Build issues in DragonFly BSD In-Reply-To: <1210316878.4.0.717885872695.issue2796@psf.upfronthosting.co.za> Message-ID: <1210316878.4.0.717885872695.issue2796@psf.upfronthosting.co.za> New submission from Hasso Tepper : The attached patch fixes obvious problems with build in DragonFly BSD platform. Modules/socketmodule.c part adds NetBSD to the blacklist as well - both OS'es use the same Bluetooth stack. Although the code seems to have support for NetBSD stack, the code is stub and it doesn't build. ---------- components: Build files: dragonfly-python25.patch keywords: patch messages: 66457 nosy: hasso severity: normal status: open title: Build issues in DragonFly BSD type: compile error versions: Python 2.5 Added file: http://bugs.python.org/file10227/dragonfly-python25.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 09:13:05 2008 From: report at bugs.python.org (Hasso Tepper) Date: Fri, 09 May 2008 07:13:05 +0000 Subject: [issue2796] Build issues in DragonFly BSD In-Reply-To: <1210316878.4.0.717885872695.issue2796@psf.upfronthosting.co.za> Message-ID: <1210317185.59.0.212862582846.issue2796@psf.upfronthosting.co.za> Changes by Hasso Tepper : Added file: http://bugs.python.org/file10228/dragonfly-python24.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 09:51:46 2008 From: report at bugs.python.org (Hasso Tepper) Date: Fri, 09 May 2008 07:51:46 +0000 Subject: [issue2797] Trunk build issues in DragonFly BSD In-Reply-To: <1210319505.91.0.659015772153.issue2797@psf.upfronthosting.co.za> Message-ID: <1210319505.91.0.659015772153.issue2797@psf.upfronthosting.co.za> New submission from Hasso Tepper : The attached patch fixes trunk build problems in DragonFly BSD. It's trunk version of the issue #2796, but adds one (not DragonFly specific) fix to the Modules/mmapmodule.c - in case of (!HAVE_SYSCONF || !_SC_PAGESIZE) my_getallocationgranularity will not be defined. ---------- components: Build files: dragonfly-python-trunk.patch keywords: patch messages: 66458 nosy: hasso severity: normal status: open title: Trunk build issues in DragonFly BSD type: compile error versions: Python 2.6 Added file: http://bugs.python.org/file10229/dragonfly-python-trunk.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 10:47:20 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 May 2008 08:47:20 +0000 Subject: [issue2723] Truncate __len__() at sys.maxsize In-Reply-To: <1209530191.73.0.609196846233.issue2723@psf.upfronthosting.co.za> Message-ID: <1210322840.28.0.555853314951.issue2723@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well apparently the Java guys think raising an exception would have been a much better idea than the behaviour they are stuck with. There's also in interesting proposal there: """ The ReturnValueTooBigException could even have a method declared as "long size()" that reports the actual size of the collection. """ __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 10:55:46 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 May 2008 08:55:46 +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: <1210323345.71.0.352641644651.issue1342@psf.upfronthosting.co.za> Antoine Pitrou added the comment: There are some problems under Linux too: $ pwd /home/antoine/py3k/h?h? $ ./python Fatal Python error: Py_Initialize: can't initialize sys standard streams Traceback (most recent call last): File "/home/antoine/py3k/pristine/Lib/encodings/__init__.py", line 32, in TypeError: zipimporter() argument 1 must be string without null bytes, not str Abandon ---------- nosy: +pitrou __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 11:08:12 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Fri, 09 May 2008 09:08:12 +0000 Subject: [issue2789] Comparsion datetime objects with None In-Reply-To: <1210220237.26.0.0391645804782.issue2789@psf.upfronthosting.co.za> Message-ID: <1210324092.54.0.640898661541.issue2789@psf.upfronthosting.co.za> Changes by Ralf Schmitt : ---------- nosy: +schmir __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 12:05:00 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 May 2008 10:05:00 +0000 Subject: [issue2798] Crash on non-Windows if Python runs from a non-ASCII directory In-Reply-To: <1210327500.09.0.609692873362.issue2798@psf.upfronthosting.co.za> Message-ID: <1210327500.09.0.609692873362.issue2798@psf.upfronthosting.co.za> New submission from Antoine Pitrou : (Note: I'm splitting this from #1342 because the fix is much simpler in the non-Windows case) py3k does not accept running from a path with non-ascii characters. $ pwd /home/antoine/py3k/h?h? $ ./python Fatal Python error: Py_Initialize: can't initialize sys standard streams Traceback (most recent call last): File "/home/antoine/py3k/pristine/Lib/encodings/__init__.py", line 32, in TypeError: zipimporter() argument 1 must be string without null bytes, not str Abandon The following patch solves the problem by fixing a bug in getargs.c where the "no null bytes" check for non-ASCII strings was wrong. There is still a failing test, test_xmlrpc, apparently because xmlrpc wants to output its path in an HTTP header using the "ascii" encoding... I'd say this is an xmlrpc issue and not an issue with the patch. ---------- components: Interpreter Core files: getargs.patch keywords: patch messages: 66461 nosy: christian.heimes, pitrou severity: normal status: open title: Crash on non-Windows if Python runs from a non-ASCII directory type: crash versions: Python 3.0 Added file: http://bugs.python.org/file10230/getargs.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 12:05:48 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 May 2008 10:05:48 +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: <1210327548.15.0.292804151576.issue1342@psf.upfronthosting.co.za> Antoine Pitrou added the comment: See #2798 for the non-Windows case, with a patch. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 12:19:14 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 May 2008 10:19:14 +0000 Subject: [issue2798] Crash on non-Windows if Python runs from a non-ASCII directory In-Reply-To: <1210327500.09.0.609692873362.issue2798@psf.upfronthosting.co.za> Message-ID: <1210328354.59.0.46263333171.issue2798@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file10230/getargs.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 12:19:24 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 May 2008 10:19:24 +0000 Subject: [issue2798] Crash on non-Windows if Python runs from a non-ASCII directory In-Reply-To: <1210327500.09.0.609692873362.issue2798@psf.upfronthosting.co.za> Message-ID: <1210328364.04.0.53157878498.issue2798@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file10231/getargs.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 12:31:53 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 09 May 2008 10:31:53 +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: <1210329112.66.0.505096173761.issue2799@psf.upfronthosting.co.za> New submission from Marc-Andre Lemburg : The API PyUnicode_AsString() is pretty useless by itself - there's no way to access the size information of the returned string without again going to the Unicode object. I'd suggest to remove the API altogether and not only deprecating it. Furthermore, the API PyUnicode_AsStringAndSize() does not follow the API signature of PyString_AsStringAndSize() in that it passes back the pointer to the string as output parameter. That should be changed as well. Note that PyString_AsStringAndSize() already does this for both 8-bit strings and Unicode, so the special Unicode API is not really needed at all or you may want to rename PyString_AsStringAndSize() to PyUnicode_AsStringAndSize(). Finally, since there are many cases where the string buffer contents are copied to a new buffer, it's probably worthwhile to add a new API which does the copying straight away and also deals with the overflow cases in a central place. I'd suggest PyUnicode_AsChar() (with an API like PyUnicode_AsWideChar()). (this was taken from a comment on #1950) ---------- components: Unicode messages: 66463 nosy: lemburg severity: normal status: open title: Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 13:24:16 2008 From: report at bugs.python.org (Christian Heimes) Date: Fri, 09 May 2008 11:24:16 +0000 Subject: [issue2800] make htmlhelp creates python30a5.chm but msi.py expects pydoc.chm In-Reply-To: <1210332256.72.0.89374241257.issue2800@psf.upfronthosting.co.za> Message-ID: <1210332256.72.0.89374241257.issue2800@psf.upfronthosting.co.za> New submission from Christian Heimes : The sphinx tool chain now creates the htmlhelp files as python30a5.* but the MSI installer packages expects pydoc.chm. Either msi.py or the doc tool chain must be altered. By the way Martin: Should the RM set snapshot to 0 in Tools/msi/msi.py before tagging a release? ---------- assignee: georg.brandl components: Windows messages: 66464 nosy: christian.heimes, georg.brandl, loewis priority: high severity: normal status: open title: make htmlhelp creates python30a5.chm but msi.py expects pydoc.chm type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 13:28:51 2008 From: report at bugs.python.org (Mark Summerfield) Date: Fri, 09 May 2008 11:28:51 +0000 Subject: [issue2801] Py30a5 float.is_integer() raises ValueError In-Reply-To: <1210332530.82.0.122312238822.issue2801@psf.upfronthosting.co.za> Message-ID: <1210332530.82.0.122312238822.issue2801@psf.upfronthosting.co.za> New submission from Mark Summerfield : The new method float.is_integer() introduced in Py30a5 behaves unexpectedly: >>> x = 5.0 >>> x.as_integer_ratio() (5, 1) >>> x.is_integer() Traceback (most recent call last): File "", line 1, in x.is_integer() ValueError: (11, 'Resource temporarily unavailable') I was expecting True. ---------- messages: 66465 nosy: mark severity: normal status: open title: Py30a5 float.is_integer() raises ValueError type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 14:58:03 2008 From: report at bugs.python.org (Eric Smith) Date: Fri, 09 May 2008 12:58:03 +0000 Subject: [issue2772] Add PendingDeprecationWarning for % formatting In-Reply-To: <1210083250.98.0.889504486731.issue2772@psf.upfronthosting.co.za> Message-ID: <1210337883.1.0.653202866171.issue2772@psf.upfronthosting.co.za> Eric Smith added the comment: The attached patch (percent_formatting_pending_deprecation_0.diff) adds both the simple global lock to unicode_mod() and changes warnings.py to use .format() instead of % formatting. I think this is good enough. We should add a warning to the docs saying user code used for warnings should also avoid % formatting. The only problem they'll see, however, is dropping an occasional warning in a multi-threaded app. But I'm not sure yet exactly where this mention would go. I also don't have any tests for this. I haven't found a test of a PendingDeprecationWarning. The biggest problem is that this patch breaks test_doctest with "RuntimeError: dictionary changed size during iteration". I've tried to find out why, but so far it escapes me. If someone else could look at the issue, I'd appreciate it. Added file: http://bugs.python.org/file10232/percent_formatting_pending_deprecation_0.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 15:43:53 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 May 2008 13:43:53 +0000 Subject: [issue2748] ceil(), floor() and round() broken in Decimal In-Reply-To: <1209841852.4.0.852706642988.issue2748@psf.upfronthosting.co.za> Message-ID: <1210340633.45.0.612413366646.issue2748@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for reviewing this, Raymond! Committed, r62938. ---------- status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 15:47:09 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 May 2008 13:47:09 +0000 Subject: [issue2801] Py30a5 float.is_integer() raises ValueError In-Reply-To: <1210332530.82.0.122312238822.issue2801@psf.upfronthosting.co.za> Message-ID: <1210340829.31.0.75126881612.issue2801@psf.upfronthosting.co.za> Mark Dickinson added the comment: Is this on Windows? I can't reproduce it on OS X 10.5.2: Python 3.0a5+ (py3k:62937M, May 9 2008, 09:32:27) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> x = 5.0 >>> x.is_integer() True ---------- nosy: +marketdickinson __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 15:55:12 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 May 2008 13:55:12 +0000 Subject: [issue2801] Py30a5 float.is_integer() raises ValueError In-Reply-To: <1210332530.82.0.122312238822.issue2801@psf.upfronthosting.co.za> Message-ID: <1210341312.73.0.698129974344.issue2801@psf.upfronthosting.co.za> Mark Dickinson added the comment: This should be fixed in r62938. Mark, can you confirm? __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 15:56:02 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 May 2008 13:56:02 +0000 Subject: [issue2801] Py30a5 float.is_integer() raises ValueError In-Reply-To: <1210332530.82.0.122312238822.issue2801@psf.upfronthosting.co.za> Message-ID: <1210341362.79.0.67147387226.issue2801@psf.upfronthosting.co.za> Mark Dickinson added the comment: That should be r62939, not r62938. Sorry. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 16:02:13 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 May 2008 14:02:13 +0000 Subject: [issue2801] Py30a5 float.is_integer() raises ValueError In-Reply-To: <1210332530.82.0.122312238822.issue2801@psf.upfronthosting.co.za> Message-ID: <1210341733.58.0.942487394302.issue2801@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> marketdickinson priority: -> normal __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 16:08:08 2008 From: report at bugs.python.org (Mark Summerfield) Date: Fri, 09 May 2008 14:08:08 +0000 Subject: [issue2802] str.format() :n integer output In-Reply-To: <1210342088.28.0.24987613161.issue2802@psf.upfronthosting.co.za> Message-ID: <1210342088.28.0.24987613161.issue2802@psf.upfronthosting.co.za> New submission from Mark Summerfield : In Py30a5 the 'n' format option is not v. useful for integers: >>> for x in range(8): print("{0:n} ".format(10**x), end="") 1 10 100 1,000 10,000 100,000 1e+06 1e+07 This is because it behaves like g once a number grows large. That makes sense for floats, but since Python has unlimited size integers there is currently no built-in way to get, 10**6 to output as 1,000,000 (or using whatever the user's locale-dependent separator is). (It is easy to write a suitable function for this, but it just seems that n is a bit of a teaser in this regard.) I think that n should stay the same for floats, but for integers should never switch to g, but just use as many separators as needed. ---------- messages: 66471 nosy: mark severity: normal status: open title: str.format() :n integer output type: feature request versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 16:23:29 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 May 2008 14:23:29 +0000 Subject: [issue2802] str.format() :n integer output In-Reply-To: <1210342088.28.0.24987613161.issue2802@psf.upfronthosting.co.za> Message-ID: <1210343009.17.0.490202218735.issue2802@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I think that n should stay the same for floats, but for integers should > never switch to g, but just use as many separators as needed. I agree with this, in principle. It might be some work to implement, though: for floats, Python gets to use the OS-supplied formatting functions. Indeed, it looks as though all that happens here is that the integer is converted to a float before formatting: >>> print("{0:n} ".format(10**400), end="") Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C double For integers, we'd have to roll our own code. I had similar problems trying to implement the 'n' format code for Decimal; in the end I just gave up and left it unimplemented. Maybe using 'n' for an integer should just raise an exception, for now? Eric, what do you think? ---------- assignee: -> eric.smith nosy: +eric.smith, marketdickinson priority: -> normal __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 16:33:43 2008 From: report at bugs.python.org (Mark Summerfield) Date: Fri, 09 May 2008 14:33:43 +0000 Subject: [issue2801] Py30a5 float.is_integer() raises ValueError In-Reply-To: <1210340829.31.0.75126881612.issue2801@psf.upfronthosting.co.za> Message-ID: <200805091533.36266.mark@qtrac.eu> Mark Summerfield added the comment: On 2008-05-09, Mark Dickinson wrote: > Mark Dickinson added the comment: > > Is this on Windows? I can't reproduce it on OS X 10.5.2: > > Python 3.0a5+ (py3k:62937M, May 9 2008, 09:32:27) > [GCC 4.0.1 (Apple Inc. build 5465)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > > >>> x = 5.0 > >>> x.is_integer() > > True I'm on Linux: '3.0a5 (r30a5:62856, May 9 2008, 11:23:06) \n[GCC 4.1.2 20070925 (Red Hat 4.1.2-33)]' >>> (5.).as_integer_ratio() (5, 1) >>> (5.).is_integer() Traceback (most recent call last): File "", line 1, in (5.).is_integer() ValueError: (11, 'Resource temporarily unavailable') (I can't test on Windows because Py30a5 isn't available for it yet.) __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 16:42:21 2008 From: report at bugs.python.org (Eric Smith) Date: Fri, 09 May 2008 14:42:21 +0000 Subject: [issue2802] str.format() :n integer output In-Reply-To: <1210342088.28.0.24987613161.issue2802@psf.upfronthosting.co.za> Message-ID: <1210344141.48.0.781747387278.issue2802@psf.upfronthosting.co.za> Eric Smith added the comment: The reason for this is that 'n' is defined in PEP 3101 as being a float format only, and the rule is that if an integer sees a float format, it does a float conversion and then prints the float with the supplied format. I'd be okay with adding 'n' as an integer format, with the loose definition of "just like 'd', but adding thousands separators". As to the implementation, the OS supplied float formatting does not add thousands separators. I added the function add_thousands_grouping() to Python/pystrtod.c in order implement this for floats. It would be easy to make this same code work for integers (and in fact it might already work, although there are probably memory allocation issues to deal with). Maybe we should bring up modifying the PEP on python-dev or python-3000. This issue exists in 2.6 as well. ---------- components: +Interpreter Core versions: +Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 16:44:16 2008 From: report at bugs.python.org (Mark Summerfield) Date: Fri, 09 May 2008 14:44:16 +0000 Subject: [issue2802] str.format() :n integer output In-Reply-To: <1210343009.17.0.490202218735.issue2802@psf.upfronthosting.co.za> Message-ID: <200805091544.10386.mark@qtrac.eu> Mark Summerfield added the comment: On 2008-05-09, Mark Dickinson wrote: > Mark Dickinson added the comment: > > I think that n should stay the same for floats, but for integers should > > never switch to g, but just use as many separators as needed. > > I agree with this, in principle. It might be some work to implement, > though: for floats, Python gets to use the OS-supplied formatting > functions. Indeed, it looks as though all that happens here is that the > > integer is converted to a float before formatting: > >>> print("{0:n} ".format(10**400), end="") > > Traceback (most recent call last): > File "", line 1, in > OverflowError: Python int too large to convert to C double > > For integers, we'd have to roll our own code. I had similar problems > trying to implement the 'n' format code for Decimal; in the end I just > gave up and left it unimplemented. Maybe using 'n' for an integer should > just raise an exception, for now? > > Eric, what do you think? It isn't hard (in Python): import locale locale.setlocale(locale.LC_ALL, "") separator = locale.localeconv()["thousands_sep"] def n_format(integer, separator): chars = [] for i, char in enumerate(reversed("{0:d}".format(integer))): if i and not i % 3: chars.insert(0, separator) chars.insert(0, char) return "".join(chars) __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 16:53:16 2008 From: report at bugs.python.org (Mark Summerfield) Date: Fri, 09 May 2008 14:53:16 +0000 Subject: [issue2801] Py30a5 float.is_integer() raises ValueError In-Reply-To: <1210332530.82.0.122312238822.issue2801@psf.upfronthosting.co.za> Message-ID: <1210344796.61.0.191591502912.issue2801@psf.upfronthosting.co.za> Mark Summerfield added the comment: OK, I've just built against your fix and it works fine now! Python 3.0a5+ (py3k:60668:62940, May 9 2008, 15:48:15) [GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> (5.).as_integer_ratio() (5, 1) >>> (5.).is_integer() True __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 16:55:01 2008 From: report at bugs.python.org (Eric Smith) Date: Fri, 09 May 2008 14:55:01 +0000 Subject: [issue2802] str.format() :n integer output In-Reply-To: <1210342088.28.0.24987613161.issue2802@psf.upfronthosting.co.za> Message-ID: <1210344901.64.0.233962723221.issue2802@psf.upfronthosting.co.za> Eric Smith added the comment: > It isn't hard (in Python): It's more complex, because the "3" is locale dependent, and is allowed to be something like "3, then 2, then 3, then 1, repeating until the start of the string". See _group() in Lib/locale.py. In any event, the code needs to be in C (sadly). But as I said in my previous comment (which probably crossed paths with yours), this C code already exists. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 16:55:34 2008 From: report at bugs.python.org (Mark Summerfield) Date: Fri, 09 May 2008 14:55:34 +0000 Subject: [issue2802] str.format() :n integer output In-Reply-To: <1210344141.48.0.781747387278.issue2802@psf.upfronthosting.co.za> Message-ID: <200805091555.26526.mark@qtrac.eu> Mark Summerfield added the comment: On 2008-05-09, Eric Smith wrote: > Eric Smith added the comment: > > The reason for this is that 'n' is defined in PEP 3101 as being a float > format only, and the rule is that if an integer sees a float format, it > does a float conversion and then prints the float with the supplied format. > > I'd be okay with adding 'n' as an integer format, with the loose > definition of "just like 'd', but adding thousands separators". > > As to the implementation, the OS supplied float formatting does not add > thousands separators. I added the function add_thousands_grouping() to > Python/pystrtod.c in order implement this for floats. It would be easy > to make this same code work for integers (and in fact it might already > work, although there are probably memory allocation issues to deal with). > > Maybe we should bring up modifying the PEP on python-dev or python-3000. I hope that you do:-) > This issue exists in 2.6 as well. > > ---------- > components: +Interpreter Core > versions: +Python 2.6 > > __________________________________ > Tracker > > __________________________________ __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 17:12:03 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 May 2008 15:12:03 +0000 Subject: [issue2802] str.format() :n integer output In-Reply-To: <1210342088.28.0.24987613161.issue2802@psf.upfronthosting.co.za> Message-ID: <1210345923.18.0.252936246258.issue2802@psf.upfronthosting.co.za> Mark Dickinson added the comment: > As to the implementation, the OS supplied float formatting does not add > thousands separators. I added the function add_thousands_grouping() to > Python/pystrtod.c in order implement this for floats. Excellent! I didn't realise this code was already there. Maybe there's also some way to use it to implement 'n' formatting for Decimal (which in some ways behaves like a hybrid floating-point and integer type). I can't think of any reason that the LC_NUMERIC stuff shouldn't apply to integers as well as floats. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 17:27:05 2008 From: report at bugs.python.org (Matt Harden) Date: Fri, 09 May 2008 15:27:05 +0000 Subject: [issue2803] heapq.heappush called with too few arguments in sched.py In-Reply-To: <1210346823.98.0.261501835489.issue2803@psf.upfronthosting.co.za> Message-ID: <1210346823.98.0.261501835489.issue2803@psf.upfronthosting.co.za> New submission from Matt Harden : In the method scheduler.run in the sched module, heapq.heappush is called with single argument (event). It's a two argument function. The correct call would be heapq.heappush(q, event). This problem is probably not frequently experienced because it only occurs if the delay function modifies the queue, deleting the top entry while sched.run() is waiting to execute it. A patch is attached based on the trunk. ---------- components: Library (Lib) files: sched.py.patch keywords: patch messages: 66480 nosy: mthard severity: normal status: open title: heapq.heappush called with too few arguments in sched.py type: crash versions: Python 2.5, Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10233/sched.py.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 18:19:22 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 May 2008 16:19:22 +0000 Subject: [issue2801] Py30a5 float.is_integer() raises ValueError In-Reply-To: <1210332530.82.0.122312238822.issue2801@psf.upfronthosting.co.za> Message-ID: <1210349962.17.0.743926573342.issue2801@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks, Mark. I've also backported the fix to the trunk in r62943. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 19:57:02 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 May 2008 17:57:02 +0000 Subject: [issue2487] ldexp(x,n) misbehaves when abs(n) is large In-Reply-To: <1206487537.98.0.104101200523.issue2487@psf.upfronthosting.co.za> Message-ID: <1210355822.18.0.688267732511.issue2487@psf.upfronthosting.co.za> Mark Dickinson added the comment: I've committed a (slightly reworked) version of this patch in r62948. Closing this issue; the problem with 1 >> 2**31 is a separate issue. Thanks for the report, Fredrik. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 20:08:58 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 May 2008 18:08:58 +0000 Subject: [issue2664] The position of special value tables (cmathmodule.c) In-Reply-To: <1208738562.06.0.91336742493.issue2664@psf.upfronthosting.co.za> Message-ID: <1210356537.83.0.431210755186.issue2664@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'm actually pretty happy with the tables the way they are; everything's working at the moment, and the current code seems clear enough. Do you have a strong reason to want this change? __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 20:11:02 2008 From: report at bugs.python.org (broadus jones) Date: Fri, 09 May 2008 18:11:02 +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: <1210356662.71.0.0626930710098.issue2782@psf.upfronthosting.co.za> Changes by broadus jones : ---------- nosy: +sbj3 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 20:17:56 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 May 2008 18:17:56 +0000 Subject: [issue2804] Integer right shift raises OverflowError when second operand is large In-Reply-To: <1210357076.66.0.280536518135.issue2804@psf.upfronthosting.co.za> Message-ID: <1210357076.66.0.280536518135.issue2804@psf.upfronthosting.co.za> New submission from Mark Dickinson : In Python 2.6a3: >>> 1 >> (2**31) # unexpected exception Traceback (most recent call last): File "", line 1, in OverflowError: long int too large to convert to int >>> 1 >> (2**31-1) # works as expected 0L It might make more sense for the first expression to return 0 instead. Similarly, perhaps 0 << (2**31) should also return 0. ---------- components: Interpreter Core messages: 66484 nosy: marketdickinson severity: normal status: open title: Integer right shift raises OverflowError when second operand is large type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 22:38:55 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 09 May 2008 20:38:55 +0000 Subject: [issue2804] Integer right shift raises OverflowError when second operand is large In-Reply-To: <1210357076.66.0.280536518135.issue2804@psf.upfronthosting.co.za> Message-ID: <1210365535.71.0.81344275871.issue2804@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Attached patch makes a >> b return 0 for b > maxsize. ---------- keywords: +patch nosy: +belopolsky Added file: http://bugs.python.org/file10234/issue2804.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 22:51:51 2008 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 09 May 2008 20:51:51 +0000 Subject: [issue2805] 2to3 doesn't correct divisions In-Reply-To: <1210366311.62.0.240931801365.issue2805@psf.upfronthosting.co.za> Message-ID: <1210366311.62.0.240931801365.issue2805@psf.upfronthosting.co.za> New submission from Guilherme Polo : Given the sample code: for i in range(len([1, 2]) / 2): pass print 2 / 3 2to3 tells no files need to be modified after running it over this code, but range doesn't accept float values and the print result will differ. Would it be too expensive for 2to3 to suggest changing '/' to '//' ? ---------- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) messages: 66486 nosy: collinwinter, gpolo severity: normal status: open title: 2to3 doesn't correct divisions __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 23:01:42 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 09 May 2008 21:01:42 +0000 Subject: [issue2804] Integer right shift raises OverflowError when second operand is large In-Reply-To: <1210357076.66.0.280536518135.issue2804@psf.upfronthosting.co.za> Message-ID: <1210366902.84.0.176756662548.issue2804@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: On the second thought, it is theoretically possible to have a long int a for which a >> maxsize is not zero because that would require only maxsize/15 digits. I am not sure it is worth the trouble to account for that. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 23:04:56 2008 From: report at bugs.python.org (Collin Winter) Date: Fri, 09 May 2008 21:04:56 +0000 Subject: [issue2805] 2to3 doesn't correct divisions In-Reply-To: <1210366311.62.0.240931801365.issue2805@psf.upfronthosting.co.za> Message-ID: <1210367096.33.0.90122490167.issue2805@psf.upfronthosting.co.za> Collin Winter added the comment: My gut feeling is that the number of cases where both operands are written as literals is exceedingly small when compared to the number of cases where one or both is an identifier. Since 2to3 doesn't support type inference, we'd miss the relevant, interesting cases. However, if you're interested in implementing a fix_literal_division fixer module that would catch these cases, I'd be happy to advise on such a thing :) __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 23:15:05 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 May 2008 21:15:05 +0000 Subject: [issue2804] Integer right shift raises OverflowError when second operand is large In-Reply-To: <1210357076.66.0.280536518135.issue2804@psf.upfronthosting.co.za> Message-ID: <1210367705.78.0.199512926374.issue2804@psf.upfronthosting.co.za> Mark Dickinson added the comment: > On the second thought, it is theoretically possible to have a long int a > for which a >> maxsize is not zero This occurred to me too; somehow this hardly seems worth worrying about- --there are already other problems in longobject.c when integers get very large, and I don't think one more is going to hurt. Perhaps a warning somewhere in the documentation would be appropriate. (It seems to me that if anyone really cares, the *right* thing to do is to limit all integers to be at most maxsize bits long.) Thanks for the patch! I'll take a look. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 23:26:32 2008 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 09 May 2008 21:26:32 +0000 Subject: [issue2805] 2to3 doesn't correct divisions In-Reply-To: <1210366311.62.0.240931801365.issue2805@psf.upfronthosting.co.za> Message-ID: <1210368392.68.0.652583438095.issue2805@psf.upfronthosting.co.za> Guilherme Polo added the comment: If I were to add such fixer, should I wait for changes coming by gsoc projects ? I did a quick pass through 2to3 code a while ago, but I'm very far from understanding it in a good manner so I'm not sure if I should starting doing that now because it looks like a GSoC project is planning to change how 2to3 works. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 9 23:38:46 2008 From: report at bugs.python.org (Mark Summerfield) Date: Fri, 09 May 2008 21:38:46 +0000 Subject: [issue1733134] sqlite3.dll cannot be relocated Message-ID: <1210369126.42.0.831412475042.issue1733134@psf.upfronthosting.co.za> Mark Summerfield added the comment: Unfortunately, this bug appears to affect Py30a5 too (at least on Win XP Home): Python 3.0a5 (py3k:62932M, May 9 2008, 16:23:11) [MSC v.1500 32 bit (Intel)] on win32 IDLE 3.0a5 >>> import sqlite3 Traceback (most recent call last): File "", line 1, in import sqlite3 File "c:\Python30\lib\sqlite3\__init__.py", line 24, in from sqlite3.dbapi2 import * File "c:\Python30\lib\sqlite3\dbapi2.py", line 27, in from _sqlite3 import * ImportError: DLL load failed: The specified module could not be found. ---------- nosy: +mark _____________________________________ Tracker _____________________________________ From report at bugs.python.org Fri May 9 23:51:56 2008 From: report at bugs.python.org (Mark Summerfield) Date: Fri, 09 May 2008 21:51:56 +0000 Subject: [issue2806] Py30a5: Tk Menu Alt-f behaves differently Linux vs Windows In-Reply-To: <1210369916.39.0.944355148013.issue2806@psf.upfronthosting.co.za> Message-ID: <1210369916.39.0.944355148013.issue2806@psf.upfronthosting.co.za> New submission from Mark Summerfield : #Python 3.0a5 (py3k:62932M, May 9 2008, 16:23:11) [MSC v.1500 32 bit #(Intel)] on win32 # # If you run this tiny program on Linux and press Alt+F (Alt-f in Tk # terminology) the File menu pops up as expected. But run it on # Windows Home XP and nothing happens when you press Alt+F. # The problem may be with the code below since IDLE works fine on # Windows, in which case sorry! # However, Grayson's AppB/menu.py example (with suitably fixed print # statements since it was writtend for Py2) is exactly the same: # works fine on Linux but Alt+key does not invoke the menus on Windows. from Tkinter import * class MainWindow: def __init__(self, parent): self.parent = parent menuBar = Frame(self.parent, relief=RAISED, borderwidth=2) menuBar.pack(anchor=N, fill=X) fileMenu = Menubutton(menuBar, text="File", underline=0) fileMenu.pack(side=LEFT) fileMenu.menu = Menu(fileMenu, tearoff=False) for label, command in ( ("New...", self.fileNew), ("Open...", self.fileOpen), ("Quit", self.fileQuit)): fileMenu.menu.add_command(label=label, command=command) fileMenu["menu"] = fileMenu.menu menuBar.tk_menuBar(fileMenu) def fileNew(self, *args): print("fileNew", args) def fileOpen(self, *args): print("fileOpen", args) def fileQuit(self, *args): self.parent.destroy() root = Tk() window = MainWindow(root) root.protocol("WM_DELETE_WINDOW", window.parent.destroy) root.mainloop() ---------- messages: 66492 nosy: mark severity: normal status: open title: Py30a5: Tk Menu Alt-f behaves differently Linux vs Windows type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 00:11:42 2008 From: report at bugs.python.org (Collin Winter) Date: Fri, 09 May 2008 22:11:42 +0000 Subject: [issue2805] 2to3 doesn't correct divisions In-Reply-To: <1210366311.62.0.240931801365.issue2805@psf.upfronthosting.co.za> Message-ID: <1210371101.28.0.647756227017.issue2805@psf.upfronthosting.co.za> Collin Winter added the comment: I say do it before the GSoC projects complete. Those projects will take months, and we can't stop development for that long. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 00:31:29 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 09 May 2008 22:31:29 +0000 Subject: [issue2807] Remove the API PyUnicode_AsString() In-Reply-To: <1210372288.18.0.0163444160616.issue2807@psf.upfronthosting.co.za> Message-ID: <1210372288.18.0.0163444160616.issue2807@psf.upfronthosting.co.za> New submission from Alexandre Vassalotti : Marc-Andre Lemburg noted: BTW: The API PyUnicode_AsString() is pretty useless by itself - there's no way to access the size information of the returned string without again going to the Unicode object. I'd suggest to remove the API altogether and not only deprecating it. Furthermore, the API PyUnicode_AsStringAndSize() does not follow the API signature of PyString_AsStringAndSize() in that it passes back the pointer to the string as output parameter. That should be changed as well. Note that PyString_AsStringAndSize() already does this for both 8-bit strings and Unicode, so the special Unicode API is not really needed at all or you may want to rename PyString_AsStringAndSize() to PyUnicode_AsStringAndSize(). Finally, since there are many cases where the string buffer contents are copied to a new buffer, it's probably worthwhile to add a new API which does the copying straight away and also deals with the overflow cases in a central place. I'd suggest PyUnicode_AsChar() (with an API like PyUnicode_AsWideChar()). ---------- components: Interpreter Core, Unicode messages: 66495 nosy: alexandre.vassalotti, lemburg priority: normal severity: normal status: open title: Remove the API PyUnicode_AsString() type: feature request versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 00:40:01 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 09 May 2008 22:40:01 +0000 Subject: [issue2807] Remove the API PyUnicode_AsString() In-Reply-To: <1210372288.18.0.0163444160616.issue2807@psf.upfronthosting.co.za> Message-ID: <1210372801.62.0.106746780496.issue2807@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Honestly, I am not sure if removing PyUnicode_AsString() is a good idea. There is many cases where the size of the returned string is not needed. Furthermore, this would be a rather major backward-incompatible change to be included in a beta release. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 00:43:18 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 09 May 2008 22:43:18 +0000 Subject: [issue2807] Remove the API PyUnicode_AsString() In-Reply-To: <1210372288.18.0.0163444160616.issue2807@psf.upfronthosting.co.za> Message-ID: <1210372998.55.0.772609263818.issue2807@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Oops, it seems Marc-Andr? has already opened an issue about this. Closing as duplicate. ---------- resolution: -> duplicate status: open -> closed superseder: -> Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 00:45:15 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 09 May 2008 22:45:15 +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: <1210373115.42.0.499712583572.issue2799@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Honestly, I am not sure if removing PyUnicode_AsString() is a good idea. There is many cases where the size of the returned string is not needed. Furthermore, this would be a rather major backward-incompatible change to be included in a beta release. [copied from duplicate issue #2807] ---------- nosy: +alexandre.vassalotti __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 00:51:07 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 09 May 2008 22:51:07 +0000 Subject: [issue2800] make htmlhelp creates python30a5.chm but msi.py expects pydoc.chm In-Reply-To: <1210332256.72.0.89374241257.issue2800@psf.upfronthosting.co.za> Message-ID: <1210373467.44.0.713210946276.issue2800@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is now fixed in r62949. I don't quite understood why this had the priority "high" - it just worked fine the way it was - you just have to manually rename the result file. In any case, I'd appreciate if the file name scheme stays as-is unless a change is mutually agreed upon. As for setting snapshot to 0: absolutely no. This is the privilege of whoever builds the official releases. Even somebody checking out a release tag should not automatically build a release version of the MSI, as it would then be questionable which of them is the official one (they would use the same product code). Setting snapshot to 0 is a privilege of the release engineer. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 01:08:21 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 09 May 2008 23:08:21 +0000 Subject: [issue2804] Integer right shift raises OverflowError when second operand is large In-Reply-To: <1210357076.66.0.280536518135.issue2804@psf.upfronthosting.co.za> Message-ID: <1210374501.34.0.776392085612.issue2804@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'm -1 on this patch (or any other fixing the perceived problem). Special cases aren't special enough to break the rules. If you ever see this error in a real application, you have deeper problems than the exception. ---------- nosy: +loewis __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 01:08:17 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 09 May 2008 23:08:17 +0000 Subject: [issue1267629] pdb: implement "until",fix for 1248119 Message-ID: <1210374497.38.0.403321256197.issue1267629@psf.upfronthosting.co.za> Changes by Benjamin Peterson : Removed file: http://bugs.python.org/file6759/until.patch _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 01:08:57 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 09 May 2008 23:08:57 +0000 Subject: [issue1267629] pdb: implement "until",fix for 1248119 Message-ID: <1210374537.32.0.852438169312.issue1267629@psf.upfronthosting.co.za> Changes by Benjamin Peterson : Added file: http://bugs.python.org/file10235/until.patch _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 01:12:46 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 09 May 2008 23:12:46 +0000 Subject: [issue1733134] sqlite3.dll cannot be relocated In-Reply-To: <1210369126.42.0.831412475042.issue1733134@psf.upfronthosting.co.za> Message-ID: <4824DA69.3070808@v.loewis.de> Martin v. L?wis added the comment: > Unfortunately, this bug appears to affect Py30a5 too (at least on Win XP > Home): I'm somewhat skeptical that this is the same bug, though. Much more likely related to switching to VS 2008 (and I'm skeptical that we can resolve all VS 2008 issues before the release of 3.1). Regards, Martin _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 01:16:15 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 09 May 2008 23:16:15 +0000 Subject: [issue2664] The position of special value tables (cmathmodule.c) In-Reply-To: <1208738562.06.0.91336742493.issue2664@psf.upfronthosting.co.za> Message-ID: <1210374975.9.0.861071677703.issue2664@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Nope, I don't have strong reason. I just thought exceeding 80 line width is a little ugly, and if data and function are close you can refer both more easily. Please feel free to close this entry as "WONT FIX". __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 01:37:43 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 May 2008 23:37:43 +0000 Subject: [issue2804] Integer right shift raises OverflowError when second operand is large In-Reply-To: <1210357076.66.0.280536518135.issue2804@psf.upfronthosting.co.za> Message-ID: <1210376262.5.0.251158173485.issue2804@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'm not sure I understand. What rule would be broken by this patch? __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 02:13:13 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 10 May 2008 00:13:13 +0000 Subject: [issue2804] Integer right shift raises OverflowError when second operand is large In-Reply-To: <1210376262.5.0.251158173485.issue2804@psf.upfronthosting.co.za> Message-ID: <4824E88F.5050501@v.loewis.de> Martin v. L?wis added the comment: > I'm not sure I understand. What rule would be broken by this patch? The (implicit) rule that there is a range limitation on the shift width. The limitation would continue to exist, just not for selected left-hand parameters. This is fairly arbitrary. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 02:27:00 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 10 May 2008 00:27:00 +0000 Subject: [issue2804] Integer right shift raises OverflowError when second operand is large In-Reply-To: <1210374501.34.0.776392085612.issue2804@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, May 9, 2008 at 7:08 PM, Martin v. L?wis wrote: .. > I'm -1 on this patch (or any other fixing the perceived problem). > Special cases aren't special enough to break the rules. > > If you ever see this error in a real application, you have deeper > problems than the exception. That was my first reaction as well, but then I thought that it was easy to fix because the answer is guaranteed to be 0 for ridiculously large right shifts. However, since the patch is not theoretically correct, I would only be +0 on applying it. I also note that the current requirement is that shift fits long rather than Py_ssize_t, which may lead to a >> sys.maxsize being invalid on platforms where sizeof(long) < sizeof(Py_ssize_t). This may be a problem because sys.maxsize is likely to be used as a placeholder for an arbitrary large number. This said, I sill don't feel strongly one way or another. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 02:49:44 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 10 May 2008 00:49:44 +0000 Subject: [issue2804] Integer right shift raises OverflowError when second operand is large In-Reply-To: <1210357076.66.0.280536518135.issue2804@psf.upfronthosting.co.za> Message-ID: <1210380584.45.0.418668171558.issue2804@psf.upfronthosting.co.za> Mark Dickinson added the comment: It's the current behaviour that seems arbitrary to me: a >> b is well- defined, and efficiently computable, for any integer a and nonnegative integer b; it seems odd to have an unnecessary and (from a user's viewpoint) arbitrary limit on the size of b. It's simple to have the operation always succeed, and this seems to me like both the least surprising, and the most correct, thing to do. On the other hand, I can't really think of any real-world uses for large shifts: I'm guessing that in applications a shift of more than 63 or so must be rare. So it probably doesn't matter that much one way or another. Changing the limit on the shift to sys.maxsize rather than LONG_MAX would seem to make some sense, though. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 04:18:24 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 May 2008 02:18:24 +0000 Subject: [issue2755] IDLE ignores module change before restart In-Reply-To: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za> Message-ID: <1210385903.67.0.863870762764.issue2755@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On Windows, I tested this in both 2.5.2 and 3.0a4. In both cases, at paragraph 4 of your report, I got 2 in the shell, as you expected,not 1. I have no idea whether the system difference makes a difference (the TCL and TK binaries are obviously different also), or you did not do what you think you did, or you encountered some random glitch. Perhaps you can try again? If no one can reproduce, we will have to close, but I will wait for now. ---------- nosy: +tjreedy __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 05:03:26 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 May 2008 03:03:26 +0000 Subject: [issue2789] Comparsion datetime objects with None In-Reply-To: <1210220237.26.0.0391645804782.issue2789@psf.upfronthosting.co.za> Message-ID: <1210388606.0.0.90211719358.issue2789@psf.upfronthosting.co.za> Terry J. Reedy added the comment: You actually have it backwards ;-) The arbitrary responses to nonsensical cross-class order comparisons found in 1.x and 2.x are now considered a design bug. They are disappearing in 3.0. Datetime is a fairly recent module (new in 2.3) written to the new standard. The number 1, for instance, in the same comparisons, raises the same exceptions. And the manual specifies this. For instance, the time class section on comparison explicitly says: "In order to stop mixed-type comparisons from falling back to the default comparison by object address, when a time object is compared to an object of a different type, TypeError is raised unless the comparison is == or !=." Closing as invalid. As indicated in the quote, equality comparisons are different from order comparisons. None really is not equal to anything else. This is still true in 3.0. ---------- nosy: +tjreedy resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 07:03:24 2008 From: report at bugs.python.org (Alexandr Zamaraev) Date: Sat, 10 May 2008 05:03:24 +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: <1210395804.83.0.742193178236.issue2782@psf.upfronthosting.co.za> Changes by Alexandr Zamaraev : ---------- nosy: +shura_zam __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 07:41:41 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 10 May 2008 05:41:41 +0000 Subject: [issue2295] cPickle corner case - docs or bug? In-Reply-To: <1205608726.73.0.310899298914.issue2295@psf.upfronthosting.co.za> Message-ID: <1210398101.88.0.891868593318.issue2295@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- nosy: +alexandre.vassalotti __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 08:51:41 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 10 May 2008 06:51:41 +0000 Subject: [issue2804] Integer right shift raises OverflowError when second operand is large In-Reply-To: <1210357076.66.0.280536518135.issue2804@psf.upfronthosting.co.za> Message-ID: <1210402301.81.0.948935875878.issue2804@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I still don't think the improvement in observable behavior is worth the cost of additional code (and as Alexander observes, the patch in file10234 is incorrect in boundary cases). __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 13:00:26 2008 From: report at bugs.python.org (xix xeaon) Date: Sat, 10 May 2008 11:00:26 +0000 Subject: [issue2808] asynchat forgets packets when push is called from a thread In-Reply-To: <1210417225.64.0.883655852515.issue2808@psf.upfronthosting.co.za> Message-ID: <1210417225.64.0.883655852515.issue2808@psf.upfronthosting.co.za> New submission from xix xeaon : okay, my first bug post, hope I do it right. if you push more than 512 bytes (issue2073) from a thread then only the first packet will be sent, all other packets will be forgotten. the remaining packets will be sent when something else happens, like a new connection is opened, or more input data is read. it's also sent when the select times out (default 30 seconds) and starts over. if push is called twice then the first two packets will be sent but the rest will be forgotten. if this problem arises in your code then you can easily fix it with a 0 second timeout for loop(), or preferably something like 0.0001 so that the cpu stays calm ;) you should be able to reproduce this bug with the attached file, just run it and then connect with netcat like: echo "\n" | nc localhost 1100 netcat will print almost 6 and a half lines of x and then the rest after 5 seconds (30 seconds is boring..) or if you have wireshark up then you'll see it easily. and would someone please apply all the patches for this module! =) ---------- components: Library (Lib) files: asyn-delay.py messages: 66510 nosy: xix xeaon severity: normal status: open title: asynchat forgets packets when push is called from a thread type: behavior versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file10236/asyn-delay.py __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 13:21:00 2008 From: report at bugs.python.org (Simon Cross) Date: Sat, 10 May 2008 11:21:00 +0000 Subject: [issue2742] example code does not work In-Reply-To: <1209754679.55.0.840137197769.issue2742@psf.upfronthosting.co.za> Message-ID: <1210418460.11.0.0354236762772.issue2742@psf.upfronthosting.co.za> Simon Cross added the comment: This also affects Python 2.4 and 2.6 on Linux systems. Bug http://bugs.python.org/issue2763 is a duplicate of this one. The issue is that socketmodule.c doesn't convert empty strings to NULLs before passing hptr through to the underlying system getaddrinfo(...). The question is whether to fix the documentation and examples or the socketmodule.c code. ---------- nosy: +hodgestar versions: +Python 2.4, Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 13:33:11 2008 From: report at bugs.python.org (Simon Cross) Date: Sat, 10 May 2008 11:33:11 +0000 Subject: [issue2742] example code does not work In-Reply-To: <1209754679.55.0.840137197769.issue2742@psf.upfronthosting.co.za> Message-ID: <1210419191.71.0.720307733756.issue2742@psf.upfronthosting.co.za> Simon Cross added the comment: Attached a patch to correct the getaddrinfo(...) documentation and the code example in socket.rst. ---------- keywords: +patch Added file: http://bugs.python.org/file10237/getaddrinfo-doesnt-treat-empty-string-as-none.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 13:34:59 2008 From: report at bugs.python.org (Neil Muller) Date: Sat, 10 May 2008 11:34:59 +0000 Subject: [issue2742] example code does not work In-Reply-To: <1209754679.55.0.840137197769.issue2742@psf.upfronthosting.co.za> Message-ID: <1210419299.55.0.16258029817.issue2742@psf.upfronthosting.co.za> Neil Muller added the comment: The documentation says: For *host* and *port*, by passing either an empty string or ``None``, you can pass ``NULL`` to the C API, so the documentation says it should work. This doesn't work because PyString_AsString retruns an empty string, not NULL. The attached patch adds a check in socketmodule.c to fix this for host and port. It's highly debatable whether this is better than fixing the documentation, though. ---------- nosy: +Neil Muller Added file: http://bugs.python.org/file10238/socket_patch.c __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 14:35:49 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 10 May 2008 12:35:49 +0000 Subject: [issue2804] Integer right shift raises OverflowError when second operand is large In-Reply-To: <1210357076.66.0.280536518135.issue2804@psf.upfronthosting.co.za> Message-ID: <1210422949.02.0.838645810935.issue2804@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fair enough. Closing as won't fix. ---------- resolution: -> wont fix status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 14:57:45 2008 From: report at bugs.python.org (Simon Cross) Date: Sat, 10 May 2008 12:57:45 +0000 Subject: [issue2746] ElementTree ProcessingInstruction uses character entities in content In-Reply-To: <1209827546.16.0.534568490293.issue2746@psf.upfronthosting.co.za> Message-ID: <1210424265.29.0.308780748993.issue2746@psf.upfronthosting.co.za> Simon Cross added the comment: cElementTree.ElementTree is a copy of ElementTree.ElementTree with the .parse(...) method replaced, so the original patch for ElementTree should fix cElementTree too. The copying of the ElementTree class into cElementTree happens in the call to boostrap in the init_elementtree() function at the bottom of _elementtree.c. ---------- nosy: +hodgestar __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 15:04:46 2008 From: report at bugs.python.org (Neil Muller) Date: Sat, 10 May 2008 13:04:46 +0000 Subject: [issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor In-Reply-To: <1209986866.69.0.462896858511.issue2768@psf.upfronthosting.co.za> Message-ID: <1210424686.74.0.0371149874202.issue2768@psf.upfronthosting.co.za> Neil Muller added the comment: The attached patch changes most functions in posixmodule which require a filedescriptor to use PyObjectAsDescriptor There are a few cases, where I'm not certain of the usefulness of changing the functions to support objects with fileno that I've left untouched. These are: tcgetpgrp tcsetpgrp closerange dup2 fdopen isatty The extension to these cases is trivial, though. ---------- keywords: +patch nosy: +Neil Muller Added file: http://bugs.python.org/file10239/posixmodule.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 15:07:20 2008 From: report at bugs.python.org (Pedro Werneck) Date: Sat, 10 May 2008 13:07:20 +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: <1210424840.39.0.884966969552.issue2118@psf.upfronthosting.co.za> Changes by Pedro Werneck : Removed file: http://bugs.python.org/file9499/issue_2118_smtplib.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 15:15:54 2008 From: report at bugs.python.org (Rodrigo Bernardo Pimentel) Date: Sat, 10 May 2008 13:15:54 +0000 Subject: [issue2805] 2to3 doesn't correct divisions In-Reply-To: <1210366311.62.0.240931801365.issue2805@psf.upfronthosting.co.za> Message-ID: <1210425354.03.0.0878808415256.issue2805@psf.upfronthosting.co.za> Rodrigo Bernardo Pimentel added the comment: +1 for going ahead and writing a fixer. ---------- nosy: +rbp __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 15:35:04 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 10 May 2008 13:35:04 +0000 Subject: [issue2562] Cannot use non-ascii letters in disutils if setuptools is used. In-Reply-To: <1207475239.5.0.0696358951433.issue2562@psf.upfronthosting.co.za> Message-ID: <1210426504.26.0.590963440571.issue2562@psf.upfronthosting.co.za> Tarek Ziad? added the comment: I think this should also be fixed in 2.5 ---------- versions: +Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 15:38:17 2008 From: report at bugs.python.org (Neil Blakey-Milner) Date: Sat, 10 May 2008 13:38:17 +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: <1210426697.43.0.159883773195.issue2722@psf.upfronthosting.co.za> Neil Blakey-Milner added the comment: This affects OS X too. I'm attaching two patches - one uses malloc to build a bigger string if the existing implementation returns ERANGE, and the other one uses malloc from the start. This was done on the theory that stack memory use would be better/more efficient. However, based on testing, there's no real difference - 16.8usec vs. 17usec - on a rarely-used function. ---------- keywords: +patch nosy: +nbm versions: +Python 2.5 Added file: http://bugs.python.org/file10240/python-getcwd-dual-strategy.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 15:41:21 2008 From: report at bugs.python.org (Neil Blakey-Milner) Date: Sat, 10 May 2008 13:41:21 +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: <1210426881.1.0.104516531628.issue2722@psf.upfronthosting.co.za> Changes by Neil Blakey-Milner : Added file: http://bugs.python.org/file10241/python-getcwd-malloconly.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 15:45:02 2008 From: report at bugs.python.org (Andrews Patrick Rocha Medina) Date: Sat, 10 May 2008 13:45:02 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210427102.95.0.864105626167.issue2775@psf.upfronthosting.co.za> Andrews Patrick Rocha Medina added the comment: I'm working on removing symtable/_symtable ---------- nosy: +andrewsmedina __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 15:47:25 2008 From: report at bugs.python.org (Pedro Werneck) Date: Sat, 10 May 2008 13:47:25 +0000 Subject: [issue837234] Tk.quit and sys.exit cause Fatal Error Message-ID: <1210427245.27.0.799286832386.issue837234@psf.upfronthosting.co.za> Pedro Werneck added the comment: I tried reproducing the bug with the info provided but neither case worked. Since it doesn't mention platform, I'm including the file in case anyone wants to try it on anything other than Linux/Python2.5. ---------- nosy: +werneck Added file: http://bugs.python.org/file10242/issue837234.py ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 10 15:55:22 2008 From: report at bugs.python.org (Neil Muller) Date: Sat, 10 May 2008 13:55:22 +0000 Subject: [issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor In-Reply-To: <1209986866.69.0.462896858511.issue2768@psf.upfronthosting.co.za> Message-ID: <1210427722.38.0.107308385754.issue2768@psf.upfronthosting.co.za> Neil Muller added the comment: Patches to test_posix.py to also test using file objects in os.fstat and such. Added file: http://bugs.python.org/file10243/test_posix.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 16:01:12 2008 From: report at bugs.python.org (Jeremy Thurgood) Date: Sat, 10 May 2008 14:01:12 +0000 Subject: [issue1524825] ConfigParser: accept leading whitespace on options+comments Message-ID: <1210428072.44.0.105263600475.issue1524825@psf.upfronthosting.co.za> Jeremy Thurgood added the comment: This looks very much like a duplicate of issue 1714. Perhaps the two should be merged? ---------- nosy: +jerith _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 16:04:18 2008 From: report at bugs.python.org (Rodrigo Bernardo Pimentel) Date: Sat, 10 May 2008 14:04:18 +0000 Subject: [issue2803] heapq.heappush called with too few arguments in sched.py In-Reply-To: <1210346823.98.0.261501835489.issue2803@psf.upfronthosting.co.za> Message-ID: <1210428258.55.0.286882541612.issue2803@psf.upfronthosting.co.za> Rodrigo Bernardo Pimentel added the comment: +1 on the patch. IIRC, there won't be any more bugfix releases for 2.5.x, but, just in case: the patch doesn't work on 2.5 (though the issue lists it as an affected version - and it is!), so I'm uploading a patch for it (svn tag r252). I started writing a test for it, but it's such an obvious and trivial patch that I think it's unnecessary. ---------- nosy: +rbp Added file: http://bugs.python.org/file10244/sched.py.patch-r252 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 16:10:53 2008 From: report at bugs.python.org (Bruno Gola) Date: Sat, 10 May 2008 14:10:53 +0000 Subject: [issue2535] duplicate Misc.lower In-Reply-To: <1207132804.52.0.0603076560404.issue2535@psf.upfronthosting.co.za> Message-ID: <1210428653.04.0.65378824123.issue2535@psf.upfronthosting.co.za> Bruno Gola added the comment: The patch seems to be ok, worked here applying it to rev62992 (trunk). This "bug" is also on py3k, but Tkinter.py has changed. Could anyone create and send a patch for py3k? ---------- nosy: +brunogola __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 16:11:14 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 10 May 2008 14:11:14 +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: <1210428674.47.0.879458297518.issue2799@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: IMO, it's better to correct API design errors early, rather than going through a deprecation process. Note that PyUnicode_AsString() is also different than its cousind PyString_AsString(). PyString_AsString() is mostly used to access the char* buffer used by the string object in order to change it, e.g. by first constructing a new PyString object and then filling it in by accessing the internal char* buffer directly. Doing the same with PyUnicode_AsString() will not work. What's worse: direct changes would go undetected, since the UTF8 PyString object is held by the PyUnicode object internally. Even if you just use PyUnicode_AsString() for reading and get the size information from somewhere else, the API doesn't make sure that the PyUnicode object doesn't have embedded 0 code points (which PyString_AsString() does). PyUnicode_AsString() would have to use PyString_AsString() for this instead of the PyString_AS_STRING() macro. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 16:15:22 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 10 May 2008 14:15:22 +0000 Subject: [issue2535] duplicate Misc.lower In-Reply-To: <1207132804.52.0.0603076560404.issue2535@psf.upfronthosting.co.za> Message-ID: <1210428922.63.0.719963743197.issue2535@psf.upfronthosting.co.za> Guilherme Polo added the comment: It hasn't changed that much, but here is a patch against py3k branch rev 62992 ---------- nosy: +gpolo Added file: http://bugs.python.org/file10245/remove_lowerdup.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 16:30:00 2008 From: report at bugs.python.org (Pedro Werneck) Date: Sat, 10 May 2008 14:30:00 +0000 Subject: [issue869780] curselection() in Tkinter.py should return ints Message-ID: <1210429800.76.0.386473352022.issue869780@psf.upfronthosting.co.za> Pedro Werneck added the comment: Just a bare self._getints will raise an exception with no item selected and an empty string returned, so I'm adding a patch to check for it and return an empty tuple in that case, or the tuple with ints. It's open for discussion if we should follow Tk documentation strictly and return an empty string if no item selected, or keep consistency with Python and other Tkinter parts and always return a tuple. ---------- keywords: +patch nosy: +werneck Added file: http://bugs.python.org/file10246/issue869780_2.6.patch ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 10 16:32:07 2008 From: report at bugs.python.org (Neil Muller) Date: Sat, 10 May 2008 14:32:07 +0000 Subject: [issue1153769] String interpolation needs PEP 237 update Message-ID: <1210429927.59.0.640886619394.issue1153769@psf.upfronthosting.co.za> Neil Muller added the comment: Update stdtypes.rst to note that %x, %X, %o can take signed values. Note that %u is consider obsolete (referring to PEP 237) Add a note on the length modifier description to clarify the meaning. ---------- keywords: +patch nosy: +Neil Muller Added file: http://bugs.python.org/file10247/stdtypes.tst.diff _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 16:33:03 2008 From: report at bugs.python.org (Pedro Werneck) Date: Sat, 10 May 2008 14:33:03 +0000 Subject: [issue869780] curselection() in Tkinter.py should return ints Message-ID: <1210429983.54.0.0598893641597.issue869780@psf.upfronthosting.co.za> Changes by Pedro Werneck : Added file: http://bugs.python.org/file10248/issue869780_3.patch ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 10 16:45:06 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 10 May 2008 14:45:06 +0000 Subject: [issue869780] curselection() in Tkinter.py should return ints Message-ID: <1210430706.62.0.96571117185.issue869780@psf.upfronthosting.co.za> Guilherme Polo added the comment: Not sure what you did, but calling _getints didn't raise an exception here neither returned an empty string if no item was selected, it returned None. Added file: http://bugs.python.org/file10249/curselection_tupleint.diff ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 10 16:52:04 2008 From: report at bugs.python.org (Pedro Werneck) Date: Sat, 10 May 2008 14:52:04 +0000 Subject: [issue869780] curselection() in Tkinter.py should return ints Message-ID: <1210431124.45.0.759633370068.issue869780@psf.upfronthosting.co.za> Changes by Pedro Werneck : Removed file: http://bugs.python.org/file10246/issue869780_2.6.patch ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 10 16:52:09 2008 From: report at bugs.python.org (Pedro Werneck) Date: Sat, 10 May 2008 14:52:09 +0000 Subject: [issue869780] curselection() in Tkinter.py should return ints Message-ID: <1210431129.25.0.0911892016264.issue869780@psf.upfronthosting.co.za> Changes by Pedro Werneck : Removed file: http://bugs.python.org/file10248/issue869780_3.patch ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 10 16:54:40 2008 From: report at bugs.python.org (Neil Blakey-Milner) Date: Sat, 10 May 2008 14:54:40 +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: <1210431280.86.0.0911406317945.issue2722@psf.upfronthosting.co.za> Neil Blakey-Milner added the comment: Here's a patch to add a test that fails with Python 2.5 on OS X, but passes with either of these patches. Added file: http://bugs.python.org/file10250/python-getcwd-test_longpathnames.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 16:55:40 2008 From: report at bugs.python.org (Simon Cross) Date: Sat, 10 May 2008 14:55:40 +0000 Subject: [issue2736] datetime needs and "epoch" method In-Reply-To: <1209675808.9.0.995048704016.issue2736@psf.upfronthosting.co.za> Message-ID: <1210431340.07.0.35964908819.issue2736@psf.upfronthosting.co.za> Simon Cross added the comment: Attached a patch which adds a .totimetuple(...) method to datetime.datetime and tests for it. The intention is that the dt.totimetuple(...) method is equivalent to: mktime(dt.timetuple()) + (dt.microsecond / 1000000.0) ---------- keywords: +patch nosy: +hodgestar Added file: http://bugs.python.org/file10251/add-datetime-totimestamp-method.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 16:58:24 2008 From: report at bugs.python.org (Pedro Werneck) Date: Sat, 10 May 2008 14:58:24 +0000 Subject: [issue869780] curselection() in Tkinter.py should return ints Message-ID: <1210431504.11.0.31546871357.issue869780@psf.upfronthosting.co.za> Pedro Werneck added the comment: I used the tuple from splitlist() in both cases. I'm not sure if it should return None on an empty selection since that is not documented anywhere. Added file: http://bugs.python.org/file10252/issue869780.py ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 10 17:01:57 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 10 May 2008 15:01:57 +0000 Subject: [issue869780] curselection() in Tkinter.py should return ints Message-ID: <1210431717.5.0.570848047119.issue869780@psf.upfronthosting.co.za> Guilherme Polo added the comment: _getints already call splitlist, so there isn't much point in calling _getints after calling splitlist. And the Tk documentation says an empty string should be returned in case there is no selection, but that is Tk. I don't see any problem in returning None instead of '' here in Python. ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 10 17:35:26 2008 From: report at bugs.python.org (David Fraser) Date: Sat, 10 May 2008 15:35:26 +0000 Subject: [issue1777412] Python's strftime dislikes years before 1900 Message-ID: <1210433726.63.0.0274440501154.issue1777412@psf.upfronthosting.co.za> David Fraser added the comment: I have a patch for this, but I don't know which platforms have the problem. On Linux, strftime seems to work fine. Attaching the patch as a work in progress... ---------- keywords: +patch nosy: +davidfraser Added file: http://bugs.python.org/file10253/strftime-pre-1900.patch _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 17:48:15 2008 From: report at bugs.python.org (Neil Muller) Date: Sat, 10 May 2008 15:48:15 +0000 Subject: [issue2809] string docstring doesn't mention that ' '.split() != ' '.split(' ') In-Reply-To: <1210434494.63.0.105776836693.issue2809@psf.upfronthosting.co.za> Message-ID: <1210434494.63.0.105776836693.issue2809@psf.upfronthosting.co.za> New submission from Neil Muller : split with no sep specified will not return an empty string, whereas split with sep specified will. The attached patch updates the docstring to reflect this for str.split and unicode.split. ---------- files: split_docstring.diff keywords: patch messages: 66536 nosy: Neil Muller severity: normal status: open title: string docstring doesn't mention that ' '.split() != ' '.split(' ') Added file: http://bugs.python.org/file10254/split_docstring.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 17:48:53 2008 From: report at bugs.python.org (Neil Muller) Date: Sat, 10 May 2008 15:48:53 +0000 Subject: [issue2809] string docstring doesn't mention that ' '.split() != ' '.split(' ') In-Reply-To: <1210434494.63.0.105776836693.issue2809@psf.upfronthosting.co.za> Message-ID: <1210434533.73.0.958659536315.issue2809@psf.upfronthosting.co.za> Changes by Neil Muller : ---------- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl versions: +Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 17:50:02 2008 From: report at bugs.python.org (Adrianna Pinska) Date: Sat, 10 May 2008 15:50:02 +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: <1210434602.09.0.775841332125.issue2776@psf.upfronthosting.co.za> Adrianna Pinska added the comment: Ordinarily, request.get_selector() returns the portion of the url after the host, and sel_host is None. However, if a proxy is set on the request, the request's host is set to the proxy host, get_selector() returns the original full url, and sel_host is the host from the original url (and different to the host set on the request). This bug is only triggered if the double slash comes directly after the host and there is no proxy set on the request. do_request_ does not check what get_selector() is returning, so the output is passed through splithost even when this is not necessary, and in this particular case it causes undesirable behaviour. My patch causes do_request_ only to attempt to extract the host from get_selector() if the proxy has been set. ---------- keywords: +patch nosy: +confluence Added file: http://bugs.python.org/file10255/double_slash_after_host.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 17:53:41 2008 From: report at bugs.python.org (Juracy Filho) Date: Sat, 10 May 2008 15:53:41 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210434821.37.0.470061242917.issue2775@psf.upfronthosting.co.za> Juracy Filho added the comment: I'm working on creating http package with httplib, BaseHTTPServer, CGIHTTPServer, SimpleHTTPServer, Cookie and cookielib ---------- nosy: +juracy __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 17:54:43 2008 From: report at bugs.python.org (Simon Cross) Date: Sat, 10 May 2008 15:54:43 +0000 Subject: [issue2736] datetime needs and "epoch" method In-Reply-To: <1209675808.9.0.995048704016.issue2736@psf.upfronthosting.co.za> Message-ID: <1210434883.01.0.0192840951159.issue2736@psf.upfronthosting.co.za> Simon Cross added the comment: Patch adding documentation for datetime.totimestamp(...). Added file: http://bugs.python.org/file10256/add-datetime-totimestamp-method-docs.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 18:13:33 2008 From: report at bugs.python.org (Mauricio Vieira) Date: Sat, 10 May 2008 16:13:33 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210436013.78.0.0710326839213.issue2775@psf.upfronthosting.co.za> Changes by Mauricio Vieira : ---------- nosy: +mbcvieira __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 18:19:30 2008 From: report at bugs.python.org (Jesse Noller) Date: Sat, 10 May 2008 16:19:30 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210436370.7.0.971246557627.issue2775@psf.upfronthosting.co.za> Jesse Noller added the comment: Here is a patch for the Queue module renaming - I can not easily do the actual svn rename to the lowercase queue myself (it's easier to do it with commit privs). Tests pass, documentation updated as well. ---------- keywords: +patch nosy: +jnoller Added file: http://bugs.python.org/file10257/queue_rename.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 18:45:28 2008 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 10 May 2008 16:45:28 +0000 Subject: [issue1777412] Python's strftime dislikes years before 1900 Message-ID: <1210437928.34.0.966509875598.issue1777412@psf.upfronthosting.co.za> Skip Montanaro added the comment: Which version of Python are you using? I could have sworn we just fixed this problem in CVS a couple weeks ago. ---------- nosy: +skip.montanaro _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 19:37:34 2008 From: report at bugs.python.org (Daniel Stutzbach) Date: Sat, 10 May 2008 17:37:34 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : _winreg.EnumValue raises a WindowsError ("More data is available") if the registry data includes multibyte unicode characters. Inspecting PyEnumValue in _winreg.c, I believe I see the problem. The function uses RegQueryInfoKey to determine the maximum data and key name sizes to pass to RegEnumValue. Unfortunately, RegQueryInfoKey returns the size in number of unicode characters, while RegEnumValue expects a size in bytes. This is OK if all the values are ASCII, but it fails if there are any multibyte unicode characters. I believe it would be sufficient to multiply the sizes by 4, since that's the maximum width of a unicode character. The bug exists in at least Python 2.5 and Python 3.0 (based on source code inspection). References: RegEnumValue: http://msdn.microsoft.com/en-us/library/ms724865(VS.85).aspx RegQueryInfoKey: http://msdn.microsoft.com/en-us/library/ms724902(VS.85).aspx ---------- components: Windows messages: 66542 nosy: stutzbach severity: normal status: open title: _winreg.EnumValue fails when the registry data includes multibyte unicode characters type: behavior versions: Python 2.5, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 19:42:32 2008 From: report at bugs.python.org (Dustin J. Mitchell) Date: Sat, 10 May 2008 17:42:32 +0000 Subject: [issue1625509] 'imp' documentation does not mention that lock is re-entrant Message-ID: <1210441352.71.0.889706444755.issue1625509@psf.upfronthosting.co.za> Dustin J. Mitchell added the comment: Patch attached. ---------- keywords: +patch Added file: http://bugs.python.org/file10258/1625509.patch _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 19:48:57 2008 From: report at bugs.python.org (Pedro Werneck) Date: Sat, 10 May 2008 17:48:57 +0000 Subject: [issue869780] curselection() in Tkinter.py should return ints Message-ID: <1210441737.15.0.567276560263.issue869780@psf.upfronthosting.co.za> Pedro Werneck added the comment: Neither I do, but the current version already returns an empty tuple. Since the map(int, curselection) idiom is widely used, changing to int is not likely to break any code, but returning None on empty selection is. ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 10 19:49:15 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 10 May 2008 17:49:15 +0000 Subject: [issue1625509] 'imp' documentation does not mention that lock is re-entrant Message-ID: <1210441755.63.0.962579711351.issue1625509@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Applied to trunk to r62996. ---------- assignee: -> akuchling nosy: +akuchling resolution: -> accepted status: open -> closed _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 19:50:04 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 10 May 2008 17:50:04 +0000 Subject: [issue1858] Make .pypirc handle multiple servers In-Reply-To: <1200573233.93.0.822400680572.issue1858@psf.upfronthosting.co.za> Message-ID: <1210441804.53.0.143211216615.issue1858@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: -> akuchling __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 19:51:43 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 10 May 2008 17:51:43 +0000 Subject: [issue869780] curselection() in Tkinter.py should return ints Message-ID: <1210441903.89.0.124878505704.issue869780@psf.upfronthosting.co.za> Guilherme Polo added the comment: Are you aware of any code checking against empty tuple specifically to verify that nothing is selected ? ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 10 19:52:45 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 10 May 2008 17:52:45 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1210441965.46.0.185203484798.issue2810@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Is that for Python 2.5 or 3.0? ---------- nosy: +loewis __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 19:57:03 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 10 May 2008 17:57:03 +0000 Subject: [issue869780] curselection() in Tkinter.py should return ints Message-ID: <1210442223.61.0.841936223809.issue869780@psf.upfronthosting.co.za> Guilherme Polo added the comment: I found some code using map(int, curselection..) directly, so this new patch fixes the problem related to returning None when nothing was selected. Added file: http://bugs.python.org/file10259/curselection_tupleint.diff ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 10 19:58:06 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 10 May 2008 17:58:06 +0000 Subject: [issue869780] curselection() in Tkinter.py should return ints Message-ID: <1210442286.49.0.882067720409.issue869780@psf.upfronthosting.co.za> Changes by Guilherme Polo : Removed file: http://bugs.python.org/file10259/curselection_tupleint.diff ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 10 19:58:14 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 10 May 2008 17:58:14 +0000 Subject: [issue869780] curselection() in Tkinter.py should return ints Message-ID: <1210442294.47.0.553899656663.issue869780@psf.upfronthosting.co.za> Changes by Guilherme Polo : Removed file: http://bugs.python.org/file10249/curselection_tupleint.diff ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 10 19:58:39 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 10 May 2008 17:58:39 +0000 Subject: [issue869780] curselection() in Tkinter.py should return ints Message-ID: <1210442319.83.0.501420449787.issue869780@psf.upfronthosting.co.za> Changes by Guilherme Polo : Added file: http://bugs.python.org/file10260/curselection_tupleint.diff ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 10 20:01:45 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 10 May 2008 18:01:45 +0000 Subject: [issue2488] Backport sys.maxsize to Python 2.6 In-Reply-To: <1206488150.94.0.908333325517.issue2488@psf.upfronthosting.co.za> Message-ID: <1210442504.96.0.53445272463.issue2488@psf.upfronthosting.co.za> A.M. Kuchling added the comment: djmitchell noticed this patch at the bug day -- should it be committed, or just closed? ---------- nosy: +akuchling __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 20:05:22 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 10 May 2008 18:05:22 +0000 Subject: [issue2488] Backport sys.maxsize to Python 2.6 In-Reply-To: <1206488150.94.0.908333325517.issue2488@psf.upfronthosting.co.za> Message-ID: <1210442722.72.0.508000688019.issue2488@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Oh, and I don't understand Raymond's comment: sys.maxsize isn't an alias for anything, but a new piece of information (the largest size of containers). Maybe that information isn't useful, or 2.6 doesn't always support containers up to that limit, but sys.maxsize doesn't seem to be merely a renaming of something. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 20:11:50 2008 From: report at bugs.python.org (Jonathan Hitchcock) Date: Sat, 10 May 2008 18:11:50 +0000 Subject: [issue1343] XMLGenerator: nice elements In-Reply-To: <1193492035.12.0.0580891111126.issue1343@psf.upfronthosting.co.za> Message-ID: <1210443110.72.0.00443758429377.issue1343@psf.upfronthosting.co.za> Jonathan Hitchcock added the comment: The attached patch makes this new feature optional, by passing the "empty_element_tag" option to the constructor. ---------- nosy: +vhata Added file: http://bugs.python.org/file10261/xml.sax.saxutils.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 20:12:36 2008 From: report at bugs.python.org (Jonathan Hitchcock) Date: Sat, 10 May 2008 18:12:36 +0000 Subject: [issue1343] XMLGenerator: nice elements In-Reply-To: <1193492035.12.0.0580891111126.issue1343@psf.upfronthosting.co.za> Message-ID: <1210443156.17.0.711131877271.issue1343@psf.upfronthosting.co.za> Jonathan Hitchcock added the comment: I have also added some unit tests to test the feature with the option turned on, and off - patch attached. Added file: http://bugs.python.org/file10262/test.test_sax.py.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 20:14:54 2008 From: report at bugs.python.org (Daniel Stutzbach) Date: Sat, 10 May 2008 18:14:54 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441965.46.0.185203484798.issue2810@psf.upfronthosting.co.za> Message-ID: Daniel Stutzbach added the comment: The bug is in both. On Sat, May 10, 2008 at 12:52 PM, Martin v. L?wis wrote: > > Martin v. L?wis added the comment: > > Is that for Python 2.5 or 3.0? > > ---------- > nosy: +loewis > > __________________________________ > Tracker > > __________________________________ > __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 20:23:56 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 May 2008 18:23:56 +0000 Subject: [issue2800] make htmlhelp creates python30a5.chm but msi.py expects pydoc.chm In-Reply-To: <1210332256.72.0.89374241257.issue2800@psf.upfronthosting.co.za> Message-ID: <1210443835.99.0.975846456503.issue2800@psf.upfronthosting.co.za> Georg Brandl added the comment: Martin: I'm sorry that this created work for you; but I had assumed that distributing the new docs created so much work anyways that this wouldn't matter too much :) __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 20:35:18 2008 From: report at bugs.python.org (Pedro Werneck) Date: Sat, 10 May 2008 18:35:18 +0000 Subject: [issue1410739] Add notes to the manual about `is` and methods Message-ID: <1210444518.19.0.120010082838.issue1410739@psf.upfronthosting.co.za> Pedro Werneck added the comment: I agree it's not a good idea to be too much specific about this. The patch attached adds the following footnote to the 'is' operator: Due to automatic garbage-collection, free lists, and the dynamic nature of descriptors, you may notice unusual behaviour in certain combinations of :keyword:`is` operator, like those involving identity comparisons between class and instancemethods, and free instances in the same expression. Check their docs for more info. ---------- nosy: +werneck Added file: http://bugs.python.org/file10263/issue1410739.patch _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 20:37:26 2008 From: report at bugs.python.org (Jonathan Hitchcock) Date: Sat, 10 May 2008 18:37:26 +0000 Subject: [issue1343] XMLGenerator: nice elements In-Reply-To: <1193492035.12.0.0580891111126.issue1343@psf.upfronthosting.co.za> Message-ID: <1210444646.16.0.0903166488044.issue1343@psf.upfronthosting.co.za> Jonathan Hitchcock added the comment: Acting on a comment (with which I agree) that the "empty_elements_tag" wasn't such an obvious name, here's a (combined) patch which uses the name "short_empty_elements" (which was my original gut-feeling idea for the name, before I checked the W3C standard and found that they called them "Empty-Elements tags") instead. Added file: http://bugs.python.org/file10264/short_empty_tag.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 20:39:23 2008 From: report at bugs.python.org (Rodrigo Bernardo Pimentel) Date: Sat, 10 May 2008 18:39:23 +0000 Subject: [issue2798] Crash on non-Windows if Python runs from a non-ASCII directory In-Reply-To: <1210327500.09.0.609692873362.issue2798@psf.upfronthosting.co.za> Message-ID: <1210444763.04.0.294496735014.issue2798@psf.upfronthosting.co.za> Rodrigo Bernardo Pimentel added the comment: The patch works for me, and I agree the test_xmlrpc is an xmlrpc issue. Perhaps unrelated to this issue, but I think it makes this whole unicode getargs situation fragile: I could not understand why the 'z' case (on the switch where this patch applies, starting on line 879 on the patched file) does a PyString_Check(arg) and a PyUnicode_Check(arg), while the corresponding section on case 's' (line 813) only does PyUnicode_Check(arg). Is this really an inconsistency? Maybe this should go into an issue to cleanup this switch, according to the comment at its beginning: /* XXX WAAAAH! 's', 'y', 'z', 'u', 'Z', 'e', 'w', 't' codes all need to be cleaned up! */ ---------- nosy: +rbp __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 20:43:16 2008 From: report at bugs.python.org (Dustin J. Mitchell) Date: Sat, 10 May 2008 18:43:16 +0000 Subject: [issue1174606] Reading /dev/zero causes SystemError Message-ID: <1210444996.36.0.287863073175.issue1174606@psf.upfronthosting.co.za> Dustin J. Mitchell added the comment: While it is a sensible fix for the signed/unsigned problem, David's patch still fails regrtest on my system (amd64), after OOM-killing random other processes :( Andrew's suggestion makes a lot of sense here. Does it make sense for new_buffersize to return (PY_SSIZE_T_MAX+1) in this case, to trigger an overflow (in addition to David's patch)? ---------- nosy: +djmitche _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 20:47:12 2008 From: report at bugs.python.org (Paulo Eduardo Neves) Date: Sat, 10 May 2008 18:47:12 +0000 Subject: [issue2811] doctest doesn't treat unicode literals as specified by the file declared encoding In-Reply-To: <1210445230.87.0.512222933205.issue2811@psf.upfronthosting.co.za> Message-ID: <1210445230.87.0.512222933205.issue2811@psf.upfronthosting.co.za> New submission from Paulo Eduardo Neves : Doctest doesn't obey the specified file encoding for unicode literals. I've put the minimum test case that demonstrate the error in the attached file. The program has the ?# -*- coding: utf-8 -*- as the first line and is saved in this encoding. My computer environment is configured as iso8859-1. Doctest ignores the file encoding specification and interprets the u'?' as u'??' (the utf-8 text decoded as iso8859-1 ) I've reproduced this error in python 2.5 in linux and windows. This is the output of the program below that runs the function normalize from inside doctest and directly from python. They show different results. ********************************************************************** File "doctesteerror.py", line 7, in __main__.normalize Failed example: normalize(u'??') Expected: u'b' Got: u'\xc3\xa1' ********************************************************************** 1 items had failures: 1 of 1 in __main__.normalize ***Test Failed*** 1 failures. without doctest ===>>> b ---------- components: Library (Lib) files: doctesteerror.py messages: 66559 nosy: neves severity: normal status: open title: doctest doesn't treat unicode literals as specified by the file declared encoding type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10265/doctesteerror.py __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 20:52:24 2008 From: report at bugs.python.org (Dustin J. Mitchell) Date: Sat, 10 May 2008 18:52:24 +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: <1210445544.4.0.535158836267.issue1792@psf.upfronthosting.co.za> Dustin J. Mitchell added the comment: This test passes -- is this ready to commit? I see a reduction from 1.9s to 1.5s for the test script in msg59715. ---------- nosy: +djmitche __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 20:53:59 2008 From: report at bugs.python.org (Dustin J. Mitchell) Date: Sat, 10 May 2008 18:53:59 +0000 Subject: [issue1174606] Reading /dev/zero causes SystemError Message-ID: <1210445638.84.0.652702896745.issue1174606@psf.upfronthosting.co.za> Dustin J. Mitchell added the comment: Improved fix; this passes test_file on my system. ---------- keywords: +patch Added file: http://bugs.python.org/file10266/1174606.patch _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 20:54:21 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 10 May 2008 18:54:21 +0000 Subject: [issue1858] Make .pypirc handle multiple servers In-Reply-To: <1200573233.93.0.822400680572.issue1858@psf.upfronthosting.co.za> Message-ID: <1210445661.03.0.121984570085.issue1858@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Is the only purpose of the '-r' in sys.argv code to avoid having to specify arguments multiple times when you're doing multiple commands on a line? Perhaps it would be acceptable to then just drop that bit of code completely; having to specify 'register -r pypi upload -r pypi' isn't the worst thing in the world, and it avoids worrying about oddball corner cases like 'setup.py newcommand -r something-different upload -r pypi'. So, I'd suggest just taking that code out, and then committing the patch. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 20:57:01 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 10 May 2008 18:57:01 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1210445821.81.0.452162951848.issue2810@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you please provide a test case then? The 3.0 code doesn't use RegQueryInfoKey, but RegQueryInfoKeyW. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 20:57:34 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 10 May 2008 18:57:34 +0000 Subject: [issue1858] Make .pypirc handle multiple servers In-Reply-To: <1200573233.93.0.822400680572.issue1858@psf.upfronthosting.co.za> Message-ID: <1210445854.89.0.237523618732.issue1858@psf.upfronthosting.co.za> Tarek Ziad? added the comment: yes that was just for conveniency, so I guess it can be removed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 21:04:46 2008 From: report at bugs.python.org (Jesse Noller) Date: Sat, 10 May 2008 19:04:46 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210446286.23.0.0321950814851.issue2775@psf.upfronthosting.co.za> Jesse Noller added the comment: Here is a patch for the required changes to rename SocketServer.py - tests pass after I manually rename SocketServer.py locally. Again skipping the svn rename of the actual module. Doc updates included. Added file: http://bugs.python.org/file10267/socketserver_rename.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 21:10:58 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 10 May 2008 19:10:58 +0000 Subject: [issue2812] Document property.getter/setter/deleter etc Message-ID: <1210446658.24.0.980613599001.issue2812@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: georg.brandl components: Documentation files: getter_setter_deleter_doc.patch keywords: patch nosy: benjamin.peterson, georg.brandl severity: normal status: open title: Document property.getter/setter/deleter etc Added file: http://bugs.python.org/file10268/getter_setter_deleter_doc.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 21:11:14 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 10 May 2008 19:11:14 +0000 Subject: [issue2800] make htmlhelp creates python30a5.chm but msi.py expects pydoc.chm In-Reply-To: <1210443835.99.0.975846456503.issue2800@psf.upfronthosting.co.za> Message-ID: <4825F34D.6040608@v.loewis.de> Martin v. L?wis added the comment: > Martin: I'm sorry that this created work for you; but I had assumed that > distributing the new docs created so much work anyways that this > wouldn't matter too much :) The remaining issue is to get Tools/buildbot/buildmsi.bat to name the generated hhp file correctly. Regards, Martin __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 21:16:33 2008 From: report at bugs.python.org (Jesse Noller) Date: Sat, 10 May 2008 19:16:33 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210446993.05.0.307712648942.issue2775@psf.upfronthosting.co.za> Jesse Noller added the comment: I'm working on xmlrpc/* changes __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 21:24:41 2008 From: report at bugs.python.org (Jeremy Hylton) Date: Sat, 10 May 2008 19:24:41 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210447481.54.0.186226193519.issue2775@psf.upfronthosting.co.za> Jeremy Hylton added the comment: I think we should move robotparser into the urllib package. Anyone disagree? Jeremy __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 21:27:21 2008 From: report at bugs.python.org (Adam Olsen) Date: Sat, 10 May 2008 19:27:21 +0000 Subject: [issue1174606] Reading /dev/zero causes SystemError Message-ID: <1210447641.62.0.846756791232.issue1174606@psf.upfronthosting.co.za> Adam Olsen added the comment: new_buffersize returns a size_t. You should use SIZE_MAX instead (although I don't see it used elsewhere in CPython, so maybe there's portability problems.) The call to _PyString_Resize implicitly casts the size_t to Py_ssize_t. The check against PY_SSIZE_T_MAX does make this safe, but a comment would make it more obvious. The latest patch uses spaces for indentation, which don't match up with the existing tabs. ---------- nosy: +Rhamphoryncus _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 21:29:47 2008 From: report at bugs.python.org (Jesse Noller) Date: Sat, 10 May 2008 19:29:47 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210447787.59.0.150374306303.issue2775@psf.upfronthosting.co.za> Jesse Noller added the comment: Should DocXMLRPCServer.py be moved into xmlrpc/ as well? __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 21:34:07 2008 From: report at bugs.python.org (Jeremy Thurgood) Date: Sat, 10 May 2008 19:34:07 +0000 Subject: [issue1491] BaseHTTPServer incorrectly implements response code 100 In-Reply-To: <1195822360.07.0.215272908737.issue1491@psf.upfronthosting.co.za> Message-ID: <1210448047.58.0.340955792809.issue1491@psf.upfronthosting.co.za> Jeremy Thurgood added the comment: Added handling for "Expect: 100-continue" header to BaseHTTPRequestHandler. By default, any request that has this header gets a 100 Continue response (with no other headers) before do_WHATEVER() is called. By overriding handle_expect_100(), you can reject incoming requests instead of sending a 100 Continue if you so desire. Refactoring as per comments above was also performed. Note: This patch changes the default behaviour in the case where both the client and the server claim to support HTTP/1.1 from doing nothing in the case of an "Expect: 100-continue" header on the request to sending a 100 Continue response and then completing the request as normal. ---------- keywords: +patch nosy: +jerith Added file: http://bugs.python.org/file10269/BaseHTTPServer_continue.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 21:36:47 2008 From: report at bugs.python.org (Jeremy Thurgood) Date: Sat, 10 May 2008 19:36:47 +0000 Subject: [issue1491] BaseHTTPServer incorrectly implements response code 100 In-Reply-To: <1195822360.07.0.215272908737.issue1491@psf.upfronthosting.co.za> Message-ID: <1210448207.7.0.548378953501.issue1491@psf.upfronthosting.co.za> Jeremy Thurgood added the comment: The above patch adds a set of tests for BaseHTTPServer, although the only tests actually written were those around the areas touched by the work done for this issue. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 21:46:51 2008 From: report at bugs.python.org (Rodrigo Bernardo Pimentel) Date: Sat, 10 May 2008 19:46:51 +0000 Subject: [issue2723] Truncate __len__() at sys.maxsize In-Reply-To: <1209530191.73.0.609196846233.issue2723@psf.upfronthosting.co.za> Message-ID: <1210448811.71.0.166028568848.issue2723@psf.upfronthosting.co.za> Rodrigo Bernardo Pimentel added the comment: I think returning sys.{maxint,maxsize} in this case is a plain lie. That's not practicality, that's giving back false information. Barring drastic language changes (such as having objects representing "infinity" or "greater than" - which, of course, won't happen), I think the current behaviour of raising an exception is the correct one. But, although I think OverflowError is good enough, the current exception message is a bit cryptic, especially for anyone who doesn't know C: """OverflowError: Python int too large to convert to C ssize_t""" I've attached a simple patch (modified from Alexander's) to raise: """OverflowError: Length too large""" (I thought about "Object too large", but our problem is actually that the *length* itself is too large) ---------- nosy: +rbp Added file: http://bugs.python.org/file10270/len_message.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 21:52:13 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 10 May 2008 19:52:13 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210447787.59.0.150374306303.issue2775@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Sat, May 10, 2008 at 12:29 PM, Jesse Noller wrote: > > Jesse Noller added the comment: > > Should DocXMLRPCServer.py be moved into xmlrpc/ as well? Yes, and end up in the server module. That was just an oversight on my part. The PEP has been updated. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 21:54:27 2008 From: report at bugs.python.org (Pedro Werneck) Date: Sat, 10 May 2008 19:54:27 +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: <1210449267.25.0.107124604637.issue2378@psf.upfronthosting.co.za> Pedro Werneck added the comment: Just note the error happens even without the try/except block inside the 'if' statement. ---------- nosy: +werneck __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 21:55:06 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 10 May 2008 19:55:06 +0000 Subject: [issue1858] Make .pypirc handle multiple servers In-Reply-To: <1200573233.93.0.822400680572.issue1858@psf.upfronthosting.co.za> Message-ID: <1210449306.81.0.829218560142.issue1858@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Committed to trunk as r62998; thank you very much for the patch! ---------- keywords: -easy resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 21:58:17 2008 From: report at bugs.python.org (Dustin J. Mitchell) Date: Sat, 10 May 2008 19:58:17 +0000 Subject: [issue1187] pipe fd handling issues in subprocess.py on POSIX In-Reply-To: <1190400129.03.0.21752289973.issue1187@psf.upfronthosting.co.za> Message-ID: <1210449497.7.0.602973839617.issue1187@psf.upfronthosting.co.za> Dustin J. Mitchell added the comment: I see that, on running your fix_fileno.py, nothing is output to /tmp/stdout.test. I don't necessarily see the link to your fix. Could you describe the problem and/or add comments to your patch to explain why these checks are made? ---------- nosy: +djmitche __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 21:59:47 2008 From: report at bugs.python.org (Dustin J. Mitchell) Date: Sat, 10 May 2008 19:59:47 +0000 Subject: [issue1174606] Reading /dev/zero causes SystemError Message-ID: <1210449587.56.0.0982712050383.issue1174606@psf.upfronthosting.co.za> Dustin J. Mitchell added the comment: Thanks, Adam -- requested changes made Added file: http://bugs.python.org/file10271/1174606-2.patch _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 22:01:55 2008 From: report at bugs.python.org (Bruno Gola) Date: Sat, 10 May 2008 20:01:55 +0000 Subject: [issue2345] Using an exception variable outside an 'except' clause should raise a Py3K warning In-Reply-To: <1205778549.05.0.340690581025.issue2345@psf.upfronthosting.co.za> Message-ID: <1210449714.99.0.78651921723.issue2345@psf.upfronthosting.co.za> Bruno Gola added the comment: see http://bugs.python.org/issue2380, I think that it's related. the only reason i see for nested tuples to be valid syntax in an except clause was: x = ValueError y = (TypeError, IndexError) ... except (x, y): ... and this will not be valid in py3k, as noticed here. ---------- nosy: +brunogola __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 22:02:56 2008 From: report at bugs.python.org (Bruno Gola) Date: Sat, 10 May 2008 20:02:56 +0000 Subject: [issue2380] Raise a Py3K warning for catching nested tuples with non-BaseException exceptions In-Reply-To: <1205812263.49.0.840453912449.issue2380@psf.upfronthosting.co.za> Message-ID: <1210449776.9.0.634905770778.issue2380@psf.upfronthosting.co.za> Bruno Gola added the comment: Should nested tuples in an except clause be a valid syntax? like: ... except ((ValueError, Exception), TypeError, (...)): pass I don't see any benefit and because of this behavior the implementation (in Python/errors.c and in the patch attached) will use recursive function. I think that any objects inside a tuple in an except clause should be treated equally (as an object), even a tuple, so the except clause above should be an error in py3k and should produce a warning because the list objects does not inherits BaseException. Please, see my comment in http://bugs.python.org/issue2345, it is related to this issue. ---------- nosy: +brunogola __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 22:16:20 2008 From: report at bugs.python.org (Jeremy Hylton) Date: Sat, 10 May 2008 20:16:20 +0000 Subject: [issue1348] httplib closes socket, then tries to read from it In-Reply-To: <1193532553.16.0.237482805264.issue1348@psf.upfronthosting.co.za> Message-ID: <1210450580.44.0.765615755989.issue1348@psf.upfronthosting.co.za> Changes by Jeremy Hylton : ---------- nosy: +jhylton __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 22:16:53 2008 From: report at bugs.python.org (Adam Olsen) Date: Sat, 10 May 2008 20:16:53 +0000 Subject: [issue1174606] Reading /dev/zero causes SystemError Message-ID: <1210450613.43.0.21912156651.issue1174606@psf.upfronthosting.co.za> Adam Olsen added the comment: The indentation still needs tweaking. You have only one tab where you should have two, and one line uses a mix of tabs and spaces. _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 22:17:40 2008 From: report at bugs.python.org (Jonatas Oliveira) Date: Sat, 10 May 2008 20:17:40 +0000 Subject: [issue1714] ConfigParser.py do not allow leading (and trailing) space in values. In-Reply-To: <1199115002.03.0.289718233868.issue1714@psf.upfronthosting.co.za> Message-ID: <1210450660.83.0.516217434053.issue1714@psf.upfronthosting.co.za> Jonatas Oliveira added the comment: The cfgparser_doublequotes_r61014.patch works for me. I disagree wrapping a double quoted string with another double quote, it's more elegant using single quote like python's string behavior, but I don't know if is acceptable for a .ini file. PS: Like Jeremy Thurgood said in msg66523, this is almost the same of issue 1524825. ---------- nosy: +jonatasoliveira __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 22:23:29 2008 From: report at bugs.python.org (Jonatas Oliveira) Date: Sat, 10 May 2008 20:23:29 +0000 Subject: [issue1524825] ConfigParser: accept leading whitespace on options+comments Message-ID: <1210451009.15.0.793763441247.issue1524825@psf.upfronthosting.co.za> Jonatas Oliveira added the comment: The patch cfgparser_comments.patch works for me. I agree with Jeremy Thurgood about the issue 1714. ---------- nosy: +jonatasoliveira _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 22:41:48 2008 From: report at bugs.python.org (David Fraser) Date: Sat, 10 May 2008 20:41:48 +0000 Subject: [issue1777412] Python's strftime dislikes years before 1900 Message-ID: <1210452108.67.0.346434534295.issue1777412@psf.upfronthosting.co.za> David Fraser added the comment: > Which version of Python are you using? I could have sworn we just fixed this problem in CVS a couple weeks ago. This was on the latest Python 2.6 svn... but looking at the py3k branch with viewsvn the code is definitely still there too... The relevant commit seems to be r30224 in 2002: > I give up: unless I write my own strftime by hand, datetime just can't be trusted with years before 1900, so now we raise ValueError if a date or datetime or datetimetz .strftime() method is called with a year before 1900. Of course I'm not dealing with any of this in the attached patch, but then I don't have the information on which platforms have the problem... but according to the above writing strftime by hand would be the only solution... _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 22:48:19 2008 From: report at bugs.python.org (David Fraser) Date: Sat, 10 May 2008 20:48:19 +0000 Subject: [issue2736] datetime needs and "epoch" method In-Reply-To: <1209675808.9.0.995048704016.issue2736@psf.upfronthosting.co.za> Message-ID: <1210452499.68.0.526858217683.issue2736@psf.upfronthosting.co.za> Changes by David Fraser : ---------- nosy: +davidfraser __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 23:04:54 2008 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 10 May 2008 21:04:54 +0000 Subject: [issue1777412] Python's strftime dislikes years before 1900 Message-ID: <1210453493.18.0.64462781244.issue1777412@psf.upfronthosting.co.za> Skip Montanaro added the comment: Ah, I remember now. It was a special case for xmlrpclib to allow its Date objects to operate before 1900. _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 10 23:09:07 2008 From: report at bugs.python.org (duane Bailey) Date: Sat, 10 May 2008 21:09:07 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> New submission from duane Bailey : There appears to be most of the formatting options in the *printf family... except for the obvious %f. Why is this crucial option missing? ---------- components: Extension Modules, Interpreter Core messages: 66586 nosy: duaneb severity: normal status: open title: No float formatting in PyString_FromFormat type: feature request versions: Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5, Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 10 23:14:55 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sat, 10 May 2008 21:14:55 +0000 Subject: [issue756982] mailbox should use email not rfc822 Message-ID: <1210454095.77.0.86652958783.issue756982@psf.upfronthosting.co.za> Humberto Diogenes added the comment: synx's patch wasn't applying cleanly and broke 2 maildir tests. I'm posting one with updated tests and documentation. Still need to get rid of rfc822 in test_mailbox, though. Question: mailbox.py has one section marked as "classes from the original module (for backward compatibility)". Shouldn't these be removed in py3k? ---------- nosy: +hdiogenes Added file: http://bugs.python.org/file10272/mailbox.py.patch2 ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 10 23:48:34 2008 From: report at bugs.python.org (Andrews Patrick Rocha Medina) Date: Sat, 10 May 2008 21:48:34 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210456114.8.0.801256770043.issue2775@psf.upfronthosting.co.za> Andrews Patrick Rocha Medina added the comment: I add deprecated warnings symtable/_symtable in python 2.6 Added file: http://bugs.python.org/file10273/deprecated_symtable_on_py26.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 00:04:21 2008 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sat, 10 May 2008 22:04:21 +0000 Subject: [issue2755] IDLE ignores module change before restart In-Reply-To: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za> Message-ID: <1210457061.57.0.366016765039.issue2755@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: When you "open" a python file, exactly what steps are you taking? When you "close any combination of IDLE windows,( but not all)", are you leaving update.py open so you can "run" it? When you "run" a file, exactly what steps are you taking? When you add files to the tracker, please use plain text files so they can be opened in a browser, without firing up Office! ---------- nosy: +kbk __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 00:19:59 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 10 May 2008 22:19:59 +0000 Subject: [issue756982] mailbox should use email not rfc822 Message-ID: <1210457998.88.0.601996925286.issue756982@psf.upfronthosting.co.za> A.M. Kuchling added the comment: I think removing those old classes in 3.0 would be very sensible. ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 11 00:22:13 2008 From: report at bugs.python.org (Jonatas Oliveira) Date: Sat, 10 May 2008 22:22:13 +0000 Subject: [issue1714] ConfigParser.py do not allow leading (and trailing) space in values. In-Reply-To: <1199115002.03.0.289718233868.issue1714@psf.upfronthosting.co.za> Message-ID: <1210458133.8.0.353280905802.issue1714@psf.upfronthosting.co.za> Jonatas Oliveira added the comment: Btw, i ran all tests before write "works for me" message. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 00:32:22 2008 From: report at bugs.python.org (Pedro Werneck) Date: Sat, 10 May 2008 22:32:22 +0000 Subject: [issue869780] curselection() in Tkinter.py should return ints Message-ID: <1210458742.11.0.827411760111.issue869780@psf.upfronthosting.co.za> Changes by Pedro Werneck : Removed file: http://bugs.python.org/file10252/issue869780.py ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 11 00:53:56 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sat, 10 May 2008 22:53:56 +0000 Subject: [issue1581906] test_sqlite fails on OS X if test_ctypes is run Message-ID: <1210460036.35.0.654722832369.issue1581906@psf.upfronthosting.co.za> Humberto Diogenes added the comment: Skip, I had the same problem as you, with the same solution. On a MacBook Pro running Mac OS X 10.5.2, running test_ctypes and test_sqlite together would kill my machine. Found another installation of sqlite3 on /usr/local, removed it and now the test works fine. ---------- nosy: +hdiogenes title: test_sqlite fails on OSX G5 arch if test_ctypes is run -> test_sqlite fails on OS X if test_ctypes is run _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sun May 11 02:28:41 2008 From: report at bugs.python.org (Dustin J. Mitchell) Date: Sun, 11 May 2008 00:28:41 +0000 Subject: [issue1174606] Reading /dev/zero causes SystemError Message-ID: <1210465720.83.0.109753390645.issue1174606@psf.upfronthosting.co.za> Dustin J. Mitchell added the comment: Ack, sorry. My 'vi' settings should now be correct. Added file: http://bugs.python.org/file10274/1174606-3.patch _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sun May 11 02:45:46 2008 From: report at bugs.python.org (Andrews Patrick Rocha Medina) Date: Sun, 11 May 2008 00:45:46 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210466746.5.0.686257795585.issue2775@psf.upfronthosting.co.za> Changes by Andrews Patrick Rocha Medina : Removed file: http://bugs.python.org/file10273/deprecated_symtable_on_py26.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 02:57:58 2008 From: report at bugs.python.org (Sergio Oliveira Campos) Date: Sun, 11 May 2008 00:57:58 +0000 Subject: [issue1874] email parser does not register a defect for invalid Content-Transfer-Encoding on multipart messages In-Reply-To: <1200767841.97.0.882225337338.issue1874@psf.upfronthosting.co.za> Message-ID: <1210467477.82.0.347331923265.issue1874@psf.upfronthosting.co.za> Sergio Oliveira Campos added the comment: Added check to conform RFC2045 (section 6.4) for Python 2.6 ---------- nosy: +seocam Added file: http://bugs.python.org/file10275/issue1874-fixed-2.6.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 03:06:09 2008 From: report at bugs.python.org (Vinicius Baggio Fuentes) Date: Sun, 11 May 2008 01:06:09 +0000 Subject: [issue1874] email parser does not register a defect for invalid Content-Transfer-Encoding on multipart messages In-Reply-To: <1200767841.97.0.882225337338.issue1874@psf.upfronthosting.co.za> Message-ID: <1210467969.28.0.110920279369.issue1874@psf.upfronthosting.co.za> Changes by Vinicius Baggio Fuentes : ---------- nosy: +vinibaggio __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 04:01:38 2008 From: report at bugs.python.org (samwyse) Date: Sun, 11 May 2008 02:01:38 +0000 Subject: [issue1491] BaseHTTPServer incorrectly implements response code 100 In-Reply-To: <1210448047.58.0.340955792809.issue1491@psf.upfronthosting.co.za> Message-ID: <9d4553440805101901u20119774i146194945bd2acb9@mail.gmail.com> samwyse added the comment: Although any given implementation of an HTTP server is likely to serve up its headers in a predicable, repeatable, order, I don't think that we should specify a particular order in the test suite. Section 4.2 of RFC 2616 specifically states, "The order in which header fields with differing field names are received is not significant." So, I dislike these (and similar) statements in the patch: + self.assertTrue(result[1].startswith('Server: ')) + self.assertTrue(result[2].startswith('Date: ')) + self.assertTrue(result[3].startswith('Content-Type: ')) I think it would be better to say this: + self.assertEqual(sum(r.startswith('Server: ') for r in result[1:-1]), 1) + self.assertEqual(sum(r.startswith('Date: ') for r in result[1:-1]), 1) + self.assertEqual(sum(r.startswith('Content-Type: ') for r in result[1:-1]), 1) or even this: + # Verify that certain message headers occur exactly once. + for fieldName in 'Server: ', 'Date: ', 'Content-Type: ': + self.assertEqual(sum(r.startswith(fieldName) for r in result[1:-1]), 1) (Note that in test_with_continue_1_1, you'd need to say result[2:-1].) On Sat, May 10, 2008 at 2:34 PM, Jeremy Thurgood wrote: > > Jeremy Thurgood added the comment: > > Added handling for "Expect: 100-continue" header to > BaseHTTPRequestHandler. By default, any request that has this header > gets a 100 Continue response (with no other headers) before > do_WHATEVER() is called. By overriding handle_expect_100(), you can > reject incoming requests instead of sending a 100 Continue if you so desire. > > Refactoring as per comments above was also performed. > > Note: This patch changes the default behaviour in the case where both > the client and the server claim to support HTTP/1.1 from doing nothing > in the case of an "Expect: 100-continue" header on the request to > sending a 100 Continue response and then completing the request as normal. > > ---------- > keywords: +patch > nosy: +jerith > Added file: http://bugs.python.org/file10269/BaseHTTPServer_continue.patch > > __________________________________ > Tracker > > __________________________________ > __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 04:49:33 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sun, 11 May 2008 02:49:33 +0000 Subject: [issue2814] Remove old classes from mailbox module In-Reply-To: <1210474172.02.0.543540826671.issue2814@psf.upfronthosting.co.za> Message-ID: <1210474172.02.0.543540826671.issue2814@psf.upfronthosting.co.za> New submission from Humberto Diogenes : mailbox.py has one section marked as "classes from the original module (for backward compatibility)", which are all listed as deprecated in the module documentation. In issue 756982, A. M. Kuchling agreed that "removing those old classes in 3.0 would be very sensible." I've attached a patch to do that, removing the only test that broke (test_unix_mbox). ---------- components: Library (Lib) files: mailbox-remove_deprecated_classes.patch keywords: patch messages: 66596 nosy: akuchling, hdiogenes severity: normal status: open title: Remove old classes from mailbox module versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10276/mailbox-remove_deprecated_classes.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 05:00:48 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sun, 11 May 2008 03:00:48 +0000 Subject: [issue2814] Remove old classes from mailbox module In-Reply-To: <1210474172.02.0.543540826671.issue2814@psf.upfronthosting.co.za> Message-ID: <1210474848.4.0.504317407755.issue2814@psf.upfronthosting.co.za> Changes by Humberto Diogenes : Added file: http://bugs.python.org/file10277/mailbox-remove_deprecated_doc.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 05:02:59 2008 From: report at bugs.python.org (samwyse) Date: Sun, 11 May 2008 03:02:59 +0000 Subject: [issue1491] BaseHTTPServer incorrectly implements response code 100 In-Reply-To: <1195822360.07.0.215272908737.issue1491@psf.upfronthosting.co.za> Message-ID: <1210474979.03.0.431077149838.issue1491@psf.upfronthosting.co.za> samwyse added the comment: In the attached file, I've refactored the entire BaseHTTPRequestHandlerTestCase class. In doing so, I couldn't help but notice that we're expecting HTTP/1.1 responses when sending HTTP/1.0 requests. RFC 2616 is unclear about whether this is legitimate, but I'm not going to tackle it tonight. Added file: http://bugs.python.org/file10278/BaseHTTPRequestHandlerTestCase.py __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 05:07:33 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sun, 11 May 2008 03:07:33 +0000 Subject: [issue756982] mailbox should use email not rfc822 Message-ID: <1210475253.61.0.636421039927.issue756982@psf.upfronthosting.co.za> Humberto Diogenes added the comment: I created issue 2814 with a patch to remove those old classes. ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 11 05:39:28 2008 From: report at bugs.python.org (Brett Cannon) Date: Sun, 11 May 2008 03:39:28 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210477168.93.0.693980950333.issue2775@psf.upfronthosting.co.za> Brett Cannon added the comment: Just so people know, I have emailed python-dev about renaming urllib as I realized there are some issues with the solution proposed in the PEP. ---------- priority: critical -> release blocker __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 06:57:52 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 May 2008 04:57:52 +0000 Subject: [issue2815] Python Manuals: horizontal scrolling broken In-Reply-To: <1210481871.75.0.331980790719.issue2815@psf.upfronthosting.co.za> Message-ID: <1210481871.75.0.331980790719.issue2815@psf.upfronthosting.co.za> New submission from Terry J. Reedy : 3.0a5, Windows, Python Manuals window opened from Start menu Ordinary text wraps and adjusts to window width. Text in green boxes does not. If too long to fit window, given the font size, horizontal scroll bar at bottom gives access to overflow. Example: LibMan.StringServices.CommonOps.FormatSyntax.FormatSpecMiniLang type ::= "b" | .... | "%" However, when I move the bar right, moving the text left, the newly visible part of the window coming in from the right is dark blue green instead of white and the text is a barely distinguishable dark gray instead of black. I can only read the result with a magnifying glass. ---------- assignee: georg.brandl components: Documentation messages: 66600 nosy: georg.brandl, tjreedy severity: normal status: open title: Python Manuals: horizontal scrolling broken versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 08:12:41 2008 From: report at bugs.python.org (Miki Tebeka) Date: Sun, 11 May 2008 06:12:41 +0000 Subject: [issue2736] datetime needs and "epoch" method In-Reply-To: <1209675808.9.0.995048704016.issue2736@psf.upfronthosting.co.za> Message-ID: <1210486360.81.0.599575976679.issue2736@psf.upfronthosting.co.za> Miki Tebeka added the comment: I think the name is not good, should be "toepoch" or something like that. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 08:33:08 2008 From: report at bugs.python.org (Andrews Patrick Rocha Medina) Date: Sun, 11 May 2008 06:33:08 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210487588.6.0.468341039704.issue2775@psf.upfronthosting.co.za> Andrews Patrick Rocha Medina added the comment: The files Python/compile.c and Python/pythonrun.c depends of the _symtable (Python/symtable.c and Include/symtable.h). What I do for remove _symtable in py3k? __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 08:54:17 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sun, 11 May 2008 06:54:17 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210488856.68.0.16302523916.issue2775@psf.upfronthosting.co.za> Humberto Diogenes added the comment: Andrews, this discussion would be more appropriate to the mailing list, but anyway: I believe you're mixing things up. When PEP 3108 says "remove symtable/_symtable", it must be talking only about symtable.py and symtablemodule.c, not symtable.[ch] (used by the compiler). ---------- nosy: +hdiogenes __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 08:58:21 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 06:58:21 +0000 Subject: [issue1267629] pdb: implement "until",fix for 1248119 Message-ID: <1210489101.49.0.236634615204.issue1267629@psf.upfronthosting.co.za> Georg Brandl added the comment: Benjamin: please reformat to PEP 8, then this is okay to check in. Don't forget docs and NEWS updates. ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson, georg.brandl resolution: -> accepted _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sun May 11 09:04:38 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 07:04:38 +0000 Subject: [issue2763] A socket example code shown in doc doesn't work on FreeBSD In-Reply-To: <1209937912.94.0.0729718790941.issue2763@psf.upfronthosting.co.za> Message-ID: <1210489478.01.0.343266277059.issue2763@psf.upfronthosting.co.za> Georg Brandl added the comment: Duplicate of #2742. ---------- resolution: -> duplicate status: open -> closed superseder: -> example code does not work __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 09:06:34 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 07:06:34 +0000 Subject: [issue2742] example code does not work In-Reply-To: <1209754679.55.0.840137197769.issue2742@psf.upfronthosting.co.za> Message-ID: <1210489594.79.0.609782167033.issue2742@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied the documentation patch in r63039. Thanks for your efforts! ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 09:26:25 2008 From: report at bugs.python.org (Chester) Date: Sun, 11 May 2008 07:26:25 +0000 Subject: [issue2816] Quote-type recognition bug In-Reply-To: <1210490784.68.0.252907160598.issue2816@psf.upfronthosting.co.za> Message-ID: <1210490784.68.0.252907160598.issue2816@psf.upfronthosting.co.za> New submission from Chester : Let's make an intentional syntax error... >>> print "Testing\" SyntaxError: EOL while scanning single-quoted string Please focus on the part of the error message that states "while scanning single-quoted string". How can Python claim it scanned a single-quoted string when I fed it with a double-quoted string? That is a quote type recognition bug in Python which should be fixed. The error message in this case should, however, be: SyntaxError: EOL while scanning double-quoted string ---------- messages: 66607 nosy: chester severity: normal status: open title: Quote-type recognition bug versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 09:32:44 2008 From: report at bugs.python.org (Robert Lehmann) Date: Sun, 11 May 2008 07:32:44 +0000 Subject: [issue2816] Quote-type recognition bug In-Reply-To: <1210490784.68.0.252907160598.issue2816@psf.upfronthosting.co.za> Message-ID: <1210491163.56.0.768333268732.issue2816@psf.upfronthosting.co.za> Robert Lehmann added the comment: It seems "single-quoted" doesn't mean the actual quotation sign used but rather how many you used. Compare the multiline triple quote syntax: $ cat foo.py """bar $ python foo.py File "foo.py", line 3 ^ SyntaxError: EOF while scanning triple-quoted string This shouldn't read sextuple-quoted string, should it? ---------- nosy: +lehmannro __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 09:33:10 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sun, 11 May 2008 07:33:10 +0000 Subject: [issue756982] mailbox should use email not rfc822 Message-ID: <1210491190.93.0.81447213619.issue756982@psf.upfronthosting.co.za> Changes by Humberto Diogenes : ---------- keywords: +patch Added file: http://bugs.python.org/file10279/mailbox-replace_rfc822.patch ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 11 09:33:28 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sun, 11 May 2008 07:33:28 +0000 Subject: [issue756982] mailbox should use email not rfc822 Message-ID: <1210491208.52.0.362254945016.issue756982@psf.upfronthosting.co.za> Changes by Humberto Diogenes : Removed file: http://bugs.python.org/file10272/mailbox.py.patch2 ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 11 09:42:19 2008 From: report at bugs.python.org (Chester) Date: Sun, 11 May 2008 07:42:19 +0000 Subject: [issue2816] Quote-type recognition bug In-Reply-To: <1210490784.68.0.252907160598.issue2816@psf.upfronthosting.co.za> Message-ID: <1210491739.7.0.976612901947.issue2816@psf.upfronthosting.co.za> Chester added the comment: I have e-mailed Guido van Rossum about this. He replied: "Good find. Please file a bug on bugs.python.org." If that wasn't a bug, he wouldn't have said that, would he? __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 09:50:15 2008 From: report at bugs.python.org (Chester) Date: Sun, 11 May 2008 07:50:15 +0000 Subject: [issue2816] Quote-type recognition bug In-Reply-To: <1210490784.68.0.252907160598.issue2816@psf.upfronthosting.co.za> Message-ID: <1210492215.91.0.816135204992.issue2816@psf.upfronthosting.co.za> Changes by Chester : ---------- versions: +Python 3.0 -Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 09:50:54 2008 From: report at bugs.python.org (Martin McNickle) Date: Sun, 11 May 2008 07:50:54 +0000 Subject: [issue2756] urllib2 add_header fails with existing unredirected_header In-Reply-To: <1209913898.38.0.175541514636.issue2756@psf.upfronthosting.co.za> Message-ID: <1210492254.18.0.671352750327.issue2756@psf.upfronthosting.co.za> Changes by Martin McNickle : Removed file: http://bugs.python.org/file10201/add_header_complete.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 09:51:48 2008 From: report at bugs.python.org (Chester) Date: Sun, 11 May 2008 07:51:48 +0000 Subject: [issue2816] Quote-type recognition bug In-Reply-To: <1210490784.68.0.252907160598.issue2816@psf.upfronthosting.co.za> Message-ID: <1210492308.01.0.167372858761.issue2816@psf.upfronthosting.co.za> Changes by Chester : ---------- versions: +Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5, Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 09:51:56 2008 From: report at bugs.python.org (Martin McNickle) Date: Sun, 11 May 2008 07:51:56 +0000 Subject: [issue2756] urllib2 add_header fails with existing unredirected_header In-Reply-To: <1209913898.38.0.175541514636.issue2756@psf.upfronthosting.co.za> Message-ID: <1210492316.74.0.593529063044.issue2756@psf.upfronthosting.co.za> Changes by Martin McNickle : Added file: http://bugs.python.org/file10280/add_header_complete.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 09:53:56 2008 From: report at bugs.python.org (Chester) Date: Sun, 11 May 2008 07:53:56 +0000 Subject: [issue2816] Quote-type recognition bug In-Reply-To: <1210490784.68.0.252907160598.issue2816@psf.upfronthosting.co.za> Message-ID: <1210492436.11.0.673554458366.issue2816@psf.upfronthosting.co.za> Changes by Chester : ---------- versions: +3rd party __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 10:25:31 2008 From: report at bugs.python.org (Neil Muller) Date: Sun, 11 May 2008 08:25:31 +0000 Subject: [issue2736] datetime needs and "epoch" method In-Reply-To: <1209675808.9.0.995048704016.issue2736@psf.upfronthosting.co.za> Message-ID: <1210494331.81.0.275894772494.issue2736@psf.upfronthosting.co.za> Neil Muller added the comment: datetime has fromtimestamp already, so using totimestamp keeps naming consistency (see toordinal and fromordinal). ---------- nosy: +Neil Muller __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 10:48:08 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 08:48:08 +0000 Subject: [issue2812] Document property.getter/setter/deleter etc In-Reply-To: <1210495688.13.0.203494594522.issue2812@psf.upfronthosting.co.za> Message-ID: <1210495688.13.0.203494594522.issue2812@psf.upfronthosting.co.za> New submission from Georg Brandl : Changed a bit and committed as r63043. ---------- resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 10:51:59 2008 From: report at bugs.python.org (Simon Cross) Date: Sun, 11 May 2008 08:51:59 +0000 Subject: [issue1491] BaseHTTPServer incorrectly implements response code 100 In-Reply-To: <1195822360.07.0.215272908737.issue1491@psf.upfronthosting.co.za> Message-ID: <1210495919.19.0.149116349442.issue1491@psf.upfronthosting.co.za> Changes by Simon Cross : ---------- nosy: +hodgestar __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 10:53:14 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 08:53:14 +0000 Subject: [issue2816] Quote-type recognition bug In-Reply-To: <1210490784.68.0.252907160598.issue2816@psf.upfronthosting.co.za> Message-ID: <1210495994.32.0.538585090024.issue2816@psf.upfronthosting.co.za> Georg Brandl added the comment: This is not a bug in my opinion -- Robert has stated why. However, since you contacted Guido, let him decide. :) ---------- assignee: -> gvanrossum nosy: +georg.brandl, gvanrossum __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 10:59:52 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 08:59:52 +0000 Subject: [issue2814] Remove old classes from mailbox module In-Reply-To: <1210474172.02.0.543540826671.issue2814@psf.upfronthosting.co.za> Message-ID: <1210496392.28.0.14300372879.issue2814@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, committed patch as r63045. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 11:02:54 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 09:02:54 +0000 Subject: [issue756982] mailbox should use email not rfc822 Message-ID: <1210496574.34.0.26175718667.issue756982@psf.upfronthosting.co.za> Georg Brandl added the comment: I removed the old classes in 3k. There remains one usage of rfc822, as the default "factory" of Maildir. It's replaced by None in the patch here; is that safe to do? ---------- nosy: +georg.brandl ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 11 11:06:46 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 09:06:46 +0000 Subject: [issue1153769] String interpolation needs PEP 237 update Message-ID: <1210496806.73.0.236241684165.issue1153769@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, reviewed and committed the patch as r63049. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sun May 11 11:11:47 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 09:11:47 +0000 Subject: [issue2809] string docstring doesn't mention that ' '.split() != ' '.split(' ') In-Reply-To: <1210434494.63.0.105776836693.issue2809@psf.upfronthosting.co.za> Message-ID: <1210497107.86.0.401361987265.issue2809@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed a different (shorter) docstring change to the same effect as r63050. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 12:34:01 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 10:34:01 +0000 Subject: [issue2709] tk.rst possibly wrong ? In-Reply-To: <1209400395.54.0.768474211008.issue2709@psf.upfronthosting.co.za> Message-ID: <1210502041.56.0.470482805485.issue2709@psf.upfronthosting.co.za> Georg Brandl added the comment: It refers to the docs in the Python docs. I tried to clarify that in r63052. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 12:42:52 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 10:42:52 +0000 Subject: [issue2659] textwrap handling of hyphenation In-Reply-To: <1208635259.55.0.563254480753.issue2659@psf.upfronthosting.co.za> Message-ID: <1210502572.24.0.271313879251.issue2659@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the patch! Reviewed and committed as r63053. ---------- resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 12:43:45 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 10:43:45 +0000 Subject: [issue2800] make htmlhelp creates python30a5.chm but msi.py expects pydoc.chm In-Reply-To: <1210332256.72.0.89374241257.issue2800@psf.upfronthosting.co.za> Message-ID: <1210502625.22.0.324292420421.issue2800@psf.upfronthosting.co.za> Georg Brandl added the comment: Is there a way to run the tree Python? __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 12:44:28 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 10:44:28 +0000 Subject: [issue2129] Link error of gethostbyaddr and gethostname in Python Manuals (the chm file) In-Reply-To: <1203179561.47.0.405991627355.issue2129@psf.upfronthosting.co.za> Message-ID: <1210502668.13.0.968754436628.issue2129@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: pending -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 12:56:35 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 10:56:35 +0000 Subject: [issue2147] int operations no longer overflow In-Reply-To: <1203481658.28.0.135415143163.issue2147@psf.upfronthosting.co.za> Message-ID: <1210503395.08.0.172284451136.issue2147@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, I think I fixed the remaining locations in r63055. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 12:59:51 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 10:59:51 +0000 Subject: [issue2741] documentation -- do serversockets work with ipv6 In-Reply-To: <1209754393.92.0.50120862505.issue2741@psf.upfronthosting.co.za> Message-ID: <1210503591.68.0.559719871318.issue2741@psf.upfronthosting.co.za> Georg Brandl added the comment: Okay, this should now be clearer in r63057. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 13:02:16 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 11:02:16 +0000 Subject: [issue2721] unittest.makeSuite undocumented and "obsolete" - but what to use instead? In-Reply-To: <1209507990.95.0.785874849779.issue2721@psf.upfronthosting.co.za> Message-ID: <1210503736.5.0.852283285117.issue2721@psf.upfronthosting.co.za> Georg Brandl added the comment: The replacement is TestLoader().loadTestsFromTestCase(), and it's already in a prominent place in the docs: """ Instead of :func:`unittest.main`, there are other ways to run the tests with a finer level of control, less terse output, and no requirement to be run from the command line. For example, the last two lines may be replaced with:: suite = unittest.TestLoader().loadTestsFromTestCase(TestSequenceFunctions) unittest.TextTestRunner(verbosity=2).run(suite) """ Closing as "works for me". ---------- resolution: -> works for me status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 13:09:44 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 11:09:44 +0000 Subject: [issue2452] inaccuracy in httplib timeout documentation In-Reply-To: <1206141807.24.0.299665473683.issue2452@psf.upfronthosting.co.za> Message-ID: <1210504184.67.0.0707953550554.issue2452@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r63058. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 14:42:25 2008 From: report at bugs.python.org (Neil Muller) Date: Sun, 11 May 2008 12:42:25 +0000 Subject: [issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor In-Reply-To: <1209986866.69.0.462896858511.issue2768@psf.upfronthosting.co.za> Message-ID: <1210509745.36.0.904741919818.issue2768@psf.upfronthosting.co.za> Neil Muller added the comment: This patch combines the two earlier patches, and also updates the docstrings and os.rst to reflect the changed behaviour. Added file: http://bugs.python.org/file10281/posixmodule_2.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 15:13:56 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 11 May 2008 13:13:56 +0000 Subject: [issue2709] tk.rst possibly wrong ? In-Reply-To: <1209400395.54.0.768474211008.issue2709@psf.upfronthosting.co.za> Message-ID: <1210511635.98.0.905219854913.issue2709@psf.upfronthosting.co.za> Benjamin Peterson added the comment: After talking to Guilherme on IRC, I'd like to propose this new patch. ---------- keywords: +patch nosy: +benjamin.peterson Added file: http://bugs.python.org/file10282/tk_doc.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 15:16:17 2008 From: report at bugs.python.org (Chester) Date: Sun, 11 May 2008 13:16:17 +0000 Subject: [issue2817] Make Python create a tuple with one element in a clean way In-Reply-To: <1210511777.56.0.156447158974.issue2817@psf.upfronthosting.co.za> Message-ID: <1210511777.56.0.156447158974.issue2817@psf.upfronthosting.co.za> New submission from Chester : To create a tuple with one element, you need to do this: >>> my_tuple = (1,) # Note the trailing comma after the value 1 >>> type(my_tuple) But if you do this >>> my_tuple = (1) >>> type(my_tuple) you don't get a tuple. I thought that just putting a value inside ( ) would make a tuple. Apparently that is not the case. I hate ugly code so it would be clean if Python would convert anything put into ( ) to be a tuple, even if just one value was put in (without having to use that ugly looking comma with no value after it). ---------- messages: 66626 nosy: chester severity: normal status: open title: Make Python create a tuple with one element in a clean way type: feature request versions: 3rd party, Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5, Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 15:18:12 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 11 May 2008 13:18:12 +0000 Subject: [issue2817] Make Python create a tuple with one element in a clean way In-Reply-To: <1210511777.56.0.156447158974.issue2817@psf.upfronthosting.co.za> Message-ID: <1210511892.36.0.698561742705.issue2817@psf.upfronthosting.co.za> Benjamin Peterson added the comment: But we need parentheses for grouping! ---------- nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 15:32:18 2008 From: report at bugs.python.org (Luyang Han) Date: Sun, 11 May 2008 13:32:18 +0000 Subject: [issue2818] pulldom cannot handle xml file with large external entity properly In-Reply-To: <1210512738.34.0.315015103661.issue2818@psf.upfronthosting.co.za> Message-ID: <1210512738.34.0.315015103661.issue2818@psf.upfronthosting.co.za> New submission from Luyang Han : when use xml.dom.pulldom module to parse a large xml file, if all the information is saved in one xml file, the module can handle it in the following way without construction the whole DOM: events = xml.dom.pulldom.parse('file.xml') for (event, node) in events: process(event, node) But if 'file.xml' contains some large external entities, for example: &file_external; Then using the same python snippet above leads to enormous memory usage. I did not perform a concrete benchmark, in one case a 3M external xml file drained about 1 GB memory. I think in this case it might be the whole DOM structure is constructed. ---------- components: XML messages: 66628 nosy: hanselda severity: normal status: open title: pulldom cannot handle xml file with large external entity properly type: resource usage versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 15:35:10 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 11 May 2008 13:35:10 +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: <1210512910.93.0.55399872845.issue1792@psf.upfronthosting.co.za> A.M. Kuchling added the comment: I've applied Facundo's version of the patch in r63059. ---------- nosy: +akuchling resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 15:46:48 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 11 May 2008 13:46:48 +0000 Subject: [issue2709] tk.rst possibly wrong ? In-Reply-To: <1209400395.54.0.768474211008.issue2709@psf.upfronthosting.co.za> Message-ID: <1210513608.75.0.705609113518.issue2709@psf.upfronthosting.co.za> Guilherme Polo added the comment: Hi again, Sorry for not trying harder on this issue, I should have included my own patch(es) on what should be changed. These could be improved tho, of course. Added file: http://bugs.python.org/file10283/tk.rst.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 15:47:07 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 11 May 2008 13:47:07 +0000 Subject: [issue2709] tk.rst possibly wrong ? In-Reply-To: <1209400395.54.0.768474211008.issue2709@psf.upfronthosting.co.za> Message-ID: <1210513627.3.0.132684570837.issue2709@psf.upfronthosting.co.za> Changes by Guilherme Polo : Added file: http://bugs.python.org/file10284/othergui.rst.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 16:01:32 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 11 May 2008 14:01:32 +0000 Subject: [issue1858] Make .pypirc handle multiple servers In-Reply-To: <1200573233.93.0.822400680572.issue1858@psf.upfronthosting.co.za> Message-ID: <1210514492.45.0.781676389257.issue1858@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Brett backed out my commit in r63002 because I forgot to include the distutils.config module. Re-committed in r63014 and r63060. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 16:14:23 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 11 May 2008 14:14:23 +0000 Subject: [issue1267629] pdb: implement "until",fix for 1248119 Message-ID: <1210515263.61.0.958346429154.issue1267629@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Reviewed and committed in r63061 _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sun May 11 16:15:05 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 11 May 2008 14:15:05 +0000 Subject: [issue1267629] pdb: implement "until",fix for 1248119 Message-ID: <1210515305.35.0.563578488558.issue1267629@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: open -> closed _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sun May 11 16:18:43 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 14:18:43 +0000 Subject: [issue2817] Make Python create a tuple with one element in a clean way In-Reply-To: <1210511777.56.0.156447158974.issue2817@psf.upfronthosting.co.za> Message-ID: <1210515522.43.0.0531297801424.issue2817@psf.upfronthosting.co.za> Georg Brandl added the comment: That's an absolute no-starter. Not the parentheses make the tuple, the commas do. The empty tuple is the exception, not the rule. ---------- nosy: +georg.brandl resolution: -> rejected status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 16:56:24 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 14:56:24 +0000 Subject: [issue2709] tk.rst possibly wrong ? In-Reply-To: <1209400395.54.0.768474211008.issue2709@psf.upfronthosting.co.za> Message-ID: <1210517784.08.0.100122935006.issue2709@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, committed both patches in r63066. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 17:03:37 2008 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 11 May 2008 15:03:37 +0000 Subject: [issue2816] Quote-type recognition bug In-Reply-To: <1210490784.68.0.252907160598.issue2816@psf.upfronthosting.co.za> Message-ID: <1210518217.26.0.0947943203651.issue2816@psf.upfronthosting.co.za> Guido van Rossum added the comment: As the term "single-quoted string" is clearly ambiguous, I propose to change the error message to just "string" (or perhaps "string literal", but then you'd have to change the triple-quoted message to "triple-quoted string literal" too for consistency). __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 17:07:54 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 15:07:54 +0000 Subject: [issue2816] Quote-type recognition bug In-Reply-To: <1210490784.68.0.252907160598.issue2816@psf.upfronthosting.co.za> Message-ID: <1210518474.6.0.9214641412.issue2816@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, done so in r63068. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 17:08:36 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 15:08:36 +0000 Subject: [issue1326] "internal" zipimport.zipimporter feature untested In-Reply-To: <1193317680.83.0.000309828654595.issue1326@psf.upfronthosting.co.za> Message-ID: <1210518516.43.0.724627262037.issue1326@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed the test and added new docs in r63067. Thanks! ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 17:12:16 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 15:12:16 +0000 Subject: [issue2710] error: (10035, 'The socket operation could not complete without blocking') In-Reply-To: <1209411891.51.0.595506842897.issue2710@psf.upfronthosting.co.za> Message-ID: <1210518736.98.0.400804638092.issue2710@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- components: +IDLE __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 17:17:53 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 15:17:53 +0000 Subject: [issue2787] Patch to flush unittest output In-Reply-To: <1210195645.66.0.390222470388.issue2787@psf.upfronthosting.co.za> Message-ID: <1210519073.15.0.310838561074.issue2787@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, committed patch as r63069. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 17:22:05 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 15:22:05 +0000 Subject: [issue2803] heapq.heappush called with too few arguments in sched.py In-Reply-To: <1210346823.98.0.261501835489.issue2803@psf.upfronthosting.co.za> Message-ID: <1210519325.64.0.962589273414.issue2803@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r63070, r63071 (2.5). ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 18:16:53 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 11 May 2008 16:16:53 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> New submission from Jean Brouwers : Attached are 2 patches and a test script adding a function sum to the math and cmath modules of Python 2.6a3. The sum is calculated using a full precision summation method. The test script compares the result of the functions with the original implementation in Python. All tests pass with 4 different builds of Python 2.6a3: - GNU gcc 4.0.1 on MacOS X 10.4.11 (Intel Core Duo), 32-bit - GNU gcc 4.1.2 on RHEL 3 update 7 (Opteron), 64-bit - Sun C 5.8 on Solaris 10 (Opteron), both 32- and 64-bit ---------- components: Extension Modules files: cmathmodule.c.2.6a3.diff keywords: patch messages: 66641 nosy: MrJean1, rhettinger severity: normal status: open title: Full precision summation type: performance versions: Python 2.6 Added file: http://bugs.python.org/file10285/cmathmodule.c.2.6a3.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 18:17:24 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 11 May 2008 16:17:24 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1210522644.53.0.0600622760863.issue2819@psf.upfronthosting.co.za> Changes by Jean Brouwers : Added file: http://bugs.python.org/file10286/mathmodule.c.2.6a3.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 18:17:37 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 11 May 2008 16:17:37 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1210522657.96.0.431326393414.issue2819@psf.upfronthosting.co.za> Changes by Jean Brouwers : Added file: http://bugs.python.org/file10287/test_math_sum1.py __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 18:44:39 2008 From: report at bugs.python.org (Chester) Date: Sun, 11 May 2008 16:44:39 +0000 Subject: [issue2816] Quote-type recognition bug In-Reply-To: <1210490784.68.0.252907160598.issue2816@psf.upfronthosting.co.za> Message-ID: <1210524279.16.0.16440044164.issue2816@psf.upfronthosting.co.za> Chester added the comment: It would be better to say "End of line while scanning string (, line 1)" and "End of f... while scanning multi-line string (, line 1)" These messages really need to be clear, so putting EOF for example (which I really don't know what it stands for) is really mind-bending. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 18:48:04 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 11 May 2008 16:48:04 +0000 Subject: [issue2800] make htmlhelp creates python30a5.chm but msi.py expects pydoc.chm In-Reply-To: <1210502625.22.0.324292420421.issue2800@psf.upfronthosting.co.za> Message-ID: <482722E5.4020004@v.loewis.de> Martin v. L?wis added the comment: > Is there a way to run the tree Python? Currently, that should be possible, as the documentation is built after Python. However, in the long term, cross-compilation needs to be considered (to AMD64 on an x86 machine); then you can't run the tree python on the build machine. I would prefer if there was a makefile target that invoked hhc, from "%ProgramFiles%\HTML Help Workshop\hhc.exe" directly. It's guaranteed that make (i.e. cygwin make) will find a Python interpreter (i.e. cygwin python2.5). Then buidmsi could just invoke that target directly after htmlhelp. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 18:49:25 2008 From: report at bugs.python.org (Mark Veldhuis) Date: Sun, 11 May 2008 16:49:25 +0000 Subject: [issue2755] IDLE ignores module change before restart In-Reply-To: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za> Message-ID: <1210524565.34.0.979673682496.issue2755@psf.upfronthosting.co.za> Mark Veldhuis added the comment: Hi, I repeated the same steps as before, with new filenames, and with the same result, the printed value was 1, and not 2 as expected. After closing all windows the value was 2. answers to Kurt's questions: When you "open" a python file, exactly what steps are you taking? ->I use File - Recent file - from the menu When you "close any combination of IDLE windows,( but not all)", are you leaving update.py open so you can "run" it? ->No, it occurs even when I close update.py and reopen it using the method above When you "run" a file, exactly what steps are you taking? ->I press F5 when the update.py window is active When you add files to the tracker, please use plain text files so they can be opened in a browser, without firing up Office! ->thanks for the tip! Added file: http://bugs.python.org/file10288/idleupdatebug.txt __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 18:49:31 2008 From: report at bugs.python.org (Mark Veldhuis) Date: Sun, 11 May 2008 16:49:31 +0000 Subject: [issue2755] IDLE ignores module change before restart In-Reply-To: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za> Message-ID: <1210524571.98.0.13295891711.issue2755@psf.upfronthosting.co.za> Changes by Mark Veldhuis : Removed file: http://bugs.python.org/file10191/idleupdatebug.odt __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 18:50:37 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 11 May 2008 16:50:37 +0000 Subject: [issue2817] Make Python create a tuple with one element in a clean way In-Reply-To: <1210511777.56.0.156447158974.issue2817@psf.upfronthosting.co.za> Message-ID: <1210524637.53.0.0730940300756.issue2817@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Just in case the previous comments aren't clear: Would you rather see py> (3+4)*5 35 or py> (3+4)*5 (7, 7, 7, 7, 7) ---------- nosy: +loewis __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 19:54:27 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 11 May 2008 17:54:27 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210528467.41.0.955839036962.issue2775@psf.upfronthosting.co.za> Guilherme Polo added the comment: I'm working on the new package tkinter and dialogs merging where appropriate. ---------- nosy: +gpolo __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 20:24:56 2008 From: report at bugs.python.org (David Fraser) Date: Sun, 11 May 2008 18:24:56 +0000 Subject: [issue2809] string docstring doesn't mention that ' '.split() != ' '.split(' ') In-Reply-To: <1210434494.63.0.105776836693.issue2809@psf.upfronthosting.co.za> Message-ID: <1210530296.6.0.340733558953.issue2809@psf.upfronthosting.co.za> David Fraser added the comment: I don't think this really addresses the issue properly... The original docstring read: +Note that not specifying sep (or using None) will cause\n\ +empty strings to be removed from the output. thus ' '.strip()\n\ +returns []. while ' '.strip(' ') returns ['', '']. (Obviously strip is wrong here, it should be split) The committed docstring reads: +If sep is not specified or is None, any whitespace string is a separator and leading and trailing whitespace is stripped before splitting. But the point is not just that leading and trailing whitespace is stripped; ''.strip() returns [] while ''.strip(' ') returns ['']. This is probably the most unexpected corner case; it seems to be better to say that empty strings are removed from the output. ---------- nosy: +davidfraser __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 20:25:57 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 11 May 2008 18:25:57 +0000 Subject: [issue2820] Remove mac modules In-Reply-To: <1210530356.32.0.928311104716.issue2820@psf.upfronthosting.co.za> Message-ID: <1210530356.32.0.928311104716.issue2820@psf.upfronthosting.co.za> New submission from Benjamin Peterson : I've removed the Mac modules. The Bazaar branch is at http://code.python.org/python/users/benjamin.peterson/mac_module_removal/. ---------- assignee: brett.cannon components: Extension Modules messages: 66648 nosy: benjamin.peterson, brett.cannon priority: critical severity: normal status: open title: Remove mac modules type: feature request versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 20:39:26 2008 From: report at bugs.python.org (Daniel Stutzbach) Date: Sun, 11 May 2008 18:39:26 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210445821.81.0.452162951848.issue2810@psf.upfronthosting.co.za> Message-ID: Daniel Stutzbach added the comment: After several failed attempts at making a test case, and stepping through C code with a debugger, I see that my initial diagnose is quite wrong. RegQueryInfoKey *does* return the sizes in units of bytes (even though the Microsoft documentation says otherwise). My apologies. I do still have a stack trace from an end-user of my python2.5-based product, showing that _winreg.EnumValue raises: WindowsError: [Error 234] More data is available The application reliably crashes on start-up for this user, when trying to read some registry entries written by another program and hitting the above exception. Unfortunately, I have been unable to reproduce the problem locally. I tried a variety of Unicode characters (including some that encode to 4 bytes), and that didn't raise an exception. I also tried putting some very long data strings (more than 64kb) into the registry, and that worked fine too (even though the Microsoft documentation says the ANSI version *should* return the above exception!). I'm going to try building a custom PyEnumValue that will dynamically grow the buffer size when that error occurs. I'll report back on how that works out for the end user. In the meantime, I'm open to other theories on what might cause RegEnumValue to fail with that error. The end user is running Vista, if it matters. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 20:51:25 2008 From: report at bugs.python.org (Chester) Date: Sun, 11 May 2008 18:51:25 +0000 Subject: [issue2817] Make Python create a tuple with one element in a clean way In-Reply-To: <1210511777.56.0.156447158974.issue2817@psf.upfronthosting.co.za> Message-ID: <1210531885.63.0.33947162771.issue2817@psf.upfronthosting.co.za> Chester added the comment: Martin I see the point now. I appologize for not having the clear head of seeing the possible damage that my feature request would make. I take my request back. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 21:00:58 2008 From: report at bugs.python.org (Adam Getchell) Date: Sun, 11 May 2008 19:00:58 +0000 Subject: [issue2821] unittest.py sys.exit error In-Reply-To: <1210532457.78.0.053406582463.issue2821@psf.upfronthosting.co.za> Message-ID: <1210532457.78.0.053406582463.issue2821@psf.upfronthosting.co.za> New submission from Adam Getchell : Picking the canonical example of unit test: import random import unittest class TestSequenceFunctions(unittest.TestCase): def setUp(self): self.seq = range(10) def testshuffle(self): # make sure the shuffled sequence does not lose any elements random.shuffle(self.seq) self.seq.sort() self.assertEqual(self.seq, range(10)) def testchoice(self): element = random.choice(self.seq) self.assert_(element in self.seq) def testsample(self): self.assertRaises(ValueError, random.sample, self.seq, 20) for element in random.sample(self.seq, 5): self.assert_(element in self.seq) if __name__ == '__main__': unittest.main() Gives the following error: >>> ... ---------------------------------------------------------------------- Ran 3 tests in 0.003s OK Traceback (most recent call last): File "C:\Projects\Python\randomunittest.py", line 25, in unittest.main() File "C:\Python25\lib\unittest.py", line 768, in __init__ self.runTests() File "C:\Python25\lib\unittest.py", line 806, in runTests sys.exit(not result.wasSuccessful()) SystemExit: False The error lies in the following code snippet: def runTests(self): if self.testRunner is None: self.testRunner = TextTestRunner(verbosity=self.verbosity) result = self.testRunner.run(self.test) sys.exit(not result.wasSuccessful()) ---------- components: Library (Lib) files: unittest.py messages: 66651 nosy: acgetchell severity: normal status: open title: unittest.py sys.exit error type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10289/unittest.py __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 21:17:20 2008 From: report at bugs.python.org (Chester) Date: Sun, 11 May 2008 19:17:20 +0000 Subject: [issue2822] Quote-type recognition bug [badly fixed last time] In-Reply-To: <1210533439.19.0.489814447289.issue2822@psf.upfronthosting.co.za> Message-ID: <1210533439.19.0.489814447289.issue2822@psf.upfronthosting.co.za> New submission from Chester : I have a suggestion that would make the http://svn.python.org/view?rev=63068&view=rev look ever more clear. It would be better to have this kind of error messages: expect = "End of line while scanning string (, line 1)" and expect "End of f... while scanning multi-line string (, line 1)" These messages really need to be clear, so putting EOF for example (which I really don't know what it stands for) is really mind-bending. But if changing EOL and EOF to their actual meaning would cause some problems, then this look nice as well: expect = "EOL while scanning string (, line 1)" and expect "EOF while scanning multi-line string (, line 1)" The first two proposals look more readable because I think that many people don't know what EOF stands for (they can guess for EOL though, but EOF is just mind-bending and wild guessing). I Googled and found no answer, so I actually don't know what that error message is saying to me. Also, it would be good, however, to remove the 'triple-quoted string literal' and name that simply as 'multi-line string'. Simple is better than complex. :) Mister Rossum, please give a go on that. I kindly ask you to choose from the above two options. Your proposal on that was made, yes... but I find the 'multi-line string' even better than 'triple-quoted string literal'. I would love to provide a patch but I don't know how it's made. ---------- messages: 66652 nosy: chester, gvanrossum severity: normal status: open title: Quote-type recognition bug [badly fixed last time] versions: 3rd party, Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5, Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 21:22:04 2008 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 11 May 2008 19:22:04 +0000 Subject: [issue2822] Quote-type recognition bug [badly fixed last time] In-Reply-To: <1210533439.19.0.489814447289.issue2822@psf.upfronthosting.co.za> Message-ID: <1210533724.37.0.796372635271.issue2822@psf.upfronthosting.co.za> Guido van Rossum added the comment: Stop bothering us. ---------- resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 21:21:49 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 11 May 2008 19:21:49 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1210533709.06.0.00700417298297.issue2810@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I suggest to use regedit /e to dump the failing key into a file. That should allow to reproduce it on a different system. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 21:31:22 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 11 May 2008 19:31:22 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1210534282.1.0.466630771557.issue2819@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This looks pretty good at first glance. Will review more throughly later this week. It does need docs and unittests. ---------- assignee: -> rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 21:41:02 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sun, 11 May 2008 19:41:02 +0000 Subject: [issue756982] mailbox should use email not rfc822 Message-ID: <1210534861.96.0.885017064995.issue756982@psf.upfronthosting.co.za> Humberto Diogenes added the comment: > rfc822 is replaced by None in the patch here; is that safe to do? Yes. That's what mailbox documentation says: Parameter factory is a callable object that accepts a file-like message representation [...] and returns a custom representation. If factory is None, MaildirMessage is used as the default message representation. ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 11 21:42:08 2008 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 11 May 2008 19:42:08 +0000 Subject: [issue2823] "Report bug" links In-Reply-To: <1210534928.44.0.636090674533.issue2823@psf.upfronthosting.co.za> Message-ID: <1210534928.44.0.636090674533.issue2823@psf.upfronthosting.co.za> New submission from anatoly techtonik : It would be convenient to use links in the bottom of documentation pages for bugreporting that directly connect to bugtracker search form. I.e. "Report bug on this page" and "Report bug in this module". ---------- assignee: georg.brandl components: Documentation, Documentation tools (Sphinx) messages: 66657 nosy: georg.brandl, techtonik severity: normal status: open title: "Report bug" links __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 21:52:16 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 11 May 2008 19:52:16 +0000 Subject: [issue2823] "Report bug" links In-Reply-To: <1210534928.44.0.636090674533.issue2823@psf.upfronthosting.co.za> Message-ID: <1210535536.45.0.925950154755.issue2823@psf.upfronthosting.co.za> Martin v. L?wis added the comment: -1. This would make a fairly pessimistic view of Python, making it sound as if reporting a bug is a primary thing that one might to do with it. ---------- nosy: +loewis __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 21:53:58 2008 From: report at bugs.python.org (Eric Smith) Date: Sun, 11 May 2008 19:53:58 +0000 Subject: [issue2802] str.format() :n integer output In-Reply-To: <1210342088.28.0.24987613161.issue2802@psf.upfronthosting.co.za> Message-ID: <1210535638.43.0.347646184668.issue2802@psf.upfronthosting.co.za> Eric Smith added the comment: Implemented in 2.6 as r63078. I'll port this to py3k shortly. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 22:16:47 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 11 May 2008 20:16:47 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210537007.45.0.698327786758.issue2775@psf.upfronthosting.co.za> Guilherme Polo added the comment: Patch regarding the move to tkinter package added. What this patch does -------------------- * Moved lib-tk to tkinter and renamed modules according to PEP 3108 * Merged tkFileDialog into filedialog * Merged tkSimpleDialog into simpledialog * Updated imports in pydoc * Updated imports in idlelib * Updated imports in Tools and Demos * Changed lib-tk to tkinter at Makefile.pre.in * Removed TKPATH from Modules/Setup.dist * Removed references of lib-tk at PC/ What has to be done ------------------- * Update iss script at PC/ to change lib-tk to tkinter * Update docs * stub modules ? Added file: http://bugs.python.org/file10290/tkinter_package_and_fixes.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 22:17:50 2008 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 11 May 2008 20:17:50 +0000 Subject: [issue2824] zipfile to handle duplicate files in archive In-Reply-To: <1210537070.35.0.0613996133193.issue2824@psf.upfronthosting.co.za> Message-ID: <1210537070.35.0.0613996133193.issue2824@psf.upfronthosting.co.za> New submission from anatoly techtonik : ZipFile allows to add the same file to archive twice. I bet it is not intended behavior for many users who would like to either replace file inside of archive or get runtime warning about duplicate file to be added. http://code.google.com/p/gvn/issues/detail?id=63 from zipfile import ZipFile zt=ZipFile("ziptest.zip","w") zt.write("ziptest.py") zt.write("ziptest.py") zt.close() ---------- components: Extension Modules messages: 66661 nosy: techtonik severity: normal status: open title: zipfile to handle duplicate files in archive versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 22:21:47 2008 From: report at bugs.python.org (Nikolas Coukouma) Date: Sun, 11 May 2008 20:21:47 +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: <1210537307.83.0.288808688065.issue2378@psf.upfronthosting.co.za> Nikolas Coukouma added the comment: I can't reproduce this with r63075... ---------- nosy: +nikolasco __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 22:41:53 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 May 2008 20:41:53 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1210538513.28.0.707288035724.issue2819@psf.upfronthosting.co.za> Mark Dickinson added the comment: Some comments/questions: (1) It seems wasteful to wrap every addition in PyFPE_START/END_PROTECT, and to check for NaNs and infinities after every addition. I'd wrap the whole thing in a single PyFPE_START/END_PROTECT, replace _math_sum_add with an inline addition, and just let NaNs and Infs sort themselves out. If the result comes out finite (as it surely will in almost all applications), then all the summands were necessarily finite and there's nothing more to do. If the result comes out as an infinity or NaN, you need to decide whether it's appropriate to return a NaN, an infinity, or to raise OverflowError or ValueError. I'm not sure it's worth trying to do the right thing for all special value cases, but if you do want to follow 'spirit of IEEE 754' rules for special values, they should look something like this: (1) if the summands include a NaN, return a NaN (2) else if the summands include infinities of both signs, raise ValueError, (3) else if the summands include infinities of only one sign, return infinity with that sign, (4) else (all summands are finite) if the result is infinite, raise OverflowError. (The result can never be a NaN if all summands are finite.) Note that some sums involving overflow won't be computed correctly: e.g. [1e308, 1e308, -1e308] will likely sum to infinity instead of returning 1e308. I don't see any easy way around this, and it's probably not worth worrying about. (2) The algorithm is only guaranteed to work correctly assuming IEEE 754 semantics. Python currently doesn't insist on IEEE 754 floating point, so what should happen on non IEEE-754 machines? (3) Rather than duplicating the math module code in cmathmodule.c, why not have the complex version simply sum real parts and imaginary parts separately, using a version of the code that's already in mathmodule.c? ---------- nosy: +marketdickinson __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 22:42:25 2008 From: report at bugs.python.org (Chester) Date: Sun, 11 May 2008 20:42:25 +0000 Subject: [issue2825] Quote-type recognition bug [got a patch!] In-Reply-To: <1210538545.7.0.805693015391.issue2825@psf.upfronthosting.co.za> Message-ID: <1210538545.7.0.805693015391.issue2825@psf.upfronthosting.co.za> New submission from Chester : This is a patch I made to make this messages clear now. I hope you like it. ---------- files: test_eof.patch keywords: patch messages: 66664 nosy: chester severity: normal status: open title: Quote-type recognition bug [got a patch!] Added file: http://bugs.python.org/file10291/test_eof.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 22:45:40 2008 From: report at bugs.python.org (Pedro Werneck) Date: Sun, 11 May 2008 20:45:40 +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: <1210538740.25.0.532376021274.issue2378@psf.upfronthosting.co.za> Pedro Werneck added the comment: I get it with r63075, r63085, on Linux. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 22:49:25 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 May 2008 20:49:25 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1210538965.26.0.413236859099.issue2819@psf.upfronthosting.co.za> Mark Dickinson added the comment: One more question: What are the use cases for an exact summation algorithm? That is, in what situations does one care about exactness rather than simply accuracy? I know that loss of accuracy is a problem in things like numeric integration routines, but something like Kahan summation (faster and simpler, but not exact) usually takes care of that. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 22:51:35 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 20:51:35 +0000 Subject: [issue756982] mailbox should use email not rfc822 Message-ID: <1210539095.0.0.76811910022.issue756982@psf.upfronthosting.co.za> Georg Brandl added the comment: Removed the last rfc822 reference from 3k's mailbox.py in r63091. ---------- resolution: -> fixed status: open -> closed ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 11 22:52:08 2008 From: report at bugs.python.org (Chester) Date: Sun, 11 May 2008 20:52:08 +0000 Subject: [issue2825] Quote-type recognition bug [got a patch!] In-Reply-To: <1210538545.7.0.805693015391.issue2825@psf.upfronthosting.co.za> Message-ID: <1210539128.1.0.351785717237.issue2825@psf.upfronthosting.co.za> Changes by Chester : ---------- nosy: +gvanrossum versions: +3rd party, Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5, Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 22:54:29 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 20:54:29 +0000 Subject: [issue2809] string docstring doesn't mention that ' '.split() != ' '.split(' ') In-Reply-To: <1210434494.63.0.105776836693.issue2809@psf.upfronthosting.co.za> Message-ID: <1210539268.83.0.319749687312.issue2809@psf.upfronthosting.co.za> Georg Brandl added the comment: Okay, r63092 should satisfy you then. :) __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 23:04:18 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 21:04:18 +0000 Subject: [issue2250] rlcompleter raises Exception on bad input In-Reply-To: <1204886997.65.0.75088007868.issue2250@psf.upfronthosting.co.za> Message-ID: <1210539858.45.0.217235848219.issue2250@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed code and doc patches as r63094. Thanks! ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 23:15:29 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 21:15:29 +0000 Subject: [issue2413] os.strerror does not check for out of range argument In-Reply-To: <1205889895.08.0.168690164912.issue2413@psf.upfronthosting.co.za> Message-ID: <1210540529.34.0.835570977576.issue2413@psf.upfronthosting.co.za> Georg Brandl added the comment: IMO, the current behavior is the least problematic. It also mirrors the rest of Python's posix-wrapping calls: if something usable is returned, use it; if NULL is returned, raise an error. For most people, "Unknown error XXX" or "Value error: strerror() argument out of range" won't be much different in terms of user experience. Rejecting this patch. ---------- nosy: +georg.brandl resolution: -> rejected status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 23:17:57 2008 From: report at bugs.python.org (Eric Smith) Date: Sun, 11 May 2008 21:17:57 +0000 Subject: [issue2802] str.format() :n integer output In-Reply-To: <1210342088.28.0.24987613161.issue2802@psf.upfronthosting.co.za> Message-ID: <1210540677.8.0.101567029042.issue2802@psf.upfronthosting.co.za> Eric Smith added the comment: Implemented in 3.0 as r63093. I'm closing this issue. I added the C code that does the grouping insertion as _PyString_InsertThousandsGrouping and _PyUnicode_InsertThousandsGrouping (in 3.0). This might be useful to others, although the API is fairly complicated. Mark Dickinson: For Decimal, you can probably get what you need from Lib/locale.py, although the function _group() is private. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 23:22:08 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sun, 11 May 2008 21:22:08 +0000 Subject: [issue756982] mailbox should use email not rfc822 Message-ID: <1210540928.58.0.587710792513.issue756982@psf.upfronthosting.co.za> Humberto Diogenes added the comment: Georg, any special reason for not removing rfc822 references from test_mailbox? That section of the patch was not merged. ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 11 23:31:52 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 21:31:52 +0000 Subject: [issue756982] mailbox should use email not rfc822 Message-ID: <1210541512.4.0.0602599899932.issue756982@psf.upfronthosting.co.za> Georg Brandl added the comment: Okay, removed that too in r63096. ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 11 23:34:02 2008 From: report at bugs.python.org (Nikolas Coukouma) Date: Sun, 11 May 2008 21:34:02 +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: <1210541641.96.0.513468484363.issue2378@psf.upfronthosting.co.za> Nikolas Coukouma added the comment: Apologies, I didn't run the test case correctly; I do get the error as reported __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 23:34:08 2008 From: report at bugs.python.org (Chester) Date: Sun, 11 May 2008 21:34:08 +0000 Subject: [issue2826] safe_substitute() and substitute() In-Reply-To: <1210541648.51.0.130829748422.issue2826@psf.upfronthosting.co.za> Message-ID: <1210541648.51.0.130829748422.issue2826@psf.upfronthosting.co.za> New submission from Chester : Please consider of removing safe_substitute() method and make the current substitute() method act like safe_substitute() method but being named substitute(). ---------- messages: 66675 nosy: chester, gvanrossum severity: normal status: open title: safe_substitute() and substitute() versions: 3rd party, Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5, Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 23:34:21 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 21:34:21 +0000 Subject: [issue2535] duplicate Misc.lower In-Reply-To: <1207132804.52.0.0603076560404.issue2535@psf.upfronthosting.co.za> Message-ID: <1210541661.41.0.516811707742.issue2535@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed as r63097. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 23:48:17 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 21:48:17 +0000 Subject: [issue2826] safe_substitute() and substitute() In-Reply-To: <1210541648.51.0.130829748422.issue2826@psf.upfronthosting.co.za> Message-ID: <1210542497.56.0.0602693729958.issue2826@psf.upfronthosting.co.za> Georg Brandl added the comment: First of all, you don't say which type these methods belong to. I assume you mean string.Template. What good would that be? Those extra 5 characters to type shouldn't be the problem. Many template strings have only defined keys, and it is a programming error if a key is not given or misspelled in the template. In this case, substitute() is the right function. Rejecting this RFE. ---------- nosy: +georg.brandl -gvanrossum resolution: -> rejected status: open -> closed type: -> feature request versions: -3rd party, Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 23:50:35 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 21:50:35 +0000 Subject: [issue2823] "Report bug" links In-Reply-To: <1210534928.44.0.636090674533.issue2823@psf.upfronthosting.co.za> Message-ID: <1210542635.79.0.59385332987.issue2823@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree with Martin, a "report bug in the module" link isn't necessary. A general "report bug" page is accessible from the docs' front page. There will however be be a "suggest change" link where you can suggest doc changes yourself -- I'll have to get around to implementing it :) ---------- resolution: -> rejected status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 23:51:12 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sun, 11 May 2008 21:51:12 +0000 Subject: [issue2814] Remove old classes from mailbox module In-Reply-To: <1210474172.02.0.543540826671.issue2814@psf.upfronthosting.co.za> Message-ID: <1210542672.1.0.12650252893.issue2814@psf.upfronthosting.co.za> Humberto Diogenes added the comment: I think we should add a deprecation warning for those classes in 2.6, right? As we're not removing the whole module, what's the right place to put that? On the __init__ method of each class? __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 23:54:37 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 21:54:37 +0000 Subject: [issue2814] Remove old classes from mailbox module In-Reply-To: <1210474172.02.0.543540826671.issue2814@psf.upfronthosting.co.za> Message-ID: <1210542877.14.0.961164767509.issue2814@psf.upfronthosting.co.za> Georg Brandl added the comment: I added a deprecation notice to the docs. That should be enough. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 23:56:57 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 21:56:57 +0000 Subject: [issue2821] unittest.py sys.exit error In-Reply-To: <1210532457.78.0.053406582463.issue2821@psf.upfronthosting.co.za> Message-ID: <1210543016.95.0.695688335229.issue2821@psf.upfronthosting.co.za> Georg Brandl added the comment: Can you elaborate how you get the printed exception? When running your code as a script under 2.5 or trunk, I don't get such a message. ---------- nosy: +georg.brandl __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 11 23:58:29 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 21:58:29 +0000 Subject: [issue2824] zipfile to handle duplicate files in archive In-Reply-To: <1210537070.35.0.0613996133193.issue2824@psf.upfronthosting.co.za> Message-ID: <1210543109.75.0.00826662640973.issue2824@psf.upfronthosting.co.za> Georg Brandl added the comment: I think a warning would be sensible here. The behavior is certainly not what I would expect. ---------- nosy: +alanmcintyre, georg.brandl __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 00:00:30 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 22:00:30 +0000 Subject: [issue1649238] potential clash with C++ in ceval.h Message-ID: <1210543230.5.0.144319166916.issue1649238@psf.upfronthosting.co.za> Georg Brandl added the comment: Lowering priority. ---------- nosy: +georg.brandl priority: normal -> low _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 12 00:03:09 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 22:03:09 +0000 Subject: [issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16) Message-ID: <1210543389.44.0.0592984633517.issue1470548@psf.upfronthosting.co.za> Georg Brandl added the comment: Won't this present backwards-compatibility problems if non-ASCII str content is written? ---------- nosy: +georg.brandl _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 12 00:07:23 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 22:07:23 +0000 Subject: [issue2043] test_cl.py converted to unittest In-Reply-To: <1202415510.1.0.944242978203.issue2043@psf.upfronthosting.co.za> Message-ID: <1210543643.32.0.711962953573.issue2043@psf.upfronthosting.co.za> Georg Brandl added the comment: test_cl was already changed not to run as an import side-effect; I don't think unittest is necessary here. ---------- nosy: +georg.brandl resolution: -> rejected status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 00:11:53 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 22:11:53 +0000 Subject: [issue1713041] fix for 1712742: corrects pprint's handling of 'depth' Message-ID: <1210543913.38.0.900163318447.issue1713041@psf.upfronthosting.co.za> Georg Brandl added the comment: The test suite doesn't pass any longer when the patch is applied. ---------- nosy: +georg.brandl _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 12 00:26:55 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 22:26:55 +0000 Subject: [issue2786] Names in traceback should have class names, if they're methods In-Reply-To: <1210191958.85.0.412869826908.issue2786@psf.upfronthosting.co.za> Message-ID: <1210544815.68.0.771388756062.issue2786@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- components: +Interpreter Core priority: -> low type: behavior -> feature request versions: +Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 00:34:44 2008 From: report at bugs.python.org (Andrews Patrick Rocha Medina) Date: Sun, 11 May 2008 22:34:44 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210545284.29.0.0527347096244.issue2775@psf.upfronthosting.co.za> Changes by Andrews Patrick Rocha Medina : Added file: http://bugs.python.org/file10292/symtable_removed_on_py3k.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 00:38:41 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 May 2008 22:38:41 +0000 Subject: [issue2723] Truncate __len__() at sys.maxsize In-Reply-To: <1209530191.73.0.609196846233.issue2723@psf.upfronthosting.co.za> Message-ID: <1210545521.86.0.0663780818266.issue2723@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Agreed, having it lie about the size is the WORST possible behavior because it will silently hide problems. Lets not do that. But I must've missed something, why can't __len__ return the correct value? Merely because range() is broken and might use it as input? Thats no excuse. Fix range(). ---------- nosy: +gregory.p.smith __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 00:48:23 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 11 May 2008 22:48:23 +0000 Subject: [issue2723] Truncate __len__() at sys.maxsize In-Reply-To: <1210545521.86.0.0663780818266.issue2723@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Sun, May 11, 2008 at 6:38 PM, Gregory P. Smith wrote: .. > But I must've missed something, why can't __len__ return the correct > value? The problem is the C signature of the sq_length slot: typedef Py_ssize_t (*lenfunc)(PyObject *); __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 00:49:49 2008 From: report at bugs.python.org (Sven Siegmund) Date: Sun, 11 May 2008 22:49:49 +0000 Subject: [issue2827] IDLE 3.0a5 cannot handle UTF-8 In-Reply-To: <1210546189.14.0.555715055472.issue2827@psf.upfronthosting.co.za> Message-ID: <1210546189.14.0.555715055472.issue2827@psf.upfronthosting.co.za> New submission from Sven Siegmund : I have a source code which IDLE 3.0a5 cannot parse, but Python 3.0a5 can (also attached): #!/usr/bin/python # -*- coding: utf-8 -*- def na?tiSlovn?k(zdroj='slovn?k.txt'): soubor = open(zdroj, mode='r', encoding='utf_8') ??dky = soubor.readlines() for ??dek in ??dky: print(??dek, end='') na?tiSlovn?k() # End of source code I have set up Default Source Encoding to UTF-8 in IDLE's general configuration. Still, when I open that source code and try to run it, IDLE complains about "invalid character in identifier" and highlights "zdroj" red in the first line (sic!). However, when I run the source code from command line (by "python "), it gets executed well and does what it shall do. I should probably add, that I have installed py3k:62932M, May 9 2008, 16:23:11 [MSC v.1500 32 bit (Intel)] on win32. I use Windows XP SP 3. IDLE uses Tk version 8.4 ---------- components: IDLE files: czech-it.py messages: 66689 nosy: sven.siegmund severity: normal status: open title: IDLE 3.0a5 cannot handle UTF-8 type: compile error versions: Python 3.0 Added file: http://bugs.python.org/file10293/czech-it.py __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 00:57:23 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 22:57:23 +0000 Subject: [issue1685] linecache .updatecache fails on utf8 encoded files In-Reply-To: <1198300635.1.0.891509425639.issue1685@psf.upfronthosting.co.za> Message-ID: <1210546643.68.0.22059738171.issue1685@psf.upfronthosting.co.za> Georg Brandl added the comment: This should be fixed differently (directly applying the RE to bytes objects), but it needs a re that handles bytes first. ---------- assignee: -> georg.brandl nosy: +georg.brandl priority: high -> critical __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 01:09:16 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 11 May 2008 23:09:16 +0000 Subject: [issue2825] Quote-type recognition bug [got a patch!] In-Reply-To: <1210538545.7.0.805693015391.issue2825@psf.upfronthosting.co.za> Message-ID: <1210547355.92.0.0208305556424.issue2825@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I though Georg already did this in r63068. ---------- nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 01:12:01 2008 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 11 May 2008 23:12:01 +0000 Subject: [issue2825] Quote-type recognition bug [got a patch!] In-Reply-To: <1210538545.7.0.805693015391.issue2825@psf.upfronthosting.co.za> Message-ID: <1210547521.38.0.590407171751.issue2825@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 01:15:31 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 May 2008 23:15:31 +0000 Subject: [issue1234985] using some_re.sub() often imports sre.__doc__ Message-ID: <1210547731.02.0.209536855436.issue1234985@psf.upfronthosting.co.za> Georg Brandl added the comment: pattern.sub() imports the SRE Python module (to call its subx()) with PyImport_Import -- that C functions uses a dummy list ['__doc__'] to get the correct module for dotted import paths. The import of an additional module is gone now that re is really called re. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 12 01:18:46 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 11 May 2008 23:18:46 +0000 Subject: [issue678464] Docs don't define sequence-ness very well Message-ID: <1210547926.98.0.778244669774.issue678464@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- type: -> feature request ____________________________________ Tracker ____________________________________ From report at bugs.python.org Mon May 12 02:33:56 2008 From: report at bugs.python.org (Andrews Patrick Rocha Medina) Date: Mon, 12 May 2008 00:33:56 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210552436.07.0.983186132127.issue2775@psf.upfronthosting.co.za> Changes by Andrews Patrick Rocha Medina : Added file: http://bugs.python.org/file10294/deprecated_symtable_on_py26.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 02:41:48 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 12 May 2008 00:41:48 +0000 Subject: [issue2196] Fix hasattr's exception problems In-Reply-To: <1204066315.71.0.0794011213674.issue2196@psf.upfronthosting.co.za> Message-ID: <1210552908.5.0.316235821838.issue2196@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Done in r63119. ---------- resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 03:19:50 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 12 May 2008 01:19:50 +0000 Subject: [issue2828] Clean up undoc.rst In-Reply-To: <1210555189.34.0.375488614509.issue2828@psf.upfronthosting.co.za> Message-ID: <1210555189.34.0.375488614509.issue2828@psf.upfronthosting.co.za> New submission from Brett Cannon : Doc/library/undoc.rst needs to be cleaned up once PEP 3108 has been implemented. ---------- assignee: brett.cannon components: Documentation keywords: easy messages: 66694 nosy: brett.cannon priority: normal severity: normal status: open title: Clean up undoc.rst type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 03:20:10 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 12 May 2008 01:20:10 +0000 Subject: [issue2828] Clean up undoc.rst In-Reply-To: <1210555189.34.0.375488614509.issue2828@psf.upfronthosting.co.za> Message-ID: <1210555210.55.0.8764316949.issue2828@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Implement PEP 3108 priority: normal -> high __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 03:40:08 2008 From: report at bugs.python.org (Andrews Patrick Rocha Medina) Date: Mon, 12 May 2008 01:40:08 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210556408.49.0.282755071438.issue2775@psf.upfronthosting.co.za> Andrews Patrick Rocha Medina added the comment: I'm working on creating html package with HTMLParser and htmlentitydefs __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 03:45:18 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 12 May 2008 01:45:18 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210556717.99.0.723070223879.issue2775@psf.upfronthosting.co.za> Brett Cannon added the comment: Just so people know, feel free to create new issues for stuff if you want. Other issues can be made dependencies of this issue very easily. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 03:45:26 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 12 May 2008 01:45:26 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210556726.22.0.442593516638.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : Removed file: http://bugs.python.org/file10257/queue_rename.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 03:59:34 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 12 May 2008 01:59:34 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210557574.44.0.857431281138.issue2775@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- dependencies: +Remove mac modules __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 04:01:38 2008 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 12 May 2008 02:01:38 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210557698.18.0.230776121055.issue2775@psf.upfronthosting.co.za> Guilherme Polo added the comment: New patch regarding the move to tkinter package, now with docs updated. This one should be the "final" patch, and while the patch is relatively large it mostly trivial to review. Added file: http://bugs.python.org/file10296/tkinter_package_and_fixes_2.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 04:02:15 2008 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 12 May 2008 02:02:15 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210557735.21.0.169776668297.issue2775@psf.upfronthosting.co.za> Changes by Guilherme Polo : Removed file: http://bugs.python.org/file10290/tkinter_package_and_fixes.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 04:07:52 2008 From: report at bugs.python.org (Kayne Naughton) Date: Mon, 12 May 2008 02:07:52 +0000 Subject: [issue1645148] MIME renderer: wrong header line break with long subject? Message-ID: <1210558072.59.0.925498532839.issue1645148@psf.upfronthosting.co.za> Kayne Naughton added the comment: Just struck this myself, found Andi's solution to work. Constructing the header using email.header stops it from breaking the line awkwardly (vs. just storing a string). Suggest the documentation example page be updated to use header() in place of straight strings. (I can only guess as to they why of this, it seems not to hang the indent more than a space when using header). ---------- nosy: +kayne _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 12 04:10:17 2008 From: report at bugs.python.org (Kayne Naughton) Date: Mon, 12 May 2008 02:10:17 +0000 Subject: [issue1645148] MIME renderer: wrong header line break with long subject? Message-ID: <1210558217.88.0.356415956595.issue1645148@psf.upfronthosting.co.za> Kayne Naughton added the comment: Argg, yes, as Andi explained it's the tab (not sure how I missed that on first reading). _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 12 04:19:24 2008 From: report at bugs.python.org (Andrews Patrick Rocha Medina) Date: Mon, 12 May 2008 02:19:24 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210558764.51.0.88344864544.issue2775@psf.upfronthosting.co.za> Andrews Patrick Rocha Medina added the comment: For to remove the htmllib on Python 3000 is need to removed these files: Lib/htmllib.py Lib/test_htmllib.py And apply this patch Added file: http://bugs.python.org/file10297/htmllib_removed_on_py3k.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 04:29:03 2008 From: report at bugs.python.org (Bruno Gomes) Date: Mon, 12 May 2008 02:29:03 +0000 Subject: [issue1322] platform.dist() has unpredictable result under Linux In-Reply-To: <1193246464.1.0.269134020057.issue1322@psf.upfronthosting.co.za> Message-ID: <1210559343.79.0.609475905031.issue1322@psf.upfronthosting.co.za> Bruno Gomes added the comment: In this fix I removed the use of the file name in order to return the distname. Now, only the file contents is taken into account. On Centos, the file name is the same as on Redhat, but its contents is different: $ cat /etc/redhat-release CentOS release 5 (Final) Compare: With test_platform_py26.diff: Python 2.6a3+ (trunk:62996M, May 10 2008, 16:38:41) [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> platform.dist() ('redhat', '5', 'Final') >>> With the new fix: Python 2.6a3+ (trunk:62996M, May 10 2008, 16:38:41) [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> platform.dist() ('CentOS', '5', 'Final') >>> I have tested this fix on Ubuntu, Centos5 and RHEL 5 and it works fine. Ubuntu: ('Ubuntu', '8.04', 'hardy') Fedora: ('fedora', '8', 'Werewolf') ---------- nosy: +bgomes Added file: http://bugs.python.org/file10298/test_platform_py26_fix_centos.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 05:37:40 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 12 May 2008 03:37:40 +0000 Subject: [issue2829] Copy cgi.parse_qs() to urllib.parse In-Reply-To: <1210563460.47.0.22388264935.issue2829@psf.upfronthosting.co.za> Message-ID: <1210563460.47.0.22388264935.issue2829@psf.upfronthosting.co.za> New submission from Brett Cannon : cgi.parse_qs() really belongs more in urllib.parse. Move it so that people no longer have to import cgi just for that one function. ---------- assignee: brett.cannon components: Library (Lib) messages: 66703 nosy: brett.cannon priority: normal severity: normal status: open title: Copy cgi.parse_qs() to urllib.parse type: feature request versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 05:38:08 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 12 May 2008 03:38:08 +0000 Subject: [issue2829] Copy cgi.parse_qs() to urllib.parse In-Reply-To: <1210563460.47.0.22388264935.issue2829@psf.upfronthosting.co.za> Message-ID: <1210563488.06.0.777943351295.issue2829@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: brett.cannon -> __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 05:41:33 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 12 May 2008 03:41:33 +0000 Subject: [issue2830] Copy cgi.escape() to html In-Reply-To: <1210563693.47.0.635782576194.issue2830@psf.upfronthosting.co.za> Message-ID: <1210563693.47.0.635782576194.issue2830@psf.upfronthosting.co.za> New submission from Brett Cannon : cgi.escape() really belong in the new 'html' package. ---------- components: Library (Lib) messages: 66704 nosy: brett.cannon priority: normal severity: normal status: open title: Copy cgi.escape() to html type: feature request versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 05:49:39 2008 From: report at bugs.python.org (Scott Dial) Date: Mon, 12 May 2008 03:49:39 +0000 Subject: [issue2831] Adding start to enumerate() In-Reply-To: <1210564174.93.0.918851730075.issue2831@psf.upfronthosting.co.za> Message-ID: <1210564174.93.0.918851730075.issue2831@psf.upfronthosting.co.za> New submission from Scott Dial : Georg Brandel suggested enumerate() should have the ability to start on an arbitrary number (instead of always starting at 0). I suggest such a parameter should be keyword-only. Attached is a patch to add such a feature along with added test cases. Documentation still needs to be updated, but I wasn't sure how best to handle that anyways. I wasn't sure how best to handle a keyword-only argument, so I'd be interested to know if there is a better way. ---------- components: Interpreter Core files: enumerate.diff keywords: patch messages: 66705 nosy: scottdial severity: normal status: open title: Adding start to enumerate() type: feature request versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10299/enumerate.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 05:53:07 2008 From: report at bugs.python.org (Scott Dial) Date: Mon, 12 May 2008 03:53:07 +0000 Subject: [issue2831] Adding start to enumerate() In-Reply-To: <1210564174.93.0.918851730075.issue2831@psf.upfronthosting.co.za> Message-ID: <1210564387.13.0.0198342139433.issue2831@psf.upfronthosting.co.za> Changes by Scott Dial : Added file: http://bugs.python.org/file10300/enumerate.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 05:53:21 2008 From: report at bugs.python.org (Scott Dial) Date: Mon, 12 May 2008 03:53:21 +0000 Subject: [issue2831] Adding start to enumerate() In-Reply-To: <1210564174.93.0.918851730075.issue2831@psf.upfronthosting.co.za> Message-ID: <1210564401.77.0.50487762425.issue2831@psf.upfronthosting.co.za> Changes by Scott Dial : Removed file: http://bugs.python.org/file10299/enumerate.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 05:54:36 2008 From: report at bugs.python.org (Scott Dial) Date: Mon, 12 May 2008 03:54:36 +0000 Subject: [issue2831] Adding start to enumerate() In-Reply-To: <1210564174.93.0.918851730075.issue2831@psf.upfronthosting.co.za> Message-ID: <1210564476.72.0.937111089027.issue2831@psf.upfronthosting.co.za> Changes by Scott Dial : Removed file: http://bugs.python.org/file10300/enumerate.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 05:54:32 2008 From: report at bugs.python.org (Scott Dial) Date: Mon, 12 May 2008 03:54:32 +0000 Subject: [issue2831] Adding start to enumerate() In-Reply-To: <1210564174.93.0.918851730075.issue2831@psf.upfronthosting.co.za> Message-ID: <1210564472.62.0.318421750766.issue2831@psf.upfronthosting.co.za> Changes by Scott Dial : Added file: http://bugs.python.org/file10301/enumerate.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 06:09:28 2008 From: report at bugs.python.org (Rodrigo Bernardo Pimentel) Date: Mon, 12 May 2008 04:09:28 +0000 Subject: [issue1713041] fix for 1712742: corrects pprint's handling of 'depth' Message-ID: <1210565367.05.0.978047758359.issue1713041@psf.upfronthosting.co.za> Rodrigo Bernardo Pimentel added the comment: It seems that somewhere along the road between revision 55144 (where the first patch was generated) and current trunk (revision 63129), PrettyPrinter._format has stopped handling depth! I've attached a patch that fixes this, along with the fixes this issue originally proposed (including the tests and documentation updates). With this patch, unit tests and the documentation's doctests all pass. BTW, doctesting Doc/library/pprint.rst with optionflags=doctest.ELLIPSIS erroneously interprets pprint's '...' (indicating depth exceeded) as doctest ellipses! Testing without ELLIPSIS gives an error on output with something like "[]", testing with it hides errors. Ugh! ---------- nosy: +rbp -errebepe Added file: http://bugs.python.org/file10302/pprint-r63129.patch _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 12 06:52:05 2008 From: report at bugs.python.org (Dmitry Dvoinikov) Date: Mon, 12 May 2008 04:52:05 +0000 Subject: [issue2832] Line numbers reported by extract_stack are offset by the #-*- encoding line In-Reply-To: <1210567925.19.0.359554733284.issue2832@psf.upfronthosting.co.za> Message-ID: <1210567925.19.0.359554733284.issue2832@psf.upfronthosting.co.za> New submission from Dmitry Dvoinikov : Stack trace information extracted with traceback.extract_stack is incorrect in that the #-*- line causes double counting. For example: #comment from traceback import extract_stack print("this is line", extract_stack()[-1][1]) prints 'this is line 3', but #comment #-*- coding: windows-1251 -*- from traceback import extract_stack print("this is line", extract_stack()[-1][1]) prints 'this is line 6' ---------- components: Library (Lib) messages: 66708 nosy: ddvoinikov severity: normal status: open title: Line numbers reported by extract_stack are offset by the #-*- encoding line type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 08:19:13 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 12 May 2008 06:19:13 +0000 Subject: [issue2831] Adding start to enumerate() In-Reply-To: <1210564174.93.0.918851730075.issue2831@psf.upfronthosting.co.za> Message-ID: <1210573153.66.0.410857083003.issue2831@psf.upfronthosting.co.za> Raymond Hettinger added the comment: If a start argument gets accepted, it should be positional, not a keyword-only argument. That is a complete waste when there is just one argument with a straight-forward interpretation. Besides, METH_O is a lot faster than the alternatives. ---------- nosy: +rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 08:23:55 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 12 May 2008 06:23:55 +0000 Subject: [issue2831] Adding start to enumerate() In-Reply-To: <1210564174.93.0.918851730075.issue2831@psf.upfronthosting.co.za> Message-ID: <1210573434.96.0.622629862132.issue2831@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Forget the part about METH_O. That was incorrect. Another idea to order the positional args as ([start,], iterator). That corresponds to with range([start,] stop) and it matches the output order (number, element): for i, element in enumerate(10, iterable): ^-----------------------^ ^-------------------------^ __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 08:35:24 2008 From: report at bugs.python.org (Scott Dial) Date: Mon, 12 May 2008 06:35:24 +0000 Subject: [issue2831] Adding start to enumerate() In-Reply-To: <1210564174.93.0.918851730075.issue2831@psf.upfronthosting.co.za> Message-ID: <1210574124.76.0.659809423341.issue2831@psf.upfronthosting.co.za> Scott Dial added the comment: As it stands, enumerate() already takes a "sequence" keyword as an alternative to the first positional argument (although this seems to be completely undocumented). So, as you say, METH_O is a no go. I agree with you in that my original complaint with the positional argument was that enumerate(iterable, start) was "backwards." My other argument was that a large number of these iterator utility functions are foo(*iterable) and upon seeing enumerate(foo, bar), a reader might be inclined to assume it was equivalent to enumerate(chain(foo, bar)). __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 09:00:03 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 12 May 2008 07:00:03 +0000 Subject: [issue2831] Adding start to enumerate() In-Reply-To: <1210564174.93.0.918851730075.issue2831@psf.upfronthosting.co.za> Message-ID: <1210575603.73.0.182803281213.issue2831@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, at one point, Guido rejected all variants of the idea. His first objection was that enumerate() is all about pairing values with sequence indices, so starting from anything other than zero is in conflict with the core concept. His second objection is that all variants can easily be misread as starting at the nth item in the sequence (much like islice() does now): enumerate(3, 'abcdefg') --> (3,'d') (4,'e') (5, 'f') (6, 'g'). The latter mis-reading becomes more likely for those who think of enumerate as providing indices. In fact, one of the suggested names for enumerate was "indices". __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 09:06:54 2008 From: report at bugs.python.org (Dmitry Dvoinikov) Date: Mon, 12 May 2008 07:06:54 +0000 Subject: [issue2833] __exit__ silences the active exception In-Reply-To: <1210576013.94.0.462684443177.issue2833@psf.upfronthosting.co.za> Message-ID: <1210576013.94.0.462684443177.issue2833@psf.upfronthosting.co.za> New submission from Dmitry Dvoinikov : If a context manager is used within exception handling block, the active exception is silenced after the context block completes and __exit__ exits. try: raise Exception("foo") except: with SomeContextManager(): pass raise # in Py2.5 throws 'foo', in Py3.0 fails with RuntimeError ---------- components: Interpreter Core messages: 66713 nosy: ddvoinikov severity: normal status: open title: __exit__ silences the active exception type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 10:18:08 2008 From: report at bugs.python.org (David Fraser) Date: Mon, 12 May 2008 08:18:08 +0000 Subject: [issue2809] string docstring doesn't mention that ' '.split() != ' '.split(' ') In-Reply-To: <1210434494.63.0.105776836693.issue2809@psf.upfronthosting.co.za> Message-ID: <1210580288.31.0.248983956539.issue2809@psf.upfronthosting.co.za> David Fraser added the comment: Yes that's fantastic, thanks :-) __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 10:44:13 2008 From: report at bugs.python.org (Sven Siegmund) Date: Mon, 12 May 2008 08:44:13 +0000 Subject: [issue2834] re.IGNORECASE not Unicode-ready In-Reply-To: <1210581845.07.0.550614143529.issue2834@psf.upfronthosting.co.za> Message-ID: <1210581845.07.0.550614143529.issue2834@psf.upfronthosting.co.za> New submission from Sven Siegmund : re cannot ignore case of special latin characters: Python 3.0a5 (py3k:62932M, May 9 2008, 16:23:11) [MSC v.1500 32 bit (Intel)] on win32 >>> '?'.lower() == '?' and '?'.upper() == '?' True >>> import re >>> rx = re.compile('?', re.IGNORECASE) >>> rx.match('?') # should match but won't >>> rx.match('?') # will match <_sre.SRE_Match object at 0x014B08A8> >>> rx = re.compile('?', re.IGNORECASE) >>> rx.match('?') # should match but won't >>> rx.match('?') # will match <_sre.SRE_Match object at 0x014B08A8> ---------- components: Regular Expressions messages: 66715 nosy: sven.siegmund severity: normal status: open title: re.IGNORECASE not Unicode-ready type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 11:39:31 2008 From: report at bugs.python.org (Mark Summerfield) Date: Mon, 12 May 2008 09:39:31 +0000 Subject: [issue2835] Py30a5: webbrowser.open() inf recursion In-Reply-To: <1210585171.47.0.115273460477.issue2835@psf.upfronthosting.co.za> Message-ID: <1210585171.47.0.115273460477.issue2835@psf.upfronthosting.co.za> New submission from Mark Summerfield : There appears to be an infinite recursion in Py30a5 (doing the same thing in Py2.5.1 works fine): Python 3.0a5 (r30a5:62856, May 9 2008, 11:23:06) [GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2 Type "copyright", "credits" or "license()" for more information. IDLE 3.0a5 >>> import webbrowser >>> url = "http://www.python.org" >>> webbrowser.open(url) Traceback (most recent call last): File "", line 1, in webbrowser.open(url) File "/home/mark/opt/python30a5/lib/python3.0/webbrowser.py", line 61, in open if browser.open(url, new, autoraise): File "/home/mark/opt/python30a5/lib/python3.0/webbrowser.py", line 350, in open devnull = open(os.devnull, "r+") File "/home/mark/opt/python30a5/lib/python3.0/webbrowser.py", line 61, in open if browser.open(url, new, autoraise): File "/home/mark/opt/python30a5/lib/python3.0/webbrowser.py", line 350, in open ... devnull = open(os.devnull, "r+") File "/home/mark/opt/python30a5/lib/python3.0/webbrowser.py", line 61, in open if browser.open(url, new, autoraise): ---------- components: Library (Lib) messages: 66716 nosy: mark severity: normal status: open title: Py30a5: webbrowser.open() inf recursion type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 12:42:50 2008 From: report at bugs.python.org (Eric Smith) Date: Mon, 12 May 2008 10:42:50 +0000 Subject: [issue2836] str.format() documentation needs to be backported to 2.6 In-Reply-To: <1210588970.37.0.914447928942.issue2836@psf.upfronthosting.co.za> Message-ID: <1210588970.37.0.914447928942.issue2836@psf.upfronthosting.co.za> New submission from Eric Smith : 3.0 has documentation for str.format(), but that documentation is missing in 2.6. The 2.6 what's new document: http://docs.python.org/dev/whatsnew/2.6.html also has an XXX reference to this: "Consult the 2.6 documentation for a complete list (XXX add link, once it?s in the 2.6 docs), but here?s a sample:" ---------- assignee: georg.brandl components: Documentation keywords: 26backport messages: 66717 nosy: eric.smith, georg.brandl priority: high severity: normal status: open title: str.format() documentation needs to be backported to 2.6 versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 12:55:21 2008 From: report at bugs.python.org (Eric Smith) Date: Mon, 12 May 2008 10:55:21 +0000 Subject: [issue2836] str.format() documentation needs to be backported to 2.6 In-Reply-To: <1210588970.37.0.914447928942.issue2836@psf.upfronthosting.co.za> Message-ID: <1210589721.57.0.573009290653.issue2836@psf.upfronthosting.co.za> Eric Smith added the comment: When backporting to 2.6, this needs to be documented for both str and unicode. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 14:08:15 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 12 May 2008 12:08:15 +0000 Subject: [issue1858] Make .pypirc handle multiple servers In-Reply-To: <1200573233.93.0.822400680572.issue1858@psf.upfronthosting.co.za> Message-ID: <1210594095.56.0.779158565085.issue1858@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Thanks for the integration work ! I was wondering: since it superseeds two bugs (issue1741, issue2166) that where marked to be backported in 2.5.x, should I write 2.5 specific patches for those particular fixes ? (windows paths related issues) __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 15:21:06 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 12 May 2008 13:21:06 +0000 Subject: [issue2798] Crash on non-Windows if Python runs from a non-ASCII directory In-Reply-To: <1210327500.09.0.609692873362.issue2798@psf.upfronthosting.co.za> Message-ID: <1210598466.63.0.118555341791.issue2798@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Committed as r63161, with tests. Thanks! Now let's work on the Windows case... ---------- nosy: +amaury.forgeotdarc resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 15:39:52 2008 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 12 May 2008 13:39:52 +0000 Subject: [issue2835] Py30a5: webbrowser.open() inf recursion In-Reply-To: <1210585171.47.0.115273460477.issue2835@psf.upfronthosting.co.za> Message-ID: <1210599591.09.0.843789989397.issue2835@psf.upfronthosting.co.za> Guilherme Polo added the comment: It doesn't happen here, I'm using Linux too (Ubuntu 8.04) and py3k rev 63074 ---------- nosy: +gpolo versions: +Python 2.6 -Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 15:54:54 2008 From: report at bugs.python.org (Mark Summerfield) Date: Mon, 12 May 2008 13:54:54 +0000 Subject: [issue2835] Py30a5: webbrowser.open() inf recursion In-Reply-To: <1210585171.47.0.115273460477.issue2835@psf.upfronthosting.co.za> Message-ID: <1210600494.04.0.377212984344.issue2835@psf.upfronthosting.co.za> Mark Summerfield added the comment: I get the same bug on Fedora 8 (Python build 63161) and Kubuntu 8 (official Py30a5 release)---but not on Windows XP Home where the URL is opened correctly. Python 3.0a5+ (py3k:60668:63161, May 12 2008, 14:46:40) [GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import webbrowser >>> webbrowser.open("http://www.python.org") Traceback (most recent call last): File "", line 1, in File "/home/mark/pycore/30/Lib/webbrowser.py", line 61, in open if browser.open(url, new, autoraise): Python 3.0a5 (r30a5:62856, May 9 2008, 11:27:40) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "copyright", "credits" or "license()" for more information. IDLE 3.0a5 >>> import webbrowser >>> webbrowser.open("http://www.python.org") Traceback (most recent call last): File "", line 1, in webbrowser.open("http://www.python.org") ... __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 15:58:32 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 12 May 2008 13:58:32 +0000 Subject: [issue2835] Py30a5: webbrowser.open() inf recursion In-Reply-To: <1210585171.47.0.115273460477.issue2835@psf.upfronthosting.co.za> Message-ID: <1210600712.41.0.739484484081.issue2835@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The traceback suggest a problem when using KDE: a call to file() was renamed to open(), this clashes with webbrowser.open(). Can you try the following patch: Index: Lib/webbrowser.py =================================================================== --- Lib/webbrowser.py (revision 63159) +++ Lib/webbrowser.py (working copy) @@ -347,7 +347,8 @@ else: action = "openURL" - devnull = open(os.devnull, "r+") + import io + devnull = io.open(os.devnull, "r+") # if possible, put browser in separate process group, so # keyboard interrupts don't affect browser as well as Python setsid = getattr(os, 'setsid', None) ---------- nosy: +amaury.forgeotdarc __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 16:20:55 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 12 May 2008 14:20:55 +0000 Subject: [issue2833] __exit__ silences the active exception In-Reply-To: <1210576013.94.0.462684443177.issue2833@psf.upfronthosting.co.za> Message-ID: <1210602055.28.0.842024801367.issue2833@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This problem was introduced by r62847. ---------- nosy: +amaury.forgeotdarc __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 16:32:58 2008 From: report at bugs.python.org (Mark Summerfield) Date: Mon, 12 May 2008 14:32:58 +0000 Subject: [issue2835] Py30a5: webbrowser.open() inf recursion In-Reply-To: <1210600712.41.0.739484484081.issue2835@psf.upfronthosting.co.za> Message-ID: <200805121532.51714.mark@qtrac.eu> Mark Summerfield added the comment: On 2008-05-12, Amaury Forgeot d'Arc wrote: > Amaury Forgeot d'Arc added the comment: > > The traceback suggest a problem when using KDE: a call to file() was > renamed to open(), this clashes with webbrowser.open(). > Can you try the following patch: > > Index: Lib/webbrowser.py > =================================================================== > --- Lib/webbrowser.py (revision 63159) > +++ Lib/webbrowser.py (working copy) > @@ -347,7 +347,8 @@ > else: > action = "openURL" > > - devnull = open(os.devnull, "r+") > + import io > + devnull = io.open(os.devnull, "r+") > # if possible, put browser in separate process group, so > # keyboard interrupts don't affect browser as well as Python > setsid = getattr(os, 'setsid', None) That fixed it! __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 16:41:21 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 12 May 2008 14:41:21 +0000 Subject: [issue2835] Py30a5: webbrowser.open() inf recursion In-Reply-To: <1210585171.47.0.115273460477.issue2835@psf.upfronthosting.co.za> Message-ID: <1210603281.53.0.664128422501.issue2835@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Corrected as r63163. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 16:44:04 2008 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 12 May 2008 14:44:04 +0000 Subject: [issue2834] re.IGNORECASE not Unicode-ready In-Reply-To: <1210581845.07.0.550614143529.issue2834@psf.upfronthosting.co.za> Message-ID: <1210603444.12.0.793863269126.issue2834@psf.upfronthosting.co.za> Guido van Rossum added the comment: Try adding re.LOCALE to the flags. I'm not sure why that is needed but it seems to fix this issue. I still think this is a legitimate bug though. ---------- nosy: +gvanrossum __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 17:04:03 2008 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 12 May 2008 15:04:03 +0000 Subject: [issue2824] zipfile to handle duplicate files in archive In-Reply-To: <1210537070.35.0.0613996133193.issue2824@psf.upfronthosting.co.za> Message-ID: <1210604642.66.0.737564342952.issue2824@psf.upfronthosting.co.za> anatoly techtonik added the comment: How about adding optional "replace=True" attribute to the write method? So that people who are not aware enough to adjust the code and handle new warning could still get valid archives. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 17:37:42 2008 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 12 May 2008 15:37:42 +0000 Subject: [issue2837] OpenID wannabe In-Reply-To: <1210606658.94.0.916012162383.issue2837@psf.upfronthosting.co.za> Message-ID: <1210606658.94.0.916012162383.issue2837@psf.upfronthosting.co.za> New submission from anatoly techtonik : I haven't found any traces of requests to add OpenID URLs for authentication into account details for registered users, so I take the privilege to be the first one to say that it will be handy. ---------- components: None messages: 66729 nosy: techtonik severity: normal status: open title: OpenID wannabe __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 17:57:05 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 12 May 2008 15:57:05 +0000 Subject: [issue2837] OpenID wannabe In-Reply-To: <1210606658.94.0.916012162383.issue2837@psf.upfronthosting.co.za> Message-ID: <1210607824.98.0.840032937186.issue2837@psf.upfronthosting.co.za> Martin v. L?wis added the comment: If you are talking about tracker users, please report that to the meta tracker (see Report Tracker Problem to the left): http://psf.upfronthosting.co.za/roundup/meta If you are talking about other kinds of registered users, please be more explicit. In any case, contributions are welcome; if this is referring to this bug tracker, you should best contact the roundup mailing lists (and again be prepared to provide patches). ---------- nosy: +loewis resolution: -> invalid status: open -> pending __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 18:12:23 2008 From: report at bugs.python.org (thechao) Date: Mon, 12 May 2008 16:12:23 +0000 Subject: [issue1649238] potential clash with C++ in ceval.h Message-ID: <1210608743.49.0.306818128289.issue1649238@psf.upfronthosting.co.za> thechao added the comment: This bug has been resolved. The new C++ keyword has been changed from "where" to "requires". I will go look for requires. I can either add other potential collisions here, or start a new bug. Other potential problems are "typedecl" and "constexpr". _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 12 18:18:14 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 12 May 2008 16:18:14 +0000 Subject: [issue1649238] potential clash with C++ in ceval.h Message-ID: <1210609094.04.0.111913329016.issue1649238@psf.upfronthosting.co.za> Georg Brandl added the comment: Okay, I'm closing this one. If you find further clashes, feel free to open a new bug. Thanks for the update! ---------- resolution: -> works for me status: open -> closed _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 12 18:22:09 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 12 May 2008 16:22:09 +0000 Subject: [issue2821] unittest.py sys.exit error In-Reply-To: <1210532457.78.0.053406582463.issue2821@psf.upfronthosting.co.za> Message-ID: <1210609329.26.0.140273360299.issue2821@psf.upfronthosting.co.za> Georg Brandl added the comment: This is an IDLE problem then. ---------- assignee: -> kbk components: +IDLE -Library (Lib) nosy: +kbk __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 18:22:38 2008 From: report at bugs.python.org (Jean Brouwers) Date: Mon, 12 May 2008 16:22:38 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210538965.26.0.413236859099.issue2819@psf.upfronthosting.co.za> Message-ID: <39a48f50805120922o7eadd6f4q15397b8afab271a5@mail.gmail.com> Jean Brouwers added the comment: Mark, Thank you very much for your comments. Here is my initial response to the first 3. (1) Attached is an attempt to address the 1st issue (just the mathmodule). The macros PyFPE_START_PROTECT/_END_PROTECT have been moved outside the main loop and the errno is set following the IEEE 754 rules as you suggested. One related issue is testing these, how can a NaN and +/-Infinity float object be created in Python? (2) On your 2nd comment, supporting non-IEEE floating point, perhaps the Kahan method should be used in that case. If so, the next question is how to detect that? There are two symbols in pyconfig.h HAVE_IEEEFP_H and HAVE_LIBIEEE. Are those the proper ones to determine IEEE floating point support? (3) On the 3rd comment, Raymond and I did discus using a single function to be called by the math and cmath modules. The question is where should that function reside? The math and cmath modules are not the right place since both are loadable modules. It will have to be somewhere inside the Python main/core. Also, depending on the implementation of that function, it may require iterating the complex sequence twice. And that will force the C complex numbers to be created twice by the PyComplex_AsCComplex() call. Would that be a concern? /Jean Brouwers On Sun, May 11, 2008 at 1:49 PM, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > One more question: > > What are the use cases for an exact summation algorithm? That is, in what > situations does one care about exactness rather than simply accuracy? I > know that loss of accuracy is a problem in things like numeric integration > routines, but something like Kahan summation (faster and simpler, but not > exact) usually takes care of that. > > __________________________________ > Tracker > > __________________________________ > Added file: http://bugs.python.org/file10306/unnamed Added file: http://bugs.python.org/file10307/mathmodule.c.2.6a3.take2.diff __________________________________ Tracker __________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: mathmodule.c.2.6a3.take2.diff URL: From report at bugs.python.org Mon May 12 18:25:54 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 12 May 2008 16:25:54 +0000 Subject: [issue1712742] pprint handles depth argument incorrectly Message-ID: <1210609554.2.0.358576878196.issue1712742@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing as dupe of the patch issue. ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> fix for 1712742: corrects pprint's handling of 'depth' _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 12 18:27:07 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 12 May 2008 16:27:07 +0000 Subject: [issue1713041] fix for 1712742: corrects pprint's handling of 'depth' Message-ID: <1210609627.47.0.542459012493.issue1713041@psf.upfronthosting.co.za> Georg Brandl added the comment: Okay, thank you all! Committed patch as r63164. ---------- resolution: -> accepted status: open -> closed _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 12 18:45:55 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 12 May 2008 16:45:55 +0000 Subject: [issue2836] str.format() documentation needs to be backported to 2.6 In-Reply-To: <1210588970.37.0.914447928942.issue2836@psf.upfronthosting.co.za> Message-ID: <1210610755.31.0.528110001341.issue2836@psf.upfronthosting.co.za> Georg Brandl added the comment: Okay, backported (mostly copied) the docs, and added the whatsnew link, in r63166. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 12 18:47:31 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 12 May 2008 16:47:31 +0000 Subject: [issue2815] Python Manuals: horizontal scrolling broken In-Reply-To: <1210481871.75.0.331980790719.issue2815@psf.upfronthosting.co.za> Message-ID: <1210610851.64.0.00879942431856.issue2815@psf.upfronthosting.co.za> Georg Brandl added the comment: I added "overflow: auto" to the stylesheet for
 tags in r63167;
this should give individual scrollbars for code samples not fitting the
page width.

----------
resolution:  -> fixed
status: open -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 18:58:02 2008
From: report at bugs.python.org (Georg Brandl)
Date: Mon, 12 May 2008 16:58:02 +0000
Subject: [issue2770] Subversion 1.5 Working Copies Break Setuptools
In-Reply-To: <1209996399.45.0.153432540456.issue2770@psf.upfronthosting.co.za>
Message-ID: <1210611482.53.0.622927985559.issue2770@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

This is now tracked in http://bugs.python.org/setuptools/issue4.

----------
nosy: +georg.brandl
resolution:  -> duplicate
status: open -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 19:02:06 2008
From: report at bugs.python.org (Georg Brandl)
Date: Mon, 12 May 2008 17:02:06 +0000
Subject: [issue2766] Doubtfull code in 'doctest.DocTestSuite'
In-Reply-To: <1209970110.99.0.739838799558.issue2766@psf.upfronthosting.co.za>
Message-ID: <1210611726.78.0.69153112189.issue2766@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

Thanks, the assignment to "globs" is indeed not necessary. Removed in
r63173.

----------
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 19:04:31 2008
From: report at bugs.python.org (Georg Brandl)
Date: Mon, 12 May 2008 17:04:31 +0000
Subject: [issue2767] "doctest.DocTestCase.debug" clears "test.globs" too early
In-Reply-To: <1209979946.64.0.074102110802.issue2767@psf.upfronthosting.co.za>
Message-ID: <1210611871.14.0.659253777434.issue2767@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

Thanks, fixed in r63174.

----------
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 19:05:04 2008
From: report at bugs.python.org (Georg Brandl)
Date: Mon, 12 May 2008 17:05:04 +0000
Subject: [issue2758] arg 2 of PyErr_SetFromErrnoWithFilename should be const
In-Reply-To: <1209922929.05.0.442409778711.issue2758@psf.upfronthosting.co.za>
Message-ID: <1210611904.43.0.382968875957.issue2758@psf.upfronthosting.co.za>


Changes by Georg Brandl :


----------
assignee:  -> loewis
nosy: +loewis

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 19:07:11 2008
From: report at bugs.python.org (Georg Brandl)
Date: Mon, 12 May 2008 17:07:11 +0000
Subject: [issue2243] urllib2. strange behavior for getting chuncked
	transfer-ecnoded data
In-Reply-To: <1204798625.87.0.148151937521.issue2243@psf.upfronthosting.co.za>
Message-ID: <1210612031.5.0.832708788934.issue2243@psf.upfronthosting.co.za>


Changes by Georg Brandl :


----------
status: pending -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 19:10:06 2008
From: report at bugs.python.org (Georg Brandl)
Date: Mon, 12 May 2008 17:10:06 +0000
Subject: [issue1749567] PLATFORM macro in PC/pyconfig.h already defined by
	Apache
Message-ID: <1210612206.6.0.335489673301.issue1749567@psf.upfronthosting.co.za>


Changes by Georg Brandl :


----------
status: pending -> closed

_____________________________________
Tracker 

_____________________________________

From report at bugs.python.org  Mon May 12 19:11:14 2008
From: report at bugs.python.org (Georg Brandl)
Date: Mon, 12 May 2008 17:11:14 +0000
Subject: [issue1856] shutdown (exit) can hang or segfault with daemon threads
	running
In-Reply-To: <1200535276.53.0.276618350299.issue1856@psf.upfronthosting.co.za>
Message-ID: <1210612274.83.0.331994268574.issue1856@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

Closed #2077 as a duplicate.

----------
nosy: +georg.brandl

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 19:11:21 2008
From: report at bugs.python.org (Georg Brandl)
Date: Mon, 12 May 2008 17:11:21 +0000
Subject: [issue2077] Interpreter crash on shutdown
In-Reply-To: <1202817025.41.0.0817912479052.issue2077@psf.upfronthosting.co.za>
Message-ID: <1210612281.47.0.197691934204.issue2077@psf.upfronthosting.co.za>


Changes by Georg Brandl :


----------
status: pending -> closed
superseder:  -> shutdown (exit) can hang or segfault with daemon threads running

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 19:12:04 2008
From: report at bugs.python.org (Georg Brandl)
Date: Mon, 12 May 2008 17:12:04 +0000
Subject: [issue1732367] Document the constants in the socket module
Message-ID: <1210612324.31.0.782284240345.issue1732367@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

Is there progress on this?

_____________________________________
Tracker 

_____________________________________

From report at bugs.python.org  Mon May 12 19:15:44 2008
From: report at bugs.python.org (Georg Brandl)
Date: Mon, 12 May 2008 17:15:44 +0000
Subject: [issue1760] PEP 341 is not reflected in the documentation
In-Reply-To: <1199782311.05.0.0687645566121.issue1760@psf.upfronthosting.co.za>
Message-ID: <1210612544.53.0.657494071174.issue1760@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

Should be fixed now with r63175.

----------
resolution:  -> fixed
status: open -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 19:35:42 2008
From: report at bugs.python.org (Jean Brouwers)
Date: Mon, 12 May 2008 17:35:42 +0000
Subject: [issue2819] Full precision summation
In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za>
Message-ID: <1210613741.99.0.122571202139.issue2819@psf.upfronthosting.co.za>


Jean Brouwers  added the comment:

My apologies for the messy post.  I replied to the email instead of 
posting my response.

/Jean Brouwers

PS) Attached is *an* example of the math_sum() and cmath_sum() functions 
using the same, shared function float_sum().  Perhaps, that resides in 
Objects/floatobject.c?

Added file: http://bugs.python.org/file10308/floatsum.c

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 20:00:02 2008
From: report at bugs.python.org (Ruben Kerkhof)
Date: Mon, 12 May 2008 18:00:02 +0000
Subject: [issue2838] Verify callback for SSL
In-Reply-To: <1210615202.55.0.632345790803.issue2838@psf.upfronthosting.co.za>
Message-ID: <1210615202.55.0.632345790803.issue2838@psf.upfronthosting.co.za>


New submission from Ruben Kerkhof :

I've been playing with the new SSL module, and so far it works great.

However, when using it to connect to a host with a self signed
certificate, verification fails when I specify ssl.CERT_REQUIRED (as
expected).

I know that I'm connecting to a host with a self signed certificate, so
I want to be able to ignore that error. At the moment, the only option I
see is to specify ssl.CERT_NONE and verify the DER certificate by hand.

It would be great if I could specify a callback function that can ignore
certain errors, and does additional checking.

----------
components: Library (Lib)
messages: 66746
nosy: ruben
severity: normal
status: open
title: Verify callback for SSL
type: feature request
versions: Python 2.6

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 20:00:39 2008
From: report at bugs.python.org (Guilherme Polo)
Date: Mon, 12 May 2008 18:00:39 +0000
Subject: [issue2839] Moving lib-tk to tkinter package
In-Reply-To: <1210615239.35.0.359819643531.issue2839@psf.upfronthosting.co.za>
Message-ID: <1210615239.35.0.359819643531.issue2839@psf.upfronthosting.co.za>


New submission from Guilherme Polo :

I'm moving lib-tk to a tkinter package, I've sent a patch for this which
can be found at issue 2775 but I started wrong (did a patch against py3k
directly).

----------
components: Library (Lib)
messages: 66747
nosy: gpolo
severity: normal
status: open
title: Moving lib-tk to tkinter package
versions: Python 2.6, Python 3.0

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 20:01:08 2008
From: report at bugs.python.org (Guilherme Polo)
Date: Mon, 12 May 2008 18:01:08 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210615268.98.0.129182383454.issue2775@psf.upfronthosting.co.za>


Changes by Guilherme Polo :


----------
dependencies: +Moving lib-tk to tkinter package

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 20:37:08 2008
From: report at bugs.python.org (Adam Getchell)
Date: Mon, 12 May 2008 18:37:08 +0000
Subject: [issue2821] unittest.py sys.exit error
In-Reply-To: <1210609329.26.0.140273360299.issue2821@psf.upfronthosting.co.za>
Message-ID: 


Adam Getchell  added the comment:

Agreed.

C:\Projects\Python>python randomunittest.py
...
----------------------------------------------------------------------
Ran 3 tests in 0.003s

OK

C:\Projects\Python>

> -----Original Message-----
> From: Georg Brandl [mailto:report at bugs.python.org]
> Sent: Monday, May 12, 2008 9:22 AM
> To: Getchell, Adam
> Subject: [issue2821] unittest.py sys.exit error
>
>
> Georg Brandl  added the comment:
>
> This is an IDLE problem then.
>
> ----------
> assignee:  -> kbk
> components: +IDLE -Library (Lib)
> nosy: +kbk
>
> __________________________________
> Tracker 
> 
> __________________________________

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 20:42:29 2008
From: report at bugs.python.org (Mark Dickinson)
Date: Mon, 12 May 2008 18:42:29 +0000
Subject: [issue2819] Full precision summation
In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za>
Message-ID: <1210617749.68.0.811291224218.issue2819@psf.upfronthosting.co.za>


Mark Dickinson  added the comment:

> One related issue is testing these, how can a NaN and +/-Infinity 
> float object be created in Python?

In 2.6 and 3.0 (but not 2.5 and older), float('nan'), float('inf') and 
float('-inf') should all work reliably across platforms (or at least 
those platforms that support infs and nans).  If they don't it's a bug.

> (2) On your 2nd comment, supporting non-IEEE floating point, perhaps
> the Kahan method should be used in that case.  If so, the next
> question is how to detect that?

Actually, I think you could probably just leave the algorithm exactly as 
it is, but put a warning in the documentation that the exactness only 
applies in the presence of IEEE 754 semantics.  Practically everybody's 
on an IEEE 754 platform anyway.

> There are two symbols in pyconfig.h HAVE_IEEEFP_H and
> HAVE_LIBIEEE.  Are those the proper ones to determine IEEE floating
> point support?

I'm not sure that either of these is the right thing.  Neither is 
defined on my MacBook, for example.

> (3) On the 3rd comment, Raymond and I did discus using a single 
> function to be called by the math and cmath modules.

I think you're right that it's easier to just duplicate the code.
It's a nice feature that this function only has to pass once through the 
data, and it doesn't seem worth losing that to save a little bit of code 
duplication.

I still wonder whether there's a way to avoid incorrectly signaling 
overflow in the case where the result is finite. (e.g. sum([1e308, 
1e308, -1e308])).

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 20:45:02 2008
From: report at bugs.python.org (Jean Brouwers)
Date: Mon, 12 May 2008 18:45:02 +0000
Subject: [issue2819] Full precision summation
In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za>
Message-ID: <1210617902.43.0.0364269236904.issue2819@psf.upfronthosting.co.za>


Jean Brouwers  added the comment:

It turns out, float('nan') creates a Nan and float('[+|-]inf') creates a 
[signed] Infinity object.  That answers my earlier question.

/Jean Brouwers

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 20:56:37 2008
From: report at bugs.python.org (Giampaolo Rodola')
Date: Mon, 12 May 2008 18:56:37 +0000
Subject: [issue1732367] Document the constants in the socket module
Message-ID: <1210618597.15.0.22487145271.issue1732367@psf.upfronthosting.co.za>


Giampaolo Rodola'  added the comment:

Yes, having a subsection describing such things would be a cool idea.
Please don't leave behind this ticket.

----------
nosy: +giampaolo.rodola

_____________________________________
Tracker 

_____________________________________

From report at bugs.python.org  Mon May 12 20:59:25 2008
From: report at bugs.python.org (Giampaolo Rodola')
Date: Mon, 12 May 2008 18:59:25 +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: <1210618765.17.0.253326796796.issue2054@psf.upfronthosting.co.za>


Giampaolo Rodola'  added the comment:

Bill, are there news about the fix to httplib?
I'd like to see this feature included in 2.6 if possible.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 21:17:01 2008
From: report at bugs.python.org (Jean Brouwers)
Date: Mon, 12 May 2008 19:17:01 +0000
Subject: [issue2819] Full precision summation
In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za>
Message-ID: <1210619821.69.0.153309544067.issue2819@psf.upfronthosting.co.za>


Jean Brouwers  added the comment:

The current results are quite "interesting"

>>> math.sum([1e308, 1e308, -1e308])
Traceback (most recent call last):
  File "", line 1, in 
OverflowError: math range error

>>> math.sum([1e308, -1e308, 1e308])
1e+308


Handling this case would require holding the finite, prior sum at an 
intermediate overflow in a separate array, say overflows.  Then, add the 
partials which may create additional overflows.  Finally, keep adding 
the overflows (accurately?) until none remain or until none can be added 
without overflow.

/Jean Brouwers

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 21:44:36 2008
From: report at bugs.python.org (Craig Holmquist)
Date: Mon, 12 May 2008 19:44:36 +0000
Subject: [issue2840] Expat parser locks XML source file if ContentHandler
	raises an exception
In-Reply-To: <1210621474.39.0.327877522239.issue2840@psf.upfronthosting.co.za>
Message-ID: <1210621474.39.0.327877522239.issue2840@psf.upfronthosting.co.za>


New submission from Craig Holmquist :

This was observed in Python 2.5.2 on Windows XP.  Run this code in IDLE:

import xml.sax
from xml.sax.handler import ContentHandler
class C(ContentHandler):
	def startElement(self, name, attrs):
		assert False

xml.sax.parse(xml_path, C())

Where "xml_path" points to a well-formed XML file.  This will raise an
AssertionError.  Then, attempt to modify or delete the XML file that was
specified; it's still locked by the Python process.

Deleting the ContentHandler does not unlock it.  There doesn't seem any
way to unlock it aside from terminating the Python process.

If the ContentHandler doesn't raise an exception or error, the file is
unlocked properly.

----------
components: XML
messages: 66754
nosy: craigneuro
severity: normal
status: open
title: Expat parser locks XML source file if ContentHandler raises an exception
type: behavior
versions: Python 2.5

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 21:45:03 2008
From: report at bugs.python.org (Jean Brouwers)
Date: Mon, 12 May 2008 19:45:03 +0000
Subject: [issue2819] Full precision summation
In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za>
Message-ID: <1210621503.21.0.690706840187.issue2819@psf.upfronthosting.co.za>


Jean Brouwers  added the comment:

There may be another reason to use a single summation function.  The 
summation functions does need (a copy of) the is_error() function from 
the math module.

The cmath module has a similar function called math_error() which 
slightly different from is_error().

It would be better, more consistent if both modules used the same 
function, say is_error() moved** to file Object/floatobject.c

Then, the math and cmath module can use ist_error() instead of each 
their own.  Also, the summation function can use it and function 
float_pow() in floatobject.c could.

/Jean Brouwers

**) and renamed to e.g. float_error().

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 22:44:09 2008
From: report at bugs.python.org (Guilherme Polo)
Date: Mon, 12 May 2008 20:44:09 +0000
Subject: [issue2839] Moving lib-tk to tkinter package
In-Reply-To: <1210615239.35.0.359819643531.issue2839@psf.upfronthosting.co.za>
Message-ID: <1210625048.93.0.483717701216.issue2839@psf.upfronthosting.co.za>


Guilherme Polo  added the comment:

I've talked with Brett and we agreed on a plan slightly different from
the one described in PEP 3108, which seems to be better for tkinter.

The first step would be creating a tkinter package and then moving each
file in lib-tk to this new directory, correcting imports and the case
and renaming Tkinter.py to __init__.py so the directory is marked as a
package.

After this step I can proceed with more patches, including stub modules,
tests in test_py3kwarn and continue with the rest of the plan.

I'm attaching two files I've used to do this first step. One is a .py
file, which will do the proper renamings and then there is a patch which
should be applied to fix imports inside the tkinter package.

Added file: http://bugs.python.org/file10309/tkinter_package.py

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 22:44:42 2008
From: report at bugs.python.org (Guilherme Polo)
Date: Mon, 12 May 2008 20:44:42 +0000
Subject: [issue2839] Moving lib-tk to tkinter package
In-Reply-To: <1210615239.35.0.359819643531.issue2839@psf.upfronthosting.co.za>
Message-ID: <1210625082.81.0.192869240998.issue2839@psf.upfronthosting.co.za>


Changes by Guilherme Polo :


----------
keywords: +patch
Added file: http://bugs.python.org/file10310/tkinter_imports.diff

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 22:55:24 2008
From: report at bugs.python.org (Terry J. Reedy)
Date: Mon, 12 May 2008 20:55:24 +0000
Subject: [issue2841] Windows: "Runtime Error!" crash from pythonw.exe (3.0a5)
In-Reply-To: <1210625724.53.0.096647435573.issue2841@psf.upfronthosting.co.za>
Message-ID: <1210625724.53.0.096647435573.issue2841@psf.upfronthosting.co.za>


New submission from Terry J. Reedy :

Specific instance: I edit a file with IDLE, hit F5, and Windows pops up
a box with a white X in a red circle followed by "Runtime Error!" and an
explanation that the application requested to be closed in an 'unusual'
way.  

Clicking OK on that bring up a similar box. For the current incident,
this has title "t1.py - C:\Program Files\Python30\misc\t1.py:
pythonw.exe - Application Error" and contents "The exception unknown
software exception (0x40000015) occurred in the application at location
0x00d88cef.  Click on OK to terminate the program"

This has happened about three times in the last week since installing
a5. I am not sure if it happened before but it is only occasional (1 in
20 runs?) and I did not use a4 much.  It is possible that this only
happens after sleep or hibernation -- I will watch more carefully.  I
only run pythonw as a side-effect of running IDLE, so I do not know if
that is necessary or not.

As previously, when I reopened IDLE and the the file and ran it
unchanged, I got the appropriate output in the Shell window, as if
nothing were ever amiss.

----------
messages: 66757
nosy: tjreedy
severity: normal
status: open
title: Windows: "Runtime Error!" crash from pythonw.exe (3.0a5)
versions: Python 3.0

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 22:58:38 2008
From: report at bugs.python.org (Terry J. Reedy)
Date: Mon, 12 May 2008 20:58:38 +0000
Subject: [issue2841] Windows: "Runtime Error!" crash from pythonw.exe (3.0a5)
In-Reply-To: <1210625724.53.0.096647435573.issue2841@psf.upfronthosting.co.za>
Message-ID: <1210625918.7.0.145017987641.issue2841@psf.upfronthosting.co.za>


Changes by Terry J. Reedy :


----------
type:  -> crash

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 23:11:54 2008
From: report at bugs.python.org (Chester)
Date: Mon, 12 May 2008 21:11:54 +0000
Subject: [issue2842] Dictionary methods: inconsistency
In-Reply-To: <1210626714.02.0.133296907813.issue2842@psf.upfronthosting.co.za>
Message-ID: <1210626714.02.0.133296907813.issue2842@psf.upfronthosting.co.za>


New submission from Chester :

Names of dictionary methods are not consistent with Python's coding
style. Please fix the following method names:

1) fix    deepcopy    to be  deep_copy
2) fix    fromkeys    to be  from_keys
3) fix    popitem     to be  pop_item
4) fix    setdefault  to be  set_default

Please consider of renaming the method copy to shallow_copy. If you find
any other inconsistently named method, please fix it. Thank you.

----------
messages: 66758
nosy: aaronsw, admin, akuchling, anonymous, barry, chester, doerwalter, effbot, fdrake, gvanrossum, jhylton, lemburg, loewis, memaul, mhammond, moshez, mpmak, mwh, nobody, ping, sjoerd, skip.montanaro, tim_one, tmick, twouters, viznut
severity: normal
status: open
title: Dictionary methods: inconsistency
versions: Python 3.0

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 23:17:34 2008
From: report at bugs.python.org (Fredrik Lundh)
Date: Mon, 12 May 2008 21:17:34 +0000
Subject: [issue2842] Dictionary methods: inconsistency
In-Reply-To: <1210626714.02.0.133296907813.issue2842@psf.upfronthosting.co.za>
Message-ID: <1210627054.47.0.603390479951.issue2842@psf.upfronthosting.co.za>


Fredrik Lundh  added the comment:

Eh?  Why did you add *everyone* involved the project to the nosy list?

(I'll leave explaining why breaking almost all Python programs in the
name of "consistency" is an absurd idea to someone else).

----------
nosy:  -aaronsw, admin, akuchling, anonymous, barry, chester, doerwalter, fdrake, gvanrossum, jhylton, lemburg, loewis, memaul, mhammond, moshez, mpmak, mwh, nobody, ping, sjoerd, skip.montanaro, tim_one, tmick, twouters, viznut

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 23:17:56 2008
From: report at bugs.python.org (Fredrik Lundh)
Date: Mon, 12 May 2008 21:17:56 +0000
Subject: [issue2842] Dictionary methods: inconsistency
In-Reply-To: <1210626714.02.0.133296907813.issue2842@psf.upfronthosting.co.za>
Message-ID: <1210627076.7.0.604883955694.issue2842@psf.upfronthosting.co.za>


Changes by Fredrik Lundh :


----------
nosy:  -effbot

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 23:24:47 2008
From: report at bugs.python.org (Jonathan)
Date: Mon, 12 May 2008 21:24:47 +0000
Subject: [issue2628] ftplib Persistent data connection
In-Reply-To: <1208130611.58.0.0933193390026.issue2628@psf.upfronthosting.co.za>
Message-ID: <1210627487.94.0.777438729655.issue2628@psf.upfronthosting.co.za>


Changes by Jonathan :


Added file: http://bugs.python.org/file10311/ftplib.py.blockmode.patch.2

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 23:25:13 2008
From: report at bugs.python.org (Jonathan)
Date: Mon, 12 May 2008 21:25:13 +0000
Subject: [issue2628] ftplib Persistent data connection
In-Reply-To: <1208130611.58.0.0933193390026.issue2628@psf.upfronthosting.co.za>
Message-ID: <1210627513.7.0.7114091187.issue2628@psf.upfronthosting.co.za>


Changes by Jonathan :


Added file: http://bugs.python.org/file10312/ftplib.rst.blockmode.patch

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 23:25:20 2008
From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=)
Date: Mon, 12 May 2008 21:25:20 +0000
Subject: [issue2842] Dictionary methods: inconsistency
In-Reply-To: <1210626714.02.0.133296907813.issue2842@psf.upfronthosting.co.za>
Message-ID: <1210627520.8.0.178389187753.issue2842@psf.upfronthosting.co.za>


Martin v. L?wis  added the comment:

Rejecting as "invalid". If you somehow still think something should
change, please discuss that on the py3k list.

----------
nosy: +chester, loewis
resolution:  -> invalid
status: open -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 23:32:36 2008
From: report at bugs.python.org (Guido van Rossum)
Date: Mon, 12 May 2008 21:32:36 +0000
Subject: [issue2842] Dictionary methods: inconsistency
In-Reply-To: <1210626714.02.0.133296907813.issue2842@psf.upfronthosting.co.za>
Message-ID: <1210627956.91.0.860454454829.issue2842@psf.upfronthosting.co.za>


Guido van Rossum  added the comment:

Chester, this is your last warning.  One more submission like this and
we will ban you from submitting new bug reports.  You have to learn how
to use the bug tracker properly if you don't want to be ignored completely.

----------
nosy: +gvanrossum

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Mon May 12 23:47:36 2008
From: report at bugs.python.org (Jonathan)
Date: Mon, 12 May 2008 21:47:36 +0000
Subject: [issue2628] ftplib Persistent data connection
In-Reply-To: <1208130611.58.0.0933193390026.issue2628@psf.upfronthosting.co.za>
Message-ID: <1210628856.33.0.677458467299.issue2628@psf.upfronthosting.co.za>


Jonathan  added the comment:

I've attached two new files. The first swaps the array.array usage for
struct.unpack. The second simply modifies the rst documentation.

I'm not sure how we'd do any tests for FTP without making use of an
actual server. In a quick check of servers, MadGoat (for OpenVMS) was
the only BLOCK-supporting server I found; neither vsftpd nor proftpd
support BLOCK. (I didn't check wuftpd.) Sadly, I've no publicly
accessible servers available to me for others to test against.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 00:29:28 2008
From: report at bugs.python.org (Benjamin Peterson)
Date: Mon, 12 May 2008 22:29:28 +0000
Subject: [issue2820] Remove mac modules
In-Reply-To: <1210530356.32.0.928311104716.issue2820@psf.upfronthosting.co.za>
Message-ID: <1210631367.87.0.192831464312.issue2820@psf.upfronthosting.co.za>


Benjamin Peterson  added the comment:

Done! See r63187 and 63190. It sure was fun merging the Bazaar branch
into Subversion, though. :(

----------
resolution:  -> fixed
status: open -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 01:27:51 2008
From: report at bugs.python.org (Raymond Hettinger)
Date: Mon, 12 May 2008 23:27:51 +0000
Subject: [issue2819] Full precision summation
In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za>
Message-ID: <1210634871.73.0.0371411117322.issue2819@psf.upfronthosting.co.za>


Raymond Hettinger  added the comment:

Rather keep it in mathmodule.c, not floatobject.c.
We should keep extension code out of the core types.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 01:31:53 2008
From: report at bugs.python.org (anatoly techtonik)
Date: Mon, 12 May 2008 23:31:53 +0000
Subject: [issue2837] OpenID wannabe
In-Reply-To: <1210606658.94.0.916012162383.issue2837@psf.upfronthosting.co.za>
Message-ID: <1210635113.2.0.454739582415.issue2837@psf.upfronthosting.co.za>


anatoly techtonik  added the comment:

What kind of registered users are available? I thought this site uses
single sign on system.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 02:11:08 2008
From: report at bugs.python.org (Brett Cannon)
Date: Tue, 13 May 2008 00:11:08 +0000
Subject: [issue2820] Remove mac modules
In-Reply-To: <1210530356.32.0.928311104716.issue2820@psf.upfronthosting.co.za>
Message-ID: <1210637467.2.0.45233460433.issue2820@psf.upfronthosting.co.za>


Brett Cannon  added the comment:

First, thanks for doing this, Benjamin!

Second, can the plat-darwin directory go as well?

Third, can you get rid of the --disable--toolbox-glue flag for 
configure.in (and any other relevant removals) and Makefile.pre.in 
cleanup?  If you don't have time just let me know.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 05:05:16 2008
From: report at bugs.python.org (=?utf-8?q?Mart=C3=ADn_Conte_Mac_Donell?=)
Date: Tue, 13 May 2008 03:05:16 +0000
Subject: [issue1767370] Make xmlrpc use HTTP/1.1 and keepalive
Message-ID: <1210647916.37.0.590624263328.issue1767370@psf.upfronthosting.co.za>


Mart?n Conte Mac Donell  added the comment:

I made this patch works against trunk, also i'v fixed some typos.

----------
nosy: +Reflejo
versions: +Python 2.5
Added file: http://bugs.python.org/file10313/xmlrpc-keepalive.diff

_____________________________________
Tracker 

_____________________________________

From report at bugs.python.org  Tue May 13 05:16:02 2008
From: report at bugs.python.org (Guilherme Polo)
Date: Tue, 13 May 2008 03:16:02 +0000
Subject: [issue2843] New methods for existing Tkinter widgets
In-Reply-To: <1210648562.38.0.607141778412.issue2843@psf.upfronthosting.co.za>
Message-ID: <1210648562.38.0.607141778412.issue2843@psf.upfronthosting.co.za>


New submission from Guilherme Polo :

Attached patch adds the following new methods:

Misc: grid_anchor
Menu: xposition
Text: count, peer_create, peer_names, replace
Wm: wm_iconphoto, wm_manage, wm_forget

These are supported by Tk 8.5 and newer.

----------
components: Tkinter
files: tk8.5_newmeths.py
messages: 66768
nosy: gpolo
severity: normal
status: open
title: New methods for existing Tkinter widgets
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file10314/tk8.5_newmeths.py

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 07:28:09 2008
From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=)
Date: Tue, 13 May 2008 05:28:09 +0000
Subject: [issue2837] OpenID wannabe
In-Reply-To: <1210606658.94.0.916012162383.issue2837@psf.upfronthosting.co.za>
Message-ID: <1210656488.77.0.340168638414.issue2837@psf.upfronthosting.co.za>


Martin v. L?wis  added the comment:

I don't understand your question. What is "this site" that you are
referring to, and why do you think it uses a single sign-on system?

----------
status: pending -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 07:34:26 2008
From: report at bugs.python.org (Terry J. Reedy)
Date: Tue, 13 May 2008 05:34:26 +0000
Subject: [issue2841] Windows: "Runtime Error!" crash from pythonw.exe (3.0a5)
In-Reply-To: <1210625724.53.0.096647435573.issue2841@psf.upfronthosting.co.za>
Message-ID: <1210656866.23.0.29131788439.issue2841@psf.upfronthosting.co.za>


Terry J. Reedy  added the comment:

Hibernation, sleep, or screen saver is not required though process may
have been swapped to disk.  Exception and location are reproducible. 
This time I get IDLE Subprocess Startup Error on retry.  Will reboot.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 07:37:21 2008
From: report at bugs.python.org (Skip Montanaro)
Date: Tue, 13 May 2008 05:37:21 +0000
Subject: [issue1767370] Make xmlrpc use HTTP/1.1 and keepalive
Message-ID: <1210657041.2.0.868563525875.issue1767370@psf.upfronthosting.co.za>


Skip Montanaro  added the comment:

I'm not going to pretend I understand the changes.  I do notice
that test_docxmlrpc hangs hard on my Mac (doesn't even respond to
Ctl-C).  DocXMLRPCServer subclasses from SimpleXMLRPCServer, so I
suspect it needs some attention.  I tried the obvious replacement
of self.wfile.* with the analogs from SimpleXMLRPCServer but that
didn't help.  Also, the API for the xmlrpclib.Transport class's
send_request method changed and parse_response disappeared completely
even though the docstring for the Transport class explicitly mentions
subclassing it.

_____________________________________
Tracker 

_____________________________________

From report at bugs.python.org  Tue May 13 08:31:17 2008
From: report at bugs.python.org (Adam Olsen)
Date: Tue, 13 May 2008 06:31:17 +0000
Subject: [issue2778] set_swap_bodies is unsafe
In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za>
Message-ID: <1210660276.98.0.769847211696.issue2778@psf.upfronthosting.co.za>


Adam Olsen  added the comment:

Here's another approach to avoiding set_swap_bodies.  The existing
semantics are retained.  Rather than creating a temporary frozenset and
swapping the contents, I check for a set and call the internal hash
function directly (bypassing PyObject_Hash).

I even retain the current semantics of PySet_Discard and PySet_Contains,
which do NOT do the implicit conversion (and have unit tests to verify
that!)

I do have some concern that calling PySet_Check on every call may be too
slow.  It may be better to only call it on failure (which is
more-or-less what the old code did.)

set_swap_bodies has only one remaining caller, and their use case could
probably be significantly simplified.

Added file: http://bugs.python.org/file10315/python-setswap-2.diff

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 08:51:57 2008
From: report at bugs.python.org (Terry J. Reedy)
Date: Tue, 13 May 2008 06:51:57 +0000
Subject: [issue2841] Windows: "Runtime Error!" crash from pythonw.exe (3.0a5)
In-Reply-To: <1210625724.53.0.096647435573.issue2841@psf.upfronthosting.co.za>
Message-ID: <1210661517.23.0.300860253004.issue2841@psf.upfronthosting.co.za>


Terry J. Reedy  added the comment:

AFter reboot, IDLE started, loaded the program I tried to run
previously, and ran it several times.  I closed the edit window and when
I closed the shell window, got same message.  The first box is titled
Microsoft Visual C++ Runtime Library.  After listing ...pythonw.exe, it says

"This program has asked the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information."

This time there is no second red-circle-X box but a Send Error Report to
Microsoft box.  That leads to Error Signature
AppName: pythonw.exe	 AppVer: 0.0.0.0	 ModName: tcl84.dll
ModVer: 8.4.2.16	 Offset: 00058cef

More testing: If I open the shell and do stuff interactively and close,
it closes ok as far as I have tested.  If I open the shell and an edit
window and close both, either order, even without running anything, then
it crashes on the second close.  I tried more than one file with the
same result.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 10:20:19 2008
From: report at bugs.python.org (Amaury Forgeot d'Arc)
Date: Tue, 13 May 2008 08:20:19 +0000
Subject: [issue2841] Windows: "Runtime Error!" crash from pythonw.exe (3.0a5)
In-Reply-To: <1210625724.53.0.096647435573.issue2841@psf.upfronthosting.co.za>
Message-ID: <1210666806.77.0.787480244758.issue2841@psf.upfronthosting.co.za>


Amaury Forgeot d'Arc  added the comment:

The 0x40000015 code and the message you get are typical of a call to
abort().

Ideed, I can reproduce the problem on windows 2000:
- start IDLE
- menu "File / New Window"
- close both windows

When running with python_d.exe, I see the message:
    Tk_Get3DBorderFromObj called with non-existent border!
which appears in a call to a panic() function in 
    tk8.4.16/generic/tk3d.c

----------
nosy: +amaury.forgeotdarc

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 10:32:54 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 08:32:54 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210667574.44.0.520922825114.issue2775@psf.upfronthosting.co.za>


Changes by Georg Brandl :


----------
dependencies: +rename test_support to support

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 10:33:57 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 08:33:57 +0000
Subject: [issue2646] Python does not accept unicode keywords
In-Reply-To: <1208382006.33.0.385183415053.issue2646@psf.upfronthosting.co.za>
Message-ID: <1210667637.46.0.337641016563.issue2646@psf.upfronthosting.co.za>


Changes by Georg Brandl :


----------
keywords: +26backport -patch
priority:  -> normal

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 10:37:23 2008
From: report at bugs.python.org (Antoine Pitrou)
Date: Tue, 13 May 2008 08:37:23 +0000
Subject: [issue2833] __exit__ silences the active exception
In-Reply-To: <1210576013.94.0.462684443177.issue2833@psf.upfronthosting.co.za>
Message-ID: <1210667843.95.0.63765357672.issue2833@psf.upfronthosting.co.za>


Changes by Antoine Pitrou :


----------
nosy: +pitrou

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 10:38:44 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 08:38:44 +0000
Subject: [issue2548] Undetected error in exception handling
In-Reply-To: <1207297002.01.0.980429495002.issue2548@psf.upfronthosting.co.za>
Message-ID: <1210667924.09.0.197209675545.issue2548@psf.upfronthosting.co.za>


Changes by Georg Brandl :


----------
priority: critical -> release blocker

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 10:39:00 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 08:39:00 +0000
Subject: [issue2542] PyErr_ExceptionMatches must not fail
In-Reply-To: <1207213140.65.0.87653801468.issue2542@psf.upfronthosting.co.za>
Message-ID: <1210667940.43.0.476888857726.issue2542@psf.upfronthosting.co.za>


Changes by Georg Brandl :


----------
priority:  -> release blocker

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 11:10:26 2008
From: report at bugs.python.org (Amaury Forgeot d'Arc)
Date: Tue, 13 May 2008 09:10:26 +0000
Subject: [issue2833] __exit__ silences the active exception
In-Reply-To: <1210576013.94.0.462684443177.issue2833@psf.upfronthosting.co.za>
Message-ID: <1210669825.84.0.254949978949.issue2833@psf.upfronthosting.co.za>


Amaury Forgeot d'Arc  added the comment:

Note that the problem is not related to "with", but with nested
exception handlers:

try:
    raise Exception("foo")
except:
    try: pass
    except: pass
    raise # in Py2.5 throws 'foo', in Py3.0 fails with RuntimeError


OTOH, python has always had poor support for nested exceptions; tried
with python24 and python25::

   try:
        raise Exception("foo")
   except:
      try: raise KeyError("caught")
      except KeyError: pass
      raise # reraise the KeyError...

This does not happen if the two lines with KeyError are moved in another
function.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 11:50:06 2008
From: report at bugs.python.org (Nick Coghlan)
Date: Tue, 13 May 2008 09:50:06 +0000
Subject: [issue2831] Adding start to enumerate()
In-Reply-To: <1210564174.93.0.918851730075.issue2831@psf.upfronthosting.co.za>
Message-ID: <1210672206.04.0.902040783221.issue2831@psf.upfronthosting.co.za>


Nick Coghlan  added the comment:

Note that this functionality is currently available as follows:

>>> from itertools import count
>>> list(zip(count(3), 'abcdefg')
[(3, 'a'), (4, 'b'), (5, 'c'), (6, 'd'), (7, 'e'), (8, 'f'), (9, 'g')]

The enumerate(itr) builtin is just a convenience to avoid a module
import for the most basic zip(count(), itr) version.

The proposed patch would enable the example above to be written more
verbosely as:

>>> list(enumerate('abcdefg', start=3))

Or, with the positional argument approach as:

>>> list(enumerate(3, 'abcdefg'))


So, more verbose than the existing approach, and ambiguous to boot - as
Raymond noted, with the first it really isn't clear whether the first
value returned would be (3, 'd') or (3, 'a'), and with the second form
it isn't clear whether we're skipping the first three items, or
returning only those items.

Let's keep the builtins simple, and let itertools handle the variants -
that's why the module exists.

----------
nosy: +ncoghlan

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 12:03:56 2008
From: report at bugs.python.org (Jakub Wilk)
Date: Tue, 13 May 2008 10:03:56 +0000
Subject: [issue2844] int() lies about base parameter
In-Reply-To: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za>
Message-ID: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za>


New submission from Jakub Wilk :

>>> int('42', 42)
Traceback (most recent call last):
  File "", line 1, in 
ValueError: int() base must be >= 2 and <= 36

>>> int('42', -909)
42

----------
components: Library (Lib)
messages: 66777
nosy: jwilk
severity: normal
status: open
title: int() lies about base parameter
type: behavior
versions: Python 2.4, Python 2.5

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 12:06:41 2008
From: report at bugs.python.org (Nick Coghlan)
Date: Tue, 13 May 2008 10:06:41 +0000
Subject: [issue2831] Adding start to enumerate()
In-Reply-To: <1210564174.93.0.918851730075.issue2831@psf.upfronthosting.co.za>
Message-ID: <1210673200.84.0.388469314167.issue2831@psf.upfronthosting.co.za>


Nick Coghlan  added the comment:

Mentioning the zip(count(start), itr) version in the enumerate() docs
may be a good idea though.

(And of course, in 2.x, it should be izip() rather than zip() to
preserve the memory efficiency of enumerate())

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 13:27:59 2008
From: report at bugs.python.org (Simon Cross)
Date: Tue, 13 May 2008 11:27:59 +0000
Subject: [issue2844] int() lies about base parameter
In-Reply-To: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za>
Message-ID: <1210678077.79.0.472398354855.issue2844@psf.upfronthosting.co.za>


Simon Cross  added the comment:

Some quick digging in the code on trunk has revealed that by the time
the base reaches PyInt_FromString in intobject.c, -909 has become 10.
Surrounding numbers seem to come through fine.

----------
nosy: +hodgestar

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 13:33:48 2008
From: report at bugs.python.org (Simon Cross)
Date: Tue, 13 May 2008 11:33:48 +0000
Subject: [issue2844] int() lies about base parameter
In-Reply-To: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za>
Message-ID: <1210678428.06.0.971343074029.issue2844@psf.upfronthosting.co.za>


Simon Cross  added the comment:

In int_new in intobject.c the base -909 is used to indicate that no base
has been passed through (presumably because NULL / 0 is a more common
pitfall that -909). Thus -909 is equivalent to base 10.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 14:42:30 2008
From: report at bugs.python.org (Martin McNickle)
Date: Tue, 13 May 2008 12:42:30 +0000
Subject: [issue2824] zipfile to handle duplicate files in archive
In-Reply-To: <1210537070.35.0.0613996133193.issue2824@psf.upfronthosting.co.za>
Message-ID: <1210682550.65.0.193969882479.issue2824@psf.upfronthosting.co.za>


Martin McNickle  added the comment:

The mechanism for throwing an error has been written, however for the
case of a duplicated filename, it appears to have been deliberatly not
been used by the original author.:

 def _writecheck(self, zinfo):
        """Check for errors before writing a file to the archive."""
        if zinfo.filename in self.NameToInfo:
            if self.debug:      # Warning for duplicate names
                print "Duplicate name:", zinfo.filename
        if self.mode not in ("w", "a"):
            raise RuntimeError, 'write() requires mode "w" or "a"'
        ...

Putting a 'replace=True' switch seems a little clumsy, it would be much
better to raise an error, or allow the user a way to globally control
what happens in this case, i.e. overwrite the existing file or drop it.
 Adding a global behaviour switch seems to be the best way to preserve
backwards compatibility.

What do people think is the best way?

-- Martin

----------
nosy: +BitTorment

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 16:07:43 2008
From: report at bugs.python.org (Kurt B. Kaiser)
Date: Tue, 13 May 2008 14:07:43 +0000
Subject: [issue2755] IDLE ignores module change before restart
In-Reply-To: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za>
Message-ID: <1210687654.96.0.931680899919.issue2755@psf.upfronthosting.co.za>


Kurt B. Kaiser  added the comment:

Thanks.  Another question: when the shell starts, do you
see the text

  ==== No Subprocess ====

to the right of the IDLE version, e.g.

IDLE 2.6a3      ==== No Subprocess ====

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 16:26:38 2008
From: report at bugs.python.org (Guido van Rossum)
Date: Tue, 13 May 2008 14:26:38 +0000
Subject: [issue2831] Adding start to enumerate()
In-Reply-To: <1210564174.93.0.918851730075.issue2831@psf.upfronthosting.co.za>
Message-ID: <1210688796.92.0.949122606626.issue2831@psf.upfronthosting.co.za>


Guido van Rossum  added the comment:

> Thanks. I think this part is the main reason I see a start argument to
> enumerate as potentially problematic:
>
> """all variants can easily be misread as starting at the nth item in the
>   sequence (much like islice() does now):   enumerate(3, 'abcdefg') -->
>   (3,'d') (4,'e') (5, 'f') (6, 'g')."""

So the ambiguity is that enumerate(it, start=N) could be taken as
skipping the first N items of it rather than adding N to the index it
returns. (And it is my own argument!) I'd like to withdraw this
argument. There are two separate use cases for using enumerate(): one is
to iterate over a sequence and to have a handy index by which to update
the value in the sequence. Another is for 1-based counting, usually when
printing 1-based ordinals (such as line numbers in files, dates in a
month or months in a year, etc.). N-based counting is less common but
still conceivable. However I see no use for skipping items from the
start, and if that use case ever came up, passing a slice to enumerate()
would be the appropriate thing to do. In fact, if you passed in a slice,
you might also want to pass a corresponding start value so the indices
produced match those of the original sequence.

So, I am still in favor of adding a new argument to enumerate().

I'm neutral on the need for a keyword (don't think it would hurt, not
sure how much it matters). I'm strongly against making it an optional
*leading* argument like Raymond proposed; that's a style I just don't
want to promote, range() and the curses module notwithstanding.

> Is the need to use zip(count(3), seq) for the offset index case really
such
> a burden given the associated benefits in keeping the builtin function
> really simple and easy to understand?

Yes, zip(count(3), seq) is too complex for this simple use case. I've
always solved this so far with this less-than-elegant but certainly
simpler idiom (except for users stuck in the tradition of for-loops in
certain older languages :-):

for i, line in enumerat(lines):
  i += 1
  print "%4d. %s" % (i, line)

and variants thereof.

----------
nosy: +gvanrossum

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 17:57:16 2008
From: report at bugs.python.org (Alexander Belopolsky)
Date: Tue, 13 May 2008 15:57:16 +0000
Subject: [issue2844] int() lies about base parameter
In-Reply-To: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za>
Message-ID: <1210694236.27.0.239903450744.issue2844@psf.upfronthosting.co.za>


Alexander Belopolsky  added the comment:

The same issue is present in long_new:

>>> long('42', -909)
42L

I don't see why any magic value is needed, 10 would do the trick.

----------
nosy: +belopolsky

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 18:11:38 2008
From: report at bugs.python.org (Jakub Wilk)
Date: Tue, 13 May 2008 16:11:38 +0000
Subject: [issue2844] int() lies about base parameter
In-Reply-To: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za>
Message-ID: <1210695097.77.0.882507475577.issue2844@psf.upfronthosting.co.za>


Jakub Wilk  added the comment:

10 would *not* do the trick:

>>> int(42)
42

>>> int(42, 10)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: int() can't convert non-string with explicit base

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 18:19:50 2008
From: report at bugs.python.org (Alexander Belopolsky)
Date: Tue, 13 May 2008 16:19:50 +0000
Subject: [issue2844] int() lies about base parameter
In-Reply-To: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za>
Message-ID: <1210695590.24.0.463900897217.issue2844@psf.upfronthosting.co.za>


Changes by Alexander Belopolsky :


----------
keywords: +patch
Added file: http://bugs.python.org/file10316/issue2844.diff

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 18:20:49 2008
From: report at bugs.python.org (Alexander Belopolsky)
Date: Tue, 13 May 2008 16:20:49 +0000
Subject: [issue2844] int() lies about base parameter
In-Reply-To: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za>
Message-ID: <1210695649.19.0.157522082611.issue2844@psf.upfronthosting.co.za>


Changes by Alexander Belopolsky :


----------
versions: +Python 2.6, Python 3.0

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 20:02:48 2008
From: report at bugs.python.org (Luke Kenneth Casson Leighton)
Date: Tue, 13 May 2008 18:02:48 +0000
Subject: [issue708007] TelnetPopen3, TelnetBase, Expect split
Message-ID: <1210701768.27.0.276038447181.issue708007@psf.upfronthosting.co.za>


Luke Kenneth Casson Leighton  added the comment:

finally!  i accidentally found this, when looking for my own work for
yet another project that requires this split.

comments - several

1) the patch was relevant in 2001 at the time of creation; it was
relevant for python 2.0, 2.1, 2.2, 2.3 2.4 2.5 and is still relevant now.

2) out of all of the python projects that i've done, some of which were
really quite large (for one person), over half of them have required
interaction with other programs - complex interaction - that required
the telnetpopen class.

calling out to php, calling out to c programs and using python to
perform parallelisation of simple scripts onto multiple systems (a
simple version of beowulf clustering), calling out to ssh to manage
remote servers - the list goes on.

3) the changes that guido asked me to make, back in 2001, we talked at
cross purposes (and i wasn't up to the task of saying so - sorry guido!).

the changes to split along the expectlib and telnetbase classes have
nothing to do whatsoever with the telnet "protocol".  in fact, the
enhancements that i've made _totally_ isolate the telnet protocol itself
into the "Telnet" derived class, and it can clearly be seen that
absolutely zero changes to the underlying implementation of the telnet
"protocol" are touched.

however, guido was asking me, as part of the acceptance of the changes,
to perform what he believed would be some "simple" bug-fixes to the
actual _inner workings_ of the (original) telnet code, which required
detailed knowledge of the telnet _protocol_ which i simply ... did not
have.  something to do with IAC.

on the basis of this miscommunication, guido's decision (seen in
http://bugs.python.org/issue405228) was to close the issue and reject
the code.

however - there is absolutely nothing "irrelevant" about the
enhancements, and the original reasons for rejection have absolutely
nothing to do with the enhancements.

overall, these enhancements should never have been left to rot - there
was never any real reason to leave them for so long, unused; the
"expect" command - see wikipedia page - has been available since 1995
and the concept is clearly well-understood as being extremely powerful;
many many people in the intervening years since 2001 have written expect
libraries in python - e.g. http://www.noah.org/wiki/Pexpect 

that one library alone - pexpect - would not need to have been written,
if this patch had been accepted at the time it was written.

____________________________________
Tracker 

____________________________________

From report at bugs.python.org  Tue May 13 20:08:25 2008
From: report at bugs.python.org (Alexander Belopolsky)
Date: Tue, 13 May 2008 18:08:25 +0000
Subject: [issue2844] int() lies about base parameter
In-Reply-To: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za>
Message-ID: <1210702105.02.0.567772805518.issue2844@psf.upfronthosting.co.za>


Alexander Belopolsky  added the comment:

> 10 would *not* do the trick:

You are right.  I guess something like issue2844-1.diff will be
necessary.  I am not sure it is worth the trouble, though.  Maybe just
change -909 to -MAX_INT?  Jakub, how did you discover this in the first
place?

Added file: http://bugs.python.org/file10317/issue2844-1.diff

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 20:10:33 2008
From: report at bugs.python.org (Alexander Belopolsky)
Date: Tue, 13 May 2008 18:10:33 +0000
Subject: [issue2844] int() lies about base parameter
In-Reply-To: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za>
Message-ID: <1210702233.88.0.931520352469.issue2844@psf.upfronthosting.co.za>


Changes by Alexander Belopolsky :


Added file: http://bugs.python.org/file10318/issue2844-1.diff

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 20:10:39 2008
From: report at bugs.python.org (Alexander Belopolsky)
Date: Tue, 13 May 2008 18:10:39 +0000
Subject: [issue2844] int() lies about base parameter
In-Reply-To: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za>
Message-ID: <1210702239.78.0.759554397708.issue2844@psf.upfronthosting.co.za>


Changes by Alexander Belopolsky :


Removed file: http://bugs.python.org/file10317/issue2844-1.diff

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 20:12:35 2008
From: report at bugs.python.org (Alexander Belopolsky)
Date: Tue, 13 May 2008 18:12:35 +0000
Subject: [issue2844] int() lies about base parameter
In-Reply-To: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za>
Message-ID: <1210702355.12.0.883285378211.issue2844@psf.upfronthosting.co.za>


Changes by Alexander Belopolsky :


Removed file: http://bugs.python.org/file10318/issue2844-1.diff

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 20:23:06 2008
From: report at bugs.python.org (Alan Kennedy)
Date: Tue, 13 May 2008 18:23:06 +0000
Subject: [issue2550] SO_REUSEADDR doesn't have the same semantics on Windows
	as on Unix
In-Reply-To: <1207324680.68.0.575928167509.issue2550@psf.upfronthosting.co.za>
Message-ID: <1210702986.15.0.073829144571.issue2550@psf.upfronthosting.co.za>


Changes by Alan Kennedy :


----------
nosy: +amak

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 20:23:32 2008
From: report at bugs.python.org (Alexander Belopolsky)
Date: Tue, 13 May 2008 18:23:32 +0000
Subject: [issue2844] int() lies about base parameter
In-Reply-To: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za>
Message-ID: <1210703012.34.0.847013172376.issue2844@psf.upfronthosting.co.za>


Changes by Alexander Belopolsky :


Added file: http://bugs.python.org/file10319/issue2844-1.diff

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 20:30:08 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 18:30:08 +0000
Subject: [issue2844] int() lies about base parameter
In-Reply-To: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za>
Message-ID: <1210703408.17.0.843829290886.issue2844@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

I'm -1 on complicating these simple functions. Raymond?

----------
assignee:  -> rhettinger
nosy: +georg.brandl, rhettinger

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 20:34:12 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 18:34:12 +0000
Subject: [issue2831] Adding start to enumerate()
In-Reply-To: <1210564174.93.0.918851730075.issue2831@psf.upfronthosting.co.za>
Message-ID: <1210703652.43.0.294081342279.issue2831@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

Okay. I'm against making the argument keyword-only -- IMO keyword-only
arguments really should only be used in cases where their existence has
some advantage, like for max().

----------
nosy: +georg.brandl

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 20:35:11 2008
From: report at bugs.python.org (Guido van Rossum)
Date: Tue, 13 May 2008 18:35:11 +0000
Subject: [issue2831] Adding start to enumerate()
In-Reply-To: <1210564174.93.0.918851730075.issue2831@psf.upfronthosting.co.za>
Message-ID: <1210703707.64.0.402649618715.issue2831@psf.upfronthosting.co.za>


Guido van Rossum  added the comment:

Sure, fine.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 20:36:21 2008
From: report at bugs.python.org (Antoine Pitrou)
Date: Tue, 13 May 2008 18:36:21 +0000
Subject: [issue2833] __exit__ silences the active exception
In-Reply-To: <1210576013.94.0.462684443177.issue2833@psf.upfronthosting.co.za>
Message-ID: <1210703781.59.0.970411457984.issue2833@psf.upfronthosting.co.za>


Antoine Pitrou  added the comment:

I've just discovered that the patch in r62847 doesn't clean up the
exception state if the except clause does not mention a local variable,
e.g. "except MyException" instead of "except MyException as e".

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 21:05:45 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 19:05:45 +0000
Subject: [issue2831] Adding start to enumerate()
In-Reply-To: <1210564174.93.0.918851730075.issue2831@psf.upfronthosting.co.za>
Message-ID: <1210705545.03.0.786484670208.issue2831@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

Okay, committed a matching patch in r63208. Thank you all!

----------
resolution:  -> accepted
status: open -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 21:06:17 2008
From: report at bugs.python.org (Antoine Pitrou)
Date: Tue, 13 May 2008 19:06:17 +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: <1210705577.89.0.833403004223.issue2507@psf.upfronthosting.co.za>


Antoine Pitrou  added the comment:

This bug should be reopened, the patch does not fix it when the except
clause does not assign the exception to a local variable (that is,
"except KeyError" rather than "except KeyError as e").
Another can of worms also appeared in #2833...

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 21:18:16 2008
From: report at bugs.python.org (Collin Winter)
Date: Tue, 13 May 2008 19:18:16 +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: <1210706296.64.0.0692710245399.issue2507@psf.upfronthosting.co.za>


Changes by Collin Winter :


----------
assignee: collinwinter -> 
resolution: fixed -> 
status: closed -> open

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 21:22:13 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 19:22:13 +0000
Subject: [issue2833] __exit__ silences the active exception
In-Reply-To: <1210576013.94.0.462684443177.issue2833@psf.upfronthosting.co.za>
Message-ID: <1210706533.56.0.530903286901.issue2833@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

Raising priority.

----------
nosy: +georg.brandl
priority:  -> release blocker

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 21:23:58 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 19:23:58 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210706638.86.0.689298059672.issue2775@psf.upfronthosting.co.za>


Changes by Georg Brandl :


----------
dependencies: +Patch to rename HTMLParser module to lower_case

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 21:24:22 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 19:24:22 +0000
Subject: [issue1005] Patches to rename Queue module to queue
In-Reply-To: <1187907230.61.0.022863019632.issue1005@psf.upfronthosting.co.za>
Message-ID: <1210706662.59.0.027397926369.issue1005@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

Queue has already been renamed in the meantime.

----------
nosy: +georg.brandl
resolution:  -> out of date
status: open -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 21:25:10 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 19:25:10 +0000
Subject: [issue1757062] Pickle fails on BeautifulSoup's navigableString
	instances
Message-ID: <1210706710.77.0.225218015583.issue1757062@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

Closing as "won't fix".

----------
resolution:  -> wont fix
status: open -> closed

_____________________________________
Tracker 

_____________________________________

From report at bugs.python.org  Tue May 13 21:25:35 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 19:25:35 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210706735.32.0.905310525843.issue2775@psf.upfronthosting.co.za>


Changes by Georg Brandl :


----------
dependencies: +Patch to rename *Server modules to lower-case

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 21:27:24 2008
From: report at bugs.python.org (Brett Cannon)
Date: Tue, 13 May 2008 19:27:24 +0000
Subject: [issue1002] Patch to rename HTMLParser module to lower_case
In-Reply-To: <1187900417.52.0.984066469485.issue1002@psf.upfronthosting.co.za>
Message-ID: <1210706844.49.0.429188584572.issue1002@psf.upfronthosting.co.za>


Brett Cannon  added the comment:

Do note that HTMLParse is slated to become html.parser in 3.0, so these 
patches are out-of-date. They can be used, though, to possibly help all 
references to HTMLParser (although 2to3 should handle that).

----------
nosy: +brett.cannon

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 21:27:41 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 19:27:41 +0000
Subject: [issue1467929] %-formatting and dicts
Message-ID: <1210706861.93.0.769065401757.issue1467929@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

This probably won't be important anymore now that we have str.format()...

----------
priority: normal -> low

_____________________________________
Tracker 

_____________________________________

From report at bugs.python.org  Tue May 13 21:32:17 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 19:32:17 +0000
Subject: [issue1025] tracebacks from list comps (probably other comps) don't
	show full stack
In-Reply-To: <1188099440.22.0.56979431714.issue1025@psf.upfronthosting.co.za>
Message-ID: <1210707135.75.0.299801828421.issue1025@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

This seems to be fixed in current SVN.

----------
nosy: +georg.brandl
resolution:  -> out of date
status: open -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 21:34:43 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 19:34:43 +0000
Subject: [issue1762972] 'exec' does not accept what 'open' returns
Message-ID: <1210707283.39.0.729911625239.issue1762972@psf.upfronthosting.co.za>


Changes by Georg Brandl :


----------
assignee: christian.heimes -> gvanrossum

_____________________________________
Tracker 

_____________________________________

From report at bugs.python.org  Tue May 13 21:34:53 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 19:34:53 +0000
Subject: [issue1762972] 'exec' does not accept what 'open' returns
Message-ID: <1210707293.0.0.957641335697.issue1762972@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

This has apparently been fixed now.

----------
nosy: +georg.brandl

_____________________________________
Tracker 

_____________________________________

From report at bugs.python.org  Tue May 13 22:06:41 2008
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Tue, 13 May 2008 20:06:41 +0000
Subject: [issue1467929] %-formatting and dicts
Message-ID: <1210709201.25.0.895085812146.issue1467929@psf.upfronthosting.co.za>


Marc-Andre Lemburg  added the comment:

Sean, why don't you just check in the patch ?

Then we can close the bug.

Georg, the fact that we have an alternative method for string formatting
doesn't mean that it's ok for Python to hide error using the prevailing
method of string formatting.

_____________________________________
Tracker 

_____________________________________

From report at bugs.python.org  Tue May 13 22:43:06 2008
From: report at bugs.python.org (Georg Brandl)
Date: Tue, 13 May 2008 20:43:06 +0000
Subject: [issue1467929] %-formatting and dicts
Message-ID: <1210711385.81.0.0319414209319.issue1467929@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

I didn't want to imply that, but seeing that nobody cared about it for
so long I hadn't much hope for the future... ;)

_____________________________________
Tracker 

_____________________________________

From report at bugs.python.org  Tue May 13 23:28:51 2008
From: report at bugs.python.org (igs)
Date: Tue, 13 May 2008 21:28:51 +0000
Subject: [issue2845] shutil.copy2() copies permission bits
In-Reply-To: <1210714130.89.0.107453943261.issue2845@psf.upfronthosting.co.za>
Message-ID: <1210714130.89.0.107453943261.issue2845@psf.upfronthosting.co.za>


New submission from igs :

At least in Python 2.4 shutil.copy2() not only copies content and 
access times of a files like stated in the documentation but also the 
access bits.

That behaviour I would not expect because in other functions from 
shutil it is explicitly stated if the access bits are copied.

In fact I used
    shutil.copy2(src, dest)
    shutil.copystat(src, dest)
up to now. What does not work if the read-only attribute is set and 
what is completely nonsense after having a look into the implementation.

----------
components: Windows
messages: 66803
nosy: igs
severity: normal
status: open
title: shutil.copy2() copies permission bits
type: behavior
versions: Python 2.4

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 23:32:11 2008
From: report at bugs.python.org (Mark Veldhuis)
Date: Tue, 13 May 2008 21:32:11 +0000
Subject: [issue2755] IDLE ignores module change before restart
In-Reply-To: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za>
Message-ID: <1210714327.87.0.283626177676.issue2755@psf.upfronthosting.co.za>


Mark Veldhuis  added the comment:

thank you too. Yes the text is there, I pasted the whole header here:


Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "copyright", "credits" or "license()" for more information.

    ****************************************************************
    Personal firewall software may warn about the connection IDLE
    makes to its subprocess using this computer's internal loopback
    interface.  This connection is not visible on any external
    interface and no data is sent to or received from the Internet.
    ****************************************************************
    
IDLE 1.2.2      ==== No Subprocess ====
>>>

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Tue May 13 23:50:50 2008
From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=)
Date: Tue, 13 May 2008 21:50:50 +0000
Subject: [issue2844] int() lies about base parameter
In-Reply-To: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za>
Message-ID: <1210715450.53.0.59092765908.issue2844@psf.upfronthosting.co.za>


Martin v. L?wis  added the comment:

I don't see the problem at all. The -909 value is an implementation
artefact, and the submitter probably wouldn't have known it existed
without reading the source code. Perhaps we should change it to
something different every Python release just to denote that it is
deliberately undocumented.

Closing as "won't fix".

----------
nosy: +loewis
resolution:  -> wont fix
status: open -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 00:16:26 2008
From: report at bugs.python.org (Tadek Pietraszek)
Date: Tue, 13 May 2008 22:16:26 +0000
Subject: [issue2846] Gzip cannot handle zero-padded output + patch
In-Reply-To: <1210716983.8.0.306490627236.issue2846@psf.upfronthosting.co.za>
Message-ID: <1210716983.8.0.306490627236.issue2846@psf.upfronthosting.co.za>


New submission from Tadek Pietraszek :

There are cases when gzip produces/receives a zero-padded output, for
example when creating a compressed tar archive with a pipe:

tar cz /dev/null > foo.tgz

ls -la foo.tgz
-rw-r----- 1 tadek tadek 10240 May 13 23:40 foo.tgz

tar tvfz foo.tgz
crw-rw-rw- root/root       1,3 2007-10-18 18:27:25 dev/null


This is a known behavior (http://www.gzip.org/#faq8) and recent versions
of gzip handle it gracefully by skipping all zero bytes after the end of
the file (see gzip.c:1394-1406 in the version 1.3.12).

The Python gzip module crashes on those files:

#:~/python2.5/py2.5$ tar cz /dev/null > foo.tgz
tar: Removing leading `/' from member names
#:~/python2.5/py2.5$ bin/python
Python 2.5.2 (r252:60911, May 14 2008, 00:02:24)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gzip
>>> f=gzip.open("foo.tgz")
>>> f.read()
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/tadek/python2.5/py2.5/lib/python2.5/gzip.py", line 220, in
read
    self._read(readsize)
  File "/home/tadek/python2.5/py2.5/lib/python2.5/gzip.py", line 263, in
_read
    self._read_gzip_header()
  File "/home/tadek/python2.5/py2.5/lib/python2.5/gzip.py", line 164, in
_read_gzip_header
    raise IOError, 'Not a gzipped file'
IOError: Not a gzipped file
>>>

The proposed patch fixes this behavior by reading all zero characters at
the end of the file. I tested that it works with: regular archives,
zero-padded archives, concatenated archives and concatenated zero-padded
archives.

Regards,
Tadek

----------
components: Extension Modules
files: python2.5.2-gzip.patch
keywords: patch
messages: 66806
nosy: tadek
severity: normal
status: open
title: Gzip cannot handle zero-padded output + patch
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file10320/python2.5.2-gzip.patch

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 01:09:14 2008
From: report at bugs.python.org (Andrew Nissen)
Date: Tue, 13 May 2008 23:09:14 +0000
Subject: [issue1187] pipe fd handling issues in subprocess.py on POSIX
In-Reply-To: <1190400129.03.0.21752289973.issue1187@psf.upfronthosting.co.za>
Message-ID: <1210720154.64.0.953496874664.issue1187@psf.upfronthosting.co.za>


Andrew Nissen  added the comment:

In reference to Dustin's entry: That's the point; the expected behavior
is that subprocess should write data to the named files, without the
fix, it doesn't.  With the subprocess module as it stands, there are a
number of cases that will not behave as the user expects.  There were
two issues that were being addressed:

1) If a user passes in a file descriptor that is in the range 0-2, the
dup2 calls end up closing the file being passed in.

2) The other issue is the close code could end up closing file
descriptors it really shouldn't.  For example if p2cread == 1, the code
ends up closing the fd even though it really probably shouldn't.  On a
side note, I should have used a list for dup_fds instead of a dictionary.

It's been a while and I've not spent a huge amount of time getting back
up to speed; if there are any questions let me know and I'll spend some
more time on this.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 01:28:46 2008
From: report at bugs.python.org (Benjamin Peterson)
Date: Tue, 13 May 2008 23:28:46 +0000
Subject: [issue2843] New methods for existing Tkinter widgets
In-Reply-To: <1210648562.38.0.607141778412.issue2843@psf.upfronthosting.co.za>
Message-ID: <1210721326.58.0.603042489289.issue2843@psf.upfronthosting.co.za>


Changes by Benjamin Peterson :


----------
type:  -> feature request

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 02:57:15 2008
From: report at bugs.python.org (Brett Cannon)
Date: Wed, 14 May 2008 00:57:15 +0000
Subject: [issue2847] Remove cl usage from aifc
In-Reply-To: <1210726634.74.0.297516553516.issue2847@psf.upfronthosting.co.za>
Message-ID: <1210726634.74.0.297516553516.issue2847@psf.upfronthosting.co.za>


New submission from Brett Cannon :

The cl module has been removed from Python 3.0, but the aifc module still 
imports it in multiple locations. The module needs to be updated (with 
tests hopefully) so as to not use the cl module.

----------
components: Library (Lib)
messages: 66808
nosy: brett.cannon
priority: critical
severity: normal
status: open
title: Remove cl usage from aifc
versions: Python 3.0

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 02:57:37 2008
From: report at bugs.python.org (Brett Cannon)
Date: Wed, 14 May 2008 00:57:37 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210726657.12.0.0993376357495.issue2775@psf.upfronthosting.co.za>


Changes by Brett Cannon :


----------
dependencies: +Remove cl usage from aifc

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 02:59:35 2008
From: report at bugs.python.org (Brett Cannon)
Date: Wed, 14 May 2008 00:59:35 +0000
Subject: [issue2848] Remove mimetools usage from the stdlib
In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za>
Message-ID: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za>


New submission from Brett Cannon :

The mimetools module has been deprecated for ages, but it is still used in 
multiple places (a quick grep lists ``cgi``, ``httplib``, ``urllib``, 
``urllib2``, ``test_cookielib``, ``test_multifile``, ``test_urllib``, 
``test_urllib2``, ``test_urllib2net``, ``test_urllib_localnet``, 
``test_urllibnet``, ``test_xmlrpc``). All uses need to be removed before 
the module can go from Py3K.

----------
components: Library (Lib)
messages: 66809
nosy: brett.cannon
priority: critical
severity: normal
status: open
title: Remove mimetools usage from the stdlib
type: behavior
versions: Python 2.6, Python 3.0

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 02:59:53 2008
From: report at bugs.python.org (Brett Cannon)
Date: Wed, 14 May 2008 00:59:53 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210726793.46.0.379569636517.issue2775@psf.upfronthosting.co.za>


Changes by Brett Cannon :


----------
dependencies: +Remove mimetools usage from the stdlib

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 03:02:04 2008
From: report at bugs.python.org (Brett Cannon)
Date: Wed, 14 May 2008 01:02:04 +0000
Subject: [issue2849] Remove usage of rfc822 from the stdlib
In-Reply-To: <1210726924.82.0.902490265063.issue2849@psf.upfronthosting.co.za>
Message-ID: <1210726924.82.0.902490265063.issue2849@psf.upfronthosting.co.za>


New submission from Brett Cannon :

The rfc822 module has been deprecated for a while but is still used in the 
stdlib (at least in 'cgi' and 'test_urllib2'). All uses need to go before 
the module can be removed.

----------
components: Library (Lib)
messages: 66810
nosy: brett.cannon
priority: critical
severity: normal
status: open
title: Remove usage of rfc822 from the stdlib
type: behavior
versions: Python 2.6, Python 3.0

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 03:02:16 2008
From: report at bugs.python.org (Brett Cannon)
Date: Wed, 14 May 2008 01:02:16 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210726936.79.0.194282169034.issue2775@psf.upfronthosting.co.za>


Changes by Brett Cannon :


----------
dependencies: +Remove usage of rfc822 from the stdlib

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 04:02:21 2008
From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=)
Date: Wed, 14 May 2008 02:02:21 +0000
Subject: [issue2837] OpenID wannabe
In-Reply-To: <1210606658.94.0.916012162383.issue2837@psf.upfronthosting.co.za>
Message-ID: <1210730541.12.0.0101736745863.issue2837@psf.upfronthosting.co.za>


Changes by Jes?s Cea Avi?n :


----------
nosy: +jcea

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 05:05:42 2008
From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=)
Date: Wed, 14 May 2008 03:05:42 +0000
Subject: [issue2156] TestCase.tmpdir(), TestCase.mock()
In-Reply-To: <1203610296.31.0.753914026052.issue2156@psf.upfronthosting.co.za>
Message-ID: <1210734342.54.0.838252410302.issue2156@psf.upfronthosting.co.za>


Changes by Jes?s Cea Avi?n :


----------
nosy: +jcea

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 11:21:37 2008
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 14 May 2008 09:21:37 +0000
Subject: [issue2833] __exit__ silences the active exception
In-Reply-To: <1210576013.94.0.462684443177.issue2833@psf.upfronthosting.co.za>
Message-ID: <1210756897.71.0.60267819375.issue2833@psf.upfronthosting.co.za>


Antoine Pitrou  added the comment:

As Amaury said, lexically nested exception handlers make re-raising
behaviour buggy. In Py3k, a workaround is to instead write:

   try:
      raise Exception("foo")
   except Exception as :
      try: raise KeyError("caught")
      except KeyError: pass
      raise e

With the slight inconvenience that the "raise e" line will be appended
to the original traceback.

If we want bare "raise" statements to work as expected after a nested
exception handler, we'll need to add proper exception stacking, for
example by adding the exception value as a member of PyTryBlock. The
effect on performance should also be measured.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 11:22:27 2008
From: report at bugs.python.org (Antoine Pitrou)
Date: Wed, 14 May 2008 09:22:27 +0000
Subject: [issue2833] __exit__ silences the active exception
In-Reply-To: <1210576013.94.0.462684443177.issue2833@psf.upfronthosting.co.za>
Message-ID: <1210756947.06.0.250111831945.issue2833@psf.upfronthosting.co.za>


Antoine Pitrou  added the comment:

Small typo in the snippet above, this should obviously read:

   try:
      raise Exception("foo")
   except Exception as e:
      try: raise KeyError("caught")
      except KeyError: pass
      raise e

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 11:39:37 2008
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Wed, 14 May 2008 09:39:37 +0000
Subject: [issue1467929] %-formatting and dicts
Message-ID: <1210757977.04.0.244205042268.issue1467929@psf.upfronthosting.co.za>


Marc-Andre Lemburg  added the comment:

I guess the patch was just forgotten after the 2.5 release was out.

I've added a 2.6 tag and assigned the patch to Sean.

----------
assignee: anthonybaxter -> jafo
versions: +Python 2.6

_____________________________________
Tracker 

_____________________________________

From report at bugs.python.org  Wed May 14 13:02:50 2008
From: report at bugs.python.org (Trent Nelson)
Date: Wed, 14 May 2008 11:02:50 +0000
Subject: [issue2850] Augmenting the Windows build to support code signing.
In-Reply-To: <1210762970.34.0.566906557535.issue2850@psf.upfronthosting.co.za>
Message-ID: <1210762970.34.0.566906557535.issue2850@psf.upfronthosting.co.za>


New submission from Trent Nelson :

Now that we've finally got a VeriSign code-signing certificate 
(hurrah!), we can look at how we want to integrate the aspect of code 
signing into our build process.

I'd like to propose augmenting the build process such that as a post-
link step for .exe|.pyd targets, a little helper Python code signing 
script will be run (i.e. trunk/pcbuild/signfile.py).  The first thing 
that this script will check is whether or not the environment variable 
PYTHON_CODESIGNING_CERT_NAME is defined.  If it is not defined or is 
empty, the script will simply exit.  This will be the case for the vast 
majority of users.

However, if the environment variable exists, it indicates to the 
signfile.py script that the target .exe|.pyd should be signed, using 
the identifier specified by the environment variable, with Microsoft's 
code-signing facilities (signtool.exe etc).

The net effect is that if a user has a valid code-signing certificate 
installed, they can get the standard Python build system to 
automatically sign all binaries by setting this environment variable.  
I think this approach is more useful than, say, having Martin manually 
sign each binary when it comes to release time, as it is automated (and 
as such, less error prone), and can be leveraged by anyone wishing to 
create signed Python distributions, not just the PSF (i.e. ActiveState, 
Enthought, etc).

Assuming there are no objections to this proposal, a couple of other 
things I'll provide:
   a) documentation on both what's required in order to produce a
      signed distribution, as well as guidelines for other companies
      wishing to obtain code-signing certificates for the purposes of
      signing their custom Python distributions (perhaps better suited
      to a wiki entry)
   b) a helper script in pcbuild/ that can a) augment existing .vcprojs
      and add the post-link signing step, and b) be run in such a way
      that it checks all existing .vcprojs for .exe|.pyd targets have
      the post-link event correctly configured

Comments/objections?

    Trent.

----------
assignee: Trent.Nelson
components: Build
messages: 66814
nosy: Trent.Nelson, loewis, tmick
priority: normal
severity: normal
status: open
title: Augmenting the Windows build to support code signing.
type: feature request
versions: Python 2.6, Python 3.0

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 13:59:12 2008
From: report at bugs.python.org (Quentin Gallet-Gilles)
Date: Wed, 14 May 2008 11:59:12 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210766352.04.0.411729792382.issue2775@psf.upfronthosting.co.za>


Quentin Gallet-Gilles  added the comment:

I'm working on renaming the ConfigParser module.

----------
nosy: +quentin.gallet-gilles

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 14:19:30 2008
From: report at bugs.python.org (Jesse Noller)
Date: Wed, 14 May 2008 12:19:30 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210767570.82.0.2995911621.issue2775@psf.upfronthosting.co.za>


Jesse Noller  added the comment:

I've somehow lost my xmlrpc* changes on my local machine - if someone else 
gets to it before me, feel free to work on it.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 14:40:51 2008
From: report at bugs.python.org (Mark Summerfield)
Date: Wed, 14 May 2008 12:40:51 +0000
Subject: [issue2851] Eliminate Perl legacy in re flag names
In-Reply-To: <1210768849.77.0.700773765733.issue2851@psf.upfronthosting.co.za>
Message-ID: <1210768849.77.0.700773765733.issue2851@psf.upfronthosting.co.za>


New submission from Mark Summerfield :

The re module has the following flags (amongst others):

re.X == re.VERBOSE
re.S == re.DOTALL

The short forms of both these flags are clearly taken from Perl, but
they don't seem necessary for Python and are confusing since all the
other short names start with the same letter as the long name, e.g.,
re.I == re.IGNORECASE and re.M == re.MULTILINE.

Why not add re.V for re.VERBOSE and re.D for re.DOTALL and kill re.X and
re.S and say a final farewell to Perl?

----------
components: Library (Lib)
messages: 66817
nosy: mark
severity: normal
status: open
title: Eliminate Perl legacy in re flag names
type: feature request
versions: Python 3.0

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 16:49:09 2008
From: report at bugs.python.org (Alexander Belopolsky)
Date: Wed, 14 May 2008 14:49:09 +0000
Subject: [issue2845] shutil.copy2() copies permission bits
In-Reply-To: <1210714130.89.0.107453943261.issue2845@psf.upfronthosting.co.za>
Message-ID: <1210776546.63.0.0122692897129.issue2845@psf.upfronthosting.co.za>


Alexander Belopolsky  added the comment:

This seems to be a documentation issue.

"""
shutil.copy2(src, dst)
Similar to copy(), but last access time and last modification time are 
copied as well. This is similar to the Unix command cp -p.
""" -- http://docs.python.org/dev/library/shutil.html#shutil.copy2

Does not mention permissions while

"""
$ pydoc shutil.copy2
shutil.copy2 = copy2(src, dst)
    Copy data and all stat info ("cp -p src dst").
"""

implies that the permissions should be copied.

Maybe the documentation should simply recite the implementation: copy2 
is copyfile follwed by copystat.

----------
nosy: +belopolsky

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 16:52:10 2008
From: report at bugs.python.org (Alexander Belopolsky)
Date: Wed, 14 May 2008 14:52:10 +0000
Subject: [issue2845] shutil.copy2() copies permission bits
In-Reply-To: <1210714130.89.0.107453943261.issue2845@psf.upfronthosting.co.za>
Message-ID: <1210776729.89.0.411920957136.issue2845@psf.upfronthosting.co.za>


Changes by Alexander Belopolsky :


----------
assignee:  -> georg.brandl
components: +Documentation -Windows
nosy: +georg.brandl
type: behavior -> feature request
versions: +Python 2.5, Python 2.6, Python 3.0

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 17:09:15 2008
From: report at bugs.python.org (Guido van Rossum)
Date: Wed, 14 May 2008 15:09:15 +0000
Subject: [issue2851] Eliminate Perl legacy in re flag names
In-Reply-To: <1210768849.77.0.700773765733.issue2851@psf.upfronthosting.co.za>
Message-ID: <1210777753.74.0.612592042635.issue2851@psf.upfronthosting.co.za>


Guido van Rossum  added the comment:

Please keep them.  They correspond to the (?x) and (?s) syntax that is
supported inside the regex.

Perl compatibility is a feature, not a bug for the re module.

----------
nosy: +gvanrossum
resolution:  -> wont fix
status: open -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 17:19:38 2008
From: report at bugs.python.org (Bill Janssen)
Date: Wed, 14 May 2008 15:19:38 +0000
Subject: [issue2838] Verify callback for SSL
In-Reply-To: <1210615202.55.0.632345790803.issue2838@psf.upfronthosting.co.za>
Message-ID: <1210778377.81.0.321493798739.issue2838@psf.upfronthosting.co.za>


Bill Janssen  added the comment:

On the client side, are you passing a ca_certs file with the self-signed
certificate in it?  If not, the library won't be able to validate the
certificate enough to be able to see the data in it.  But if you do
that, you should be able to see the bits of the certificate.  There's no
point to seeing the bits of an unvalidated certificate, because they may
be forged.  So the library doesn't allow you to see the bits of an
unvalidated certificate from the other side of the connection.

----------
assignee:  -> janssen
nosy: +janssen

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 18:10:32 2008
From: report at bugs.python.org (Noah Kantrowitz)
Date: Wed, 14 May 2008 16:10:32 +0000
Subject: [issue2852] sidebar directive fails
In-Reply-To: <1210781431.12.0.00746405494641.issue2852@psf.upfronthosting.co.za>
Message-ID: <1210781431.12.0.00746405494641.issue2852@psf.upfronthosting.co.za>


New submission from Noah Kantrowitz :

The normal ReST sidebar directive creates a div with the same class as the 
HTML sidebar. This makes it not render its contents correctly. Perhaps the 
default template/CSS should match on div#sphinxsidebar or similar?

----------
assignee: georg.brandl
components: Documentation tools (Sphinx)
messages: 66821
nosy: coderanger, georg.brandl
severity: normal
status: open
title: sidebar directive fails
type: feature request

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 18:42:36 2008
From: report at bugs.python.org (Juracy Filho)
Date: Wed, 14 May 2008 16:42:36 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210783356.5.0.756989440693.issue2775@psf.upfronthosting.co.za>


Juracy Filho  added the comment:

I almost finished the http package patch, but I'm doubt about how I
would do it with Docs.

There are various doc files: basehttpserver.rst, cgihttpserver.rst,
httplib.rst and so on.

Would I join them into one's or only update their information (imports) ?

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 18:47:49 2008
From: report at bugs.python.org (Georg Brandl)
Date: Wed, 14 May 2008 16:47:49 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210783669.35.0.177977065526.issue2775@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

Keep one file per submodule, but rename them to the new names, and
update all references to the old name.

If the new toplevel package (http in this case) contains something,
there must be a new file for it.

----------
nosy: +georg.brandl

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 19:08:10 2008
From: report at bugs.python.org (Adam Olsen)
Date: Wed, 14 May 2008 17:08:10 +0000
Subject: [issue2778] set_swap_bodies is unsafe
In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za>
Message-ID: <1210784890.69.0.549836807406.issue2778@psf.upfronthosting.co.za>


Adam Olsen  added the comment:

Revised again.  sets are only hashed after PyObject_Hash raises a TypeError.

This also fixes a regression in test_subclass_with_custom_hash.  Oddly,
it doesn't show up in trunk, but does when my previous patch is applied
to py3k.

Added file: http://bugs.python.org/file10321/python-setswap-3.diff

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 19:08:13 2008
From: report at bugs.python.org (Michael Lang)
Date: Wed, 14 May 2008 17:08:13 +0000
Subject: [issue2853] *** glibc detected *** python: double free or corruption
In-Reply-To: <1210784892.85.0.853831073509.issue2853@psf.upfronthosting.co.za>
Message-ID: <1210784892.85.0.853831073509.issue2853@psf.upfronthosting.co.za>


New submission from Michael Lang :

Hi,

i am trying to solve some problems we encounter, when locking files on a
NFS Storage using fcntl.
since this is a security related problem i just add some pseudo code
here that was used to create the problem

fh = os.open('filename')
fcntl.lockf(fh, fcntl.LOCK_EX)
fhw = os.fdopen(fh)
fhw....
fcntl.lockf(fh, fcntl.LOCK_UN)
...

when using threads, it's possible to create following problems when
using a Solaris (openSolaris) NFS server:

*** glibc detected *** python: double free or corruption (!prev):
0x000000001bdbfb20 ***
======= Backtrace: =========
/lib64/libc.so.6[0x32b086f4f4]
/lib64/libc.so.6(cfree+0x8c)[0x32b0872b1c]
/lib64/libc.so.6(fclose+0x14b)[0x32b085e75b]
/usr/lib64/libpython2.4.so.1.0[0x32c3e447ce]
/usr/lib64/libpython2.4.so.1.0(PyEval_EvalFrame+0x47c7)[0x32c3e947a7]
/usr/lib64/libpython2.4.so.1.0(PyEval_EvalFrame+0x44a6)[0x32c3e94486]
/usr/lib64/libpython2.4.so.1.0(PyEval_EvalCodeEx+0x925)[0x32c3e95905]
/usr/lib64/libpython2.4.so.1.0[0x32c3e4c263]
/usr/lib64/libpython2.4.so.1.0(PyObject_Call+0x10)[0x32c3e35f90]
/usr/lib64/libpython2.4.so.1.0[0x32c3e3c01f]
/usr/lib64/libpython2.4.so.1.0(PyObject_Call+0x10)[0x32c3e35f90]
/usr/lib64/libpython2.4.so.1.0(PyEval_CallObjectWithKeywords+0x6d)[0x32c3e8f55d]
/usr/lib64/libpython2.4.so.1.0[0x32c3ebb33d]
/lib64/libpthread.so.0[0x32b14062f7]
/lib64/libc.so.6(clone+0x6d)[0x32b08ce85d]
======= Memory map: ========
00400000-00401000 r-xp 00000000 fd:01 845448                           
 /usr/bin/python
00600000-00601000 rw-p 00000000 fd:01 845448                           
 /usr/bin/python
1bd4d000-1bdd0000 rw-p 1bd4d000 00:00 0
40000000-40001000 ---p 40000000 00:00 0
40001000-40a01000 rw-p 40001000 00:00 0
40a01000-40a02000 ---p 40a01000 00:00 0
40a02000-41402000 rw-p 40a02000 00:00 0
41402000-41403000 ---p 41402000 00:00 0
41403000-41e03000 rw-p 41403000 00:00 0
41e03000-41e04000 ---p 41e03000 00:00 0
41e04000-42804000 rw-p 41e04000 00:00 0
42804000-42805000 ---p 42804000 00:00 0
42805000-43205000 rw-p 42805000 00:00 0
43205000-43206000 ---p 43205000 00:00 0
43206000-43c06000 rw-p 43206000 00:00 0
43c06000-43c07000 ---p 43c06000 00:00 0
43c07000-44607000 rw-p 43c07000 00:00 0
44607000-44608000 ---p 44607000 00:00 0
44608000-45008000 rw-p 44608000 00:00 0
45008000-45009000 ---p 45008000 00:00 0
45009000-45a09000 rw-p 45009000 00:00 0
45a09000-45a0a000 ---p 45a09000 00:00 0
45a0a000-4640a000 rw-p 45a0a000 00:00 0
32b0400000-32b041a000 r-xp 00000000 fd:00 127400                       
 /lib64/ld-2.5.so
32b0619000-32b061a000 r--p 00019000 fd:00 127400                       
 /lib64/ld-2.5.so
32b061a000-32b061b000 rw-p 0001a000 fd:00 127400                       
 /lib64/ld-2.5.so
32b0800000-32b0946000 r-xp 00000000 fd:00 127417                       
 /lib64/libc-2.5.so
32b0946000-32b0b46000 ---p 00146000 fd:00 127417                       
 /lib64/libc-2.5.so
32b0b46000-32b0b4a000 r--p 00146000 fd:00 127417                       
 /lib64/libc-2.5.so
32b0b4a000-32b0b4b000 rw-p 0014a000 fd:00 127417                       
 /lib64/libc-2.5.so
32b0b4b000-32b0b50000 rw-p 32b0b4b000 00:00 0
32b0c00000-32b0c82000 r-xp 00000000 fd:00 127423                       
 /lib64/libm-2.5.so
32b0c82000-32b0e81000 ---p 00082000 fd:00 127423                       
 /lib64/libm-2.5.so
32b0e81000-32b0e82000 r--p 00081000 fd:00 127423                       
 /lib64/libm-2.5.so
32b0e82000-32b0e83000 rw-p 00082000 fd:00 127423                       
 /lib64/libm-2.5.so
32b1000000-32b1002000 r-xp 00000000 fd:00 127455                       
 /lib64/libdl-2.5.so
32b1002000-32b1202000 ---p 00002000 fd:00 127455                       
 /lib64/libdl-2.5.so
32b1202000-32b1203000 r--p 00002000 fd:00 127455                       
 /lib64/libdl-2.5.so
32b1203000-32b1204000 rw-p 00003000 fd:00 127455                       
 /lib64/libdl-2.5.so
32b1400000-32b1415000 r-xp 00000000 fd:00 127463                       
 /lib64/libpthread-2.5.so
32b1415000-32b1614000 ---p 00015000 fd:00 127463                       
 /lib64/libpthread-2.5.so
32b1614000-32b1615000 r--p 00014000 fd:00 127463                       
 /lib64/libpthread-2.5.so
32b1615000-32b1616000 rw-p 00015000 fd:00 127463                       
 /lib64/libpthread-2.5.so
32b1616000-32b161a000 rw-p 32b1616000 00:00 0
32b6400000-32b640d000 r-xp 00000000 fd:00 127465                       
 /lib64/libgcc_s-4.1.2-20070626.so.1
32b640d000-32b660d000 ---p 0000d000 fd:00 127465                       
 /lib64/libgcc_s-4.1.2-2Segmentation fault

python imported modules/functions
from threading import Thread
import fcntl
from os import O_APPEND, O_CREAT, O_EXCL, O_LARGEFILE, O_NDELAY, ...
from time import asctime, localtime, sleep
from os import open as oopen
from os import fdopen
import sys

is this a "python" bug ? or am i doing something wrong ... the real code
will be available to troubleshoot the problem on request
regards

>>> import sys
>>> sys.version
'2.4.3 (#1, Mar 14 2007, 19:01:42) \n[GCC 4.1.1 20070105 (Red Hat
4.1.1-52)]'

----------
components: Interpreter Core
messages: 66825
nosy: nuddelaug
severity: normal
status: open
title: *** glibc detected *** python: double free or corruption
type: crash
versions: Python 2.4

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 19:17:43 2008
From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=)
Date: Wed, 14 May 2008 17:17:43 +0000
Subject: [issue2850] Augmenting the Windows build to support code signing.
In-Reply-To: <1210762970.34.0.566906557535.issue2850@psf.upfronthosting.co.za>
Message-ID: <1210785463.22.0.309554954093.issue2850@psf.upfronthosting.co.za>


Martin v. L?wis  added the comment:

Objection. I don't see the point of signing the binaries; signing the
MSI files should be enough.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 21:51:48 2008
From: report at bugs.python.org (Ruben Kerkhof)
Date: Wed, 14 May 2008 19:51:48 +0000
Subject: [issue2838] Verify callback for SSL
In-Reply-To: <1210615202.55.0.632345790803.issue2838@psf.upfronthosting.co.za>
Message-ID: <1210794708.63.0.0984724284658.issue2838@psf.upfronthosting.co.za>


Ruben Kerkhof  added the comment:

Hi Bill,

When I include the server certificate in ca_certs, verification
succeeds, and I can view the peer certificate dict with getpeercert(False)

When I set ca_certs to none and ssl.CERT_NONE, I can still call
getpeercert(True) and call DER_cert_to_PEM_cert to get the same PEM
certificate.

SSL is all new to me, so forgive me if I talk nonsense, but what I'm
trying to do is the following:

I receive a key from Bob which is a digest of his servers certificate.
To make sure I'm really talking to Bob I need to decrypt his servers
signature with his public key and check the resulting digest against my
key. So I have to ignore failures like
X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT and
X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN, but detect things like
X509_V_ERR_CERT_SIGNATURE_FAILURE.

The idea is based on what foolscap is doing with FURLS
(http://foolscap.lothar.com/trac)

Am I making sense?

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 22:09:39 2008
From: report at bugs.python.org (Brett Cannon)
Date: Wed, 14 May 2008 20:09:39 +0000
Subject: [issue2854] Add gestalt back into Python 3.0
In-Reply-To: <1210795778.91.0.672202960486.issue2854@psf.upfronthosting.co.za>
Message-ID: <1210795778.91.0.672202960486.issue2854@psf.upfronthosting.co.za>


New submission from Brett Cannon :

gestalt was removed as part of the stdlib cleanup for Mac code. But it 
turns out that gestalt is one of those modules that is just needed. Either 
the original version needs to be added back in or a ctypes version needs 
to be implemented. Either way, something to get system info needs to be 
added back into the stdlib (and probably go into plat-darwin).

----------
components: Library (Lib)
messages: 66828
nosy: brett.cannon
priority: release blocker
severity: normal
status: open
title: Add gestalt back into Python 3.0
type: behavior
versions: Python 3.0

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 22:09:57 2008
From: report at bugs.python.org (Adam Olsen)
Date: Wed, 14 May 2008 20:09:57 +0000
Subject: [issue2855] lookkey should INCREF/DECREF startkey around
	PyObject_RichCompareBool
In-Reply-To: <1210795797.23.0.868433377408.issue2855@psf.upfronthosting.co.za>
Message-ID: <1210795797.23.0.868433377408.issue2855@psf.upfronthosting.co.za>


New submission from Adam Olsen :

sets are based on dicts' code, so they have the same problem as bug
1517.  Patch attached.

----------
files: python-lookkeycompare.diff
keywords: patch
messages: 66829
nosy: Rhamphoryncus
severity: normal
status: open
title: lookkey should INCREF/DECREF startkey around PyObject_RichCompareBool
Added file: http://bugs.python.org/file10322/python-lookkeycompare.diff

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 22:10:02 2008
From: report at bugs.python.org (Brett Cannon)
Date: Wed, 14 May 2008 20:10:02 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210795802.2.0.660967028486.issue2775@psf.upfronthosting.co.za>


Changes by Brett Cannon :


----------
dependencies: +Add gestalt back into Python 3.0

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 22:14:58 2008
From: report at bugs.python.org (Raymond Hettinger)
Date: Wed, 14 May 2008 20:14:58 +0000
Subject: [issue2855] lookkey should INCREF/DECREF startkey around
	PyObject_RichCompareBool
In-Reply-To: <1210795797.23.0.868433377408.issue2855@psf.upfronthosting.co.za>
Message-ID: <1210796098.02.0.594362237202.issue2855@psf.upfronthosting.co.za>


Raymond Hettinger  added the comment:

FWIW, I periodically update setobject.c based on patches made to 
dictobject.c so there is usually no need to post separate bug reports.

----------
assignee:  -> rhettinger
nosy: +rhettinger

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 22:27:20 2008
From: report at bugs.python.org (Brett Cannon)
Date: Wed, 14 May 2008 20:27:20 +0000
Subject: [issue2854] Add gestalt back into Python 3.0
In-Reply-To: <1210795778.91.0.672202960486.issue2854@psf.upfronthosting.co.za>
Message-ID: <1210796840.52.0.68615521649.issue2854@psf.upfronthosting.co.za>


Brett Cannon  added the comment:

Actually, the plat-darwin comment is not right if the original C version 
is kept since that would just end up in Modules.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 22:37:40 2008
From: report at bugs.python.org (Benjamin Peterson)
Date: Wed, 14 May 2008 20:37:40 +0000
Subject: [issue2854] Add gestalt back into Python 3.0
In-Reply-To: <1210795778.91.0.672202960486.issue2854@psf.upfronthosting.co.za>
Message-ID: <1210797460.37.0.93934969866.issue2854@psf.upfronthosting.co.za>


Benjamin Peterson  added the comment:

Does it have to be public? How about _gestalt?

----------
nosy: +benjamin.peterson

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 22:59:12 2008
From: report at bugs.python.org (Raymond Hettinger)
Date: Wed, 14 May 2008 20:59:12 +0000
Subject: [issue2778] set_swap_bodies is unsafe
In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za>
Message-ID: <1210798752.6.0.89730082059.issue2778@psf.upfronthosting.co.za>


Raymond Hettinger  added the comment:

By replacing temporary immutability with temporary hashability, does 
this approach create the possibility that someone could mutate the key-
set during a search?  Is it possible to get the __eq__ check out-of-
sync with the __hash__ value?

Also, after a quick look at the patch, I'm not too keen on any 
modifications to set_swap_bodies() nor with changing the signature of 
set_contains_key().

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Wed May 14 23:57:36 2008
From: report at bugs.python.org (Bill Janssen)
Date: Wed, 14 May 2008 21:57:36 +0000
Subject: [issue2838] Verify callback for SSL
In-Reply-To: <1210794708.63.0.0984724284658.issue2838@psf.upfronthosting.co.za>
Message-ID: <4b3e516a0805141457o78ed58dare1ff5356a7eca728@mail.gmail.com>


Bill Janssen  added the comment:

Yep, it looks like you're on the right track.  I'll close this bug.

Bill

On Wed, May 14, 2008 at 12:51 PM, Ruben Kerkhof 
wrote:

>
> Ruben Kerkhof  added the comment:
>
> Hi Bill,
>
> When I include the server certificate in ca_certs, verification
> succeeds, and I can view the peer certificate dict with getpeercert(False)
>
> When I set ca_certs to none and ssl.CERT_NONE, I can still call
> getpeercert(True) and call DER_cert_to_PEM_cert to get the same PEM
> certificate.
>
> SSL is all new to me, so forgive me if I talk nonsense, but what I'm
> trying to do is the following:
>
> I receive a key from Bob which is a digest of his servers certificate.
> To make sure I'm really talking to Bob I need to decrypt his servers
> signature with his public key and check the resulting digest against my
> key. So I have to ignore failures like
> X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT and
> X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN, but detect things like
> X509_V_ERR_CERT_SIGNATURE_FAILURE.
>
> The idea is based on what foolscap is doing with FURLS
> (http://foolscap.lothar.com/trac)
>
> Am I making sense?
>
> __________________________________
> Tracker 
> 
> __________________________________
>

Added file: http://bugs.python.org/file10323/unnamed

__________________________________
Tracker 

__________________________________
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: unnamed
URL: 

From report at bugs.python.org  Wed May 14 23:58:55 2008
From: report at bugs.python.org (Bill Janssen)
Date: Wed, 14 May 2008 21:58:55 +0000
Subject: [issue2838] Verify callback for SSL
In-Reply-To: <1210615202.55.0.632345790803.issue2838@psf.upfronthosting.co.za>
Message-ID: <1210802335.38.0.45950784714.issue2838@psf.upfronthosting.co.za>


Changes by Bill Janssen :


----------
resolution:  -> works for me
status: open -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 00:11:53 2008
From: report at bugs.python.org (Adam Olsen)
Date: Wed, 14 May 2008 22:11:53 +0000
Subject: [issue2778] set_swap_bodies is unsafe
In-Reply-To: <1210126771.92.0.606864994525.issue2778@psf.upfronthosting.co.za>
Message-ID: <1210803113.79.0.476970196183.issue2778@psf.upfronthosting.co.za>


Adam Olsen  added the comment:

There is no temporary hashability.  The hash value is calculated, but
never stored in the set's hash field, so it will never become out of
sync.  Modification while __hash__ or __eq__ is running is possible, but
for __eq__ that applies to any mutable type.

set_contains_key only has two callers, one for each value of the
treat_set_key_as_frozen argument, so I could inline it if you'd prefer that?

set_swap_bodies has only one remaining caller, which uses a normal set,
not a frozenset.  Using set_swap_bodies on a frozenset would be visible
except in a few special circumstances (ie it only contains builtin
types), so a sanity check against that seems appropriate.  The old code
reset ->hash to -1 in case one of the arguments was a frozenset -
impossible now, so I sanity check that it's always -1.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 00:42:11 2008
From: report at bugs.python.org (Georg Brandl)
Date: Wed, 14 May 2008 22:42:11 +0000
Subject: [issue2632] performance problem in socket._fileobject.read
In-Reply-To: <1208197816.87.0.564994342754.issue2632@psf.upfronthosting.co.za>
Message-ID: <1210804931.44.0.766199958978.issue2632@psf.upfronthosting.co.za>


Changes by Georg Brandl :


----------
priority: critical -> release blocker

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 01:10:21 2008
From: report at bugs.python.org (Brett Cannon)
Date: Wed, 14 May 2008 23:10:21 +0000
Subject: [issue2854] Add gestalt back into Python 3.0
In-Reply-To: <1210797460.37.0.93934969866.issue2854@psf.upfronthosting.co.za>
Message-ID: 


Brett Cannon  added the comment:

On Wed, May 14, 2008 at 1:37 PM, Benjamin Peterson
 wrote:
>
> Benjamin Peterson  added the comment:
>
> Does it have to be public? How about _gestalt?
>

That's fine by me. If someone really cares enough they can document it
themselves.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 03:01:20 2008
From: report at bugs.python.org (Benjamin Peterson)
Date: Thu, 15 May 2008 01:01:20 +0000
Subject: [issue2854] Add gestalt back into Python 3.0
In-Reply-To: <1210795778.91.0.672202960486.issue2854@psf.upfronthosting.co.za>
Message-ID: <1210813280.3.0.670953493126.issue2854@psf.upfronthosting.co.za>


Benjamin Peterson  added the comment:

I feel kinda bad about removing the module without noting how it was
used in platform.py, so I'll deal with this.

----------
assignee:  -> benjamin.peterson

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 03:02:52 2008
From: report at bugs.python.org (Brett Cannon)
Date: Thu, 15 May 2008 01:02:52 +0000
Subject: [issue2854] Add gestalt back into Python 3.0
In-Reply-To: <1210813280.3.0.670953493126.issue2854@psf.upfronthosting.co.za>
Message-ID: 


Brett Cannon  added the comment:

On Wed, May 14, 2008 at 6:01 PM, Benjamin Peterson
 wrote:
>
> Benjamin Peterson  added the comment:
>
> I feel kinda bad about removing the module without noting how it was
> used in platform.py, so I'll deal with this.
>

While I am not going to stop you dealing with it, you shouldn't feel
bad. It would have been best had a test case in test_platform picked
this up (if you can it would be great to toss a test in).

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 03:16:50 2008
From: report at bugs.python.org (Brodie Rao)
Date: Thu, 15 May 2008 01:16:50 +0000
Subject: [issue2856] os.listdir doc should mention that Unicode decoding can
	fail
In-Reply-To: <1210814208.45.0.272157928062.issue2856@psf.upfronthosting.co.za>
Message-ID: <1210814208.45.0.272157928062.issue2856@psf.upfronthosting.co.za>


New submission from Brodie Rao :

The documentation for os.listdir should mention that there's a 
possibility that it can fail to decode paths to unicode objects and that 
it returns str objects for those paths it couldn't decode.

The documentation should also explain when this might happen, and 
perhaps how to deal with it. The cases that this could happen or how to 
work around it are beyond my knowledge, but #683592 does mention 
something about resetting the locale. I don't know if that comment is 
still relevant, or if it applies to all cases of decoding failure, 
however.

I don't know if this behavior still exists in Python 2.6. If it does, 
the documentation for 2.6 should be amended as well.

----------
assignee: georg.brandl
components: Documentation
messages: 66839
nosy: brodierao, georg.brandl
severity: normal
status: open
title: os.listdir doc should mention that Unicode decoding can fail
type: behavior
versions: Python 2.3, Python 2.4, Python 2.5

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 03:33:48 2008
From: report at bugs.python.org (Juracy Filho)
Date: Thu, 15 May 2008 01:33:48 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210815228.54.0.611177880523.issue2775@psf.upfronthosting.co.za>


Juracy Filho  added the comment:

I've finished a patch for http package, but I've doubts about how to
make a patch.

I've used a svn diff and svn status to make the patch and status file
respectively.

Added file: http://bugs.python.org/file10324/http_package_on_py3k.diff

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 03:36:03 2008
From: report at bugs.python.org (Juracy Filho)
Date: Thu, 15 May 2008 01:36:03 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210815362.35.0.709131579361.issue2775@psf.upfronthosting.co.za>


Juracy Filho  added the comment:

Output for svn status of http package patch.

Added file: http://bugs.python.org/file10325/http_package_on_py3k.status

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 03:54:28 2008
From: report at bugs.python.org (Brett Cannon)
Date: Thu, 15 May 2008 01:54:28 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210815228.54.0.611177880523.issue2775@psf.upfronthosting.co.za>
Message-ID: 


Brett Cannon  added the comment:

On Wed, May 14, 2008 at 6:33 PM, Juracy Filho  wrote:
>
> Juracy Filho  added the comment:
>
> I've finished a patch for http package, but I've doubts about how to
> make a patch.
>
> I've used a svn diff and svn status to make the patch and status file
> respectively.

That should be enough. Thanks, Juracy!

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 05:08:40 2008
From: report at bugs.python.org (paul rubin)
Date: Thu, 15 May 2008 03:08:40 +0000
Subject: [issue2857] add coded for java modified utf-8
In-Reply-To: <1210820919.45.0.733381289954.issue2857@psf.upfronthosting.co.za>
Message-ID: <1210820919.45.0.733381289954.issue2857@psf.upfronthosting.co.za>


New submission from paul rubin :

For object serialization and some other purposes, Java encodes unicode
strings with a modified version of utf-8:

http://en.wikipedia.org/wiki/UTF-8#Java
http://java.sun.com/javase/6/docs/api/java/io/DataInput.html#modified-utf-8

It is used in Lucene index files among other places.

It would be useful if Python had a codec for this, maybe called "UTF-8J"
or something like that.

----------
components: Library (Lib)
messages: 66843
nosy: phr
severity: normal
status: open
title: add coded for java modified utf-8
versions: Python 2.5

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 07:01:04 2008
From: report at bugs.python.org (Raymond Hettinger)
Date: Thu, 15 May 2008 05:01:04 +0000
Subject: [issue2819] Full precision summation
In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za>
Message-ID: <1210827663.85.0.744067990325.issue2819@psf.upfronthosting.co.za>


Raymond Hettinger  added the comment:

When you need full precision, the Kahan approach helps but doesn't make 
guarantees and can sometimes hurt (it makes some assumptions about the 
data).  One use case in is computing stats like a mean where many of 
the larger magnitude entries tend to cancel out but only after clipping 
bits off of the lower magnitude components.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 07:10:11 2008
From: report at bugs.python.org (Gregory P. Smith)
Date: Thu, 15 May 2008 05:10:11 +0000
Subject: [issue2858] bsddb.db.DBEnv.lock_get test_lock.test03_set_timeout
	crashes
In-Reply-To: <1210828209.22.0.850566546074.issue2858@psf.upfronthosting.co.za>
Message-ID: <1210828209.22.0.850566546074.issue2858@psf.upfronthosting.co.za>


New submission from Gregory P. Smith :

I disabled the Lib/bsddb/test/test_lock.py test03_set_timeout test as it
crashes the interpreter when compiled in debug mode with an UNREF test.
 It appears to happen on all platforms according to the buildbots.

This is not a new problem, it exists in 2.5 if a backport the recent
updates to this test.

I did a little bit of debugging and it looks like the UNREF failure
occurs when the call to DBEnv.lock_get is has exited and Python is
freeing the internal callargs tuple passed as arguments to the method.

A pointer in the callargs._ob_prev structure had the 0xdbdbdbdb value
which I believe is a sign of BerkeleyDB overwriting the memory.

Jesus, can you look into this one?

----------
components: Extension Modules
messages: 66845
nosy: gregory.p.smith, jcea
priority: high
severity: normal
status: open
title: bsddb.db.DBEnv.lock_get test_lock.test03_set_timeout crashes
type: crash
versions: Python 2.5, Python 2.6

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 08:12:32 2008
From: report at bugs.python.org (Peter)
Date: Thu, 15 May 2008 06:12:32 +0000
Subject: [issue2859] sphinx and virtualenv
In-Reply-To: <1210831952.05.0.738382267541.issue2859@psf.upfronthosting.co.za>
Message-ID: <1210831952.05.0.738382267541.issue2859@psf.upfronthosting.co.za>


New submission from Peter :

I tried to install sphinx with virtualenv.The error message is showing a
missing file:

...
INFORMATION
  the speedup extension could not be compiled, Jinja will
  fall back to the native python classes.
===============================================================================
error: Setup script exited with error: can't copy
'Jinja.egg-info/native_libs.txt': doesn't exist or not a regular file
[@|] (todo_sphinx)peter at zuse03 ~/_kurse/zope3/todo_sphinx $
./bin/sphinx-quickstart --help
Traceback (most recent call last):
  File "./bin/sphinx-quickstart", line 5, in ?
    from pkg_resources import load_entry_point
  File
"/home/peter/_kurse/zope3/todo_sphinx/lib/python2.4/site-packages/setuptools-0.6c7-py2.4.egg/pkg_resources.py",
line 2561, in ?
    working_set.require(__requires__)
  File
"/home/peter/_kurse/zope3/todo_sphinx/lib/python2.4/site-packages/setuptools-0.6c7-py2.4.egg/pkg_resources.py",
line 626, in require
    needed = self.resolve(parse_requirements(requirements))
  File
"/home/peter/_kurse/zope3/todo_sphinx/lib/python2.4/site-packages/setuptools-0.6c7-py2.4.egg/pkg_resources.py",
line 524, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: Jinja>=1.1

----------
assignee: georg.brandl
components: Documentation tools (Sphinx)
messages: 66846
nosy: georg.brandl, peterK
severity: normal
status: open
title: sphinx and virtualenv
versions: Python 2.4

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 09:45:36 2008
From: report at bugs.python.org (Mark Summerfield)
Date: Thu, 15 May 2008 07:45:36 +0000
Subject: [issue2806] Py30a5: Tk Menu Alt-f behaves differently Linux vs Windows
In-Reply-To: <1210369916.39.0.944355148013.issue2806@psf.upfronthosting.co.za>
Message-ID: <1210837536.09.0.717743690606.issue2806@psf.upfronthosting.co.za>


Mark Summerfield  added the comment:

This bug can be worked around by using the more modern style of menu
creation. If the program that exhibits the bug has its __init__()
replaced as follows it works correctly on both Linux and Windows:

    def __init__(self, parent):
        self.parent = parent
        menu = Menu(self.parent)
        self.parent.config(menu=menu)
        fileMenu = Menu(menu)
        for label, command in (
                ("New...", self.fileNew),
                ("Open...", self.fileOpen),
                ("Quit", self.fileQuit)):
            fileMenu.add_command(label=label, command=command)
        menu.add_cascade(label="File", menu=fileMenu, underline=0)

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 10:08:23 2008
From: report at bugs.python.org (Stefan Behnel)
Date: Thu, 15 May 2008 08:08:23 +0000
Subject: [issue2860] re module fails to handle digits in byte strings
In-Reply-To: <1210838903.44.0.718972367839.issue2860@psf.upfronthosting.co.za>
Message-ID: <1210838903.44.0.718972367839.issue2860@psf.upfronthosting.co.za>


New submission from Stefan Behnel :

The following fails in Py3.0a5:

    >>> import re
    >>> re.search(b'(\d+)', b'-2.80 98\n')

I get a TypeError: "Can't convert 'int' object to str implicitly" in
line 204 of file "sre_parse.py", code being "char = char + c".

----------
components: Library (Lib)
messages: 66848
nosy: scoder
severity: normal
status: open
title: re module fails to handle digits in byte strings
type: behavior
versions: Python 3.0

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 10:47:22 2008
From: report at bugs.python.org (Quentin Gallet-Gilles)
Date: Thu, 15 May 2008 08:47:22 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210841242.02.0.59442423634.issue2775@psf.upfronthosting.co.za>


Quentin Gallet-Gilles  added the comment:

I've found some places where configparser, copyreg, queue and
socketserver haven't been renamed. The attached patch
'renaming_leftovers_2.6.patch' corrects this.

I'm working on renaming markupbase in 2.6 as of now.

Added file: http://bugs.python.org/file10326/renaming_leftovers_2.6.patch

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 11:42:42 2008
From: report at bugs.python.org (Quentin Gallet-Gilles)
Date: Thu, 15 May 2008 09:42:42 +0000
Subject: [issue2861] Patch to rename markupbase to _markupbase
In-Reply-To: <1210844561.67.0.674925614552.issue2861@psf.upfronthosting.co.za>
Message-ID: <1210844561.67.0.674925614552.issue2861@psf.upfronthosting.co.za>


New submission from Quentin Gallet-Gilles :

Before applying the attached patch, the command 'svn move
Lib/markupbase.py Lib/_markupbase.py" must be invoked. 
Little reminder : since the changes are already applied in the 3.0
codebase, the patch should also be blocked from the py3k branch.

I'll also add another patch with the 2to3 import fixer.

----------
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool), Library (Lib)
files: markupbase_renaming_2.6.patch
keywords: patch
messages: 66850
nosy: collinwinter, quentin.gallet-gilles
severity: normal
status: open
title: Patch to rename markupbase to _markupbase
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file10327/markupbase_renaming_2.6.patch

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 11:43:34 2008
From: report at bugs.python.org (Quentin Gallet-Gilles)
Date: Thu, 15 May 2008 09:43:34 +0000
Subject: [issue2861] Patch to rename markupbase to _markupbase
In-Reply-To: <1210844561.67.0.674925614552.issue2861@psf.upfronthosting.co.za>
Message-ID: <1210844614.87.0.909876649996.issue2861@psf.upfronthosting.co.za>


Changes by Quentin Gallet-Gilles :


Added file: http://bugs.python.org/file10328/markupbase_import_fixer.patch

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 11:53:56 2008
From: report at bugs.python.org (Quentin Gallet-Gilles)
Date: Thu, 15 May 2008 09:53:56 +0000
Subject: [issue2861] Patch to rename markupbase to _markupbase
In-Reply-To: <1210844561.67.0.674925614552.issue2861@psf.upfronthosting.co.za>
Message-ID: <1210845236.15.0.230054358259.issue2861@psf.upfronthosting.co.za>


Quentin Gallet-Gilles  added the comment:

Updated patch : I forgot to add a check in test___all__

Added file: http://bugs.python.org/file10329/markupbase_renaming_2.6.patch

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 11:54:15 2008
From: report at bugs.python.org (Quentin Gallet-Gilles)
Date: Thu, 15 May 2008 09:54:15 +0000
Subject: [issue2861] Patch to rename markupbase to _markupbase
In-Reply-To: <1210844561.67.0.674925614552.issue2861@psf.upfronthosting.co.za>
Message-ID: <1210845255.68.0.125100494542.issue2861@psf.upfronthosting.co.za>


Changes by Quentin Gallet-Gilles :


Removed file: http://bugs.python.org/file10327/markupbase_renaming_2.6.patch

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 11:56:09 2008
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 15 May 2008 09:56:09 +0000
Subject: [issue2857] add codec for java modified utf-8
In-Reply-To: <1210820919.45.0.733381289954.issue2857@psf.upfronthosting.co.za>
Message-ID: <1210845369.49.0.964034261238.issue2857@psf.upfronthosting.co.za>


Marc-Andre Lemburg  added the comment:

What would you use such a codec for ?

>From the references you gave, it is only used internally for Java object
serialization, so wouldn't really be of much use in Python.

----------
nosy: +lemburg
title: add coded for java modified utf-8 -> add codec for java modified utf-8

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 12:03:17 2008
From: report at bugs.python.org (Quentin Gallet-Gilles)
Date: Thu, 15 May 2008 10:03:17 +0000
Subject: [issue2861] Patch to rename markupbase to _markupbase
In-Reply-To: <1210844561.67.0.674925614552.issue2861@psf.upfronthosting.co.za>
Message-ID: <1210845795.76.0.844487209229.issue2861@psf.upfronthosting.co.za>


Quentin Gallet-Gilles  added the comment:

Actually, the test___all__ check is an error since _markupbase has no
__all__ attribute. I've restored the first version of the patch.

Added file: http://bugs.python.org/file10330/markupbase_renaming_2.6.patch

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 12:04:13 2008
From: report at bugs.python.org (Quentin Gallet-Gilles)
Date: Thu, 15 May 2008 10:04:13 +0000
Subject: [issue2861] Patch to rename markupbase to _markupbase
In-Reply-To: <1210844561.67.0.674925614552.issue2861@psf.upfronthosting.co.za>
Message-ID: <1210845853.85.0.477238023646.issue2861@psf.upfronthosting.co.za>


Changes by Quentin Gallet-Gilles :


Removed file: http://bugs.python.org/file10329/markupbase_renaming_2.6.patch

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 12:34:48 2008
From: report at bugs.python.org (Mauricio Vieira)
Date: Thu, 15 May 2008 10:34:48 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210847688.61.0.606058866508.issue2775@psf.upfronthosting.co.za>


Changes by Mauricio Vieira :


----------
nosy:  -mbcvieira

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 12:56:38 2008
From: report at bugs.python.org (paul rubin)
Date: Thu, 15 May 2008 10:56:38 +0000
Subject: [issue2857] add codec for java modified utf-8
In-Reply-To: <1210820919.45.0.733381289954.issue2857@psf.upfronthosting.co.za>
Message-ID: <1210848997.48.0.900673532418.issue2857@psf.upfronthosting.co.za>


paul rubin  added the comment:

Some java applications use it externally.  The purpose seems to be to
prevent NUL bytes from appearing inside encoded strings which can
confuse C libraries that expect NUL's to terminate strings.  My
immediate application is parsing lucene indexes:

http://lucene.apache.org/java/docs/fileformats.html#Chars

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 12:59:19 2008
From: report at bugs.python.org (paul rubin)
Date: Thu, 15 May 2008 10:59:19 +0000
Subject: [issue2857] add codec for java modified utf-8
In-Reply-To: <1210820919.45.0.733381289954.issue2857@psf.upfronthosting.co.za>
Message-ID: <1210849159.28.0.568339070481.issue2857@psf.upfronthosting.co.za>


paul rubin  added the comment:

Also, according to wikipedia, tcl also uses that encoding.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 13:30:04 2008
From: report at bugs.python.org (anatoly techtonik)
Date: Thu, 15 May 2008 11:30:04 +0000
Subject: [issue2837] OpenID wannabe
In-Reply-To: <1210606658.94.0.916012162383.issue2837@psf.upfronthosting.co.za>
Message-ID: <1210851003.94.0.596642263515.issue2837@psf.upfronthosting.co.za>


anatoly techtonik  added the comment:

I mean that it is rather common practice for internet projects that
every member of community has one one login that works for all services
this community uses. This is called "single sign-on" or SSO
http://en.wikipedia.org/wiki/Single_sign-on

So far I have only one login that works in bugtracker and I thought that
I can used it for other python.org services as well. My mistake, sorry.
In my previous post I've just asked about how many logins should I have
to use sites that share common design and navigation element you may see
on the left? What are other services except bugtracker that require
registration? I know there is at least wiki should allow login to edit
restricted pages.

My mistake is not a reason to close this bug report. OpenID just should
wait for SSO system to appear, if of course there will be something else
besides this bugtracker to login. Like code review system.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 13:54:37 2008
From: report at bugs.python.org (Marc-Andre Lemburg)
Date: Thu, 15 May 2008 11:54:37 +0000
Subject: [issue2857] add codec for java modified utf-8
In-Reply-To: <1210820919.45.0.733381289954.issue2857@psf.upfronthosting.co.za>
Message-ID: <1210852477.74.0.662611053762.issue2857@psf.upfronthosting.co.za>


Marc-Andre Lemburg  added the comment:

TCL only uses the codec for internal represenation. You might want to
interface to TCL at the C level and use the codec there, but is that
really a good reason to include the codec in the Python stdlib ?

Dito for parsing Lucene indexes.

I think you're better off writing your own codec and registering it with
the Python codec registry at application start-up time.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 15:46:21 2008
From: report at bugs.python.org (Andrew I MacIntyre)
Date: Thu, 15 May 2008 13:46:21 +0000
Subject: [issue2862] cleanup of freelist management
In-Reply-To: <1210859181.3.0.311974356319.issue2862@psf.upfronthosting.co.za>
Message-ID: <1210859181.3.0.311974356319.issue2862@psf.upfronthosting.co.za>


New submission from Andrew I MacIntyre :

In r60567, support for compacting the int & float freelists was added
with a function in the sys module to call the compaction routines.

Since then, other freelist clearing routines have been added to other
types and are called from the collect() function in the gc module.

The attached patch harmonises the in/float freelist compaction with the
other freelist clearing mechanisms.  It does away with the function in
the sys module in favour of running the freelist clearing from gc.collect().

The signatures of the type specific freelist clearing routines have been
brought into line with the other type freelist clearing routines, with
the exception that they return the number of items _not_ free()ed,
rather than the number of items free()ed.  I took this approach to try
and highlight the fact the current int/float freelist implementations
don't use pymalloc and not all items will always be free()ed when the
routine is called.  This return is ignored when called from gc.collect()
in any case.

The patch includes doc updates and test updates to reflect the changes.
 It has been tested on FreeBSD 6.3, surviving a default test run with no
unusual test failures as far as I can tell.  It is not otherwise
rigorously tested.

The patch is against a trunk checkout that seems to be at r63156.

Ideally this patch, or similar modifications, should be applied before
the feature freeze for 2.6, so that freelist management is rationalised
to one way to do it.

----------
assignee: christian.heimes
components: Documentation, Interpreter Core, Tests
files: freelist_mgt_cleanup.patch
keywords: patch, patch
messages: 66858
nosy: aimacintyre, christian.heimes
priority: high
severity: normal
status: open
title: cleanup of freelist management
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file10331/freelist_mgt_cleanup.patch

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 16:25:12 2008
From: report at bugs.python.org (Georg Brandl)
Date: Thu, 15 May 2008 14:25:12 +0000
Subject: [issue2863] Generator __name__ and better repr()
In-Reply-To: <1210861511.93.0.62534649214.issue2863@psf.upfronthosting.co.za>
Message-ID: <1210861511.93.0.62534649214.issue2863@psf.upfronthosting.co.za>


New submission from Georg Brandl :

As discussed on python-ideas:
http://mail.python.org/pipermail/python-ideas/2008-May/001570.html

----------
assignee: gvanrossum
components: Interpreter Core
files: gen-name.diff
keywords: patch, patch
messages: 66859
nosy: georg.brandl, gvanrossum
priority: normal
severity: normal
status: open
title: Generator __name__ and better repr()
type: feature request
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file10332/gen-name.diff

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 16:36:58 2008
From: report at bugs.python.org (svncodereview)
Date: Thu, 15 May 2008 14:36:58 +0000
Subject: [issue2863] Generator __name__ and better repr()
In-Reply-To: <1210861511.93.0.62534649214.issue2863@psf.upfronthosting.co.za>
Message-ID: <0016e64135bc34a1cd044d45d32d@google.com>


svncodereview  added the comment:

Dear report,

New code review comments by GvR have been published.
Please go to http://codereview.appspot.com/1046 to read them.

Message:
Looks good to me.

Details:

Issue Description:
http://bugs.python.org/issue2863

Sincerely,

  Your friendly code review daemon (http://codereview.appspot.com/).

----------
nosy: +svncodereview

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 16:50:13 2008
From: report at bugs.python.org (Thomas Guettler)
Date: Thu, 15 May 2008 14:50:13 +0000
Subject: [issue2864] etree: Add XPath documentation
In-Reply-To: <1210863012.97.0.696135529968.issue2864@psf.upfronthosting.co.za>
Message-ID: <1210863012.97.0.696135529968.issue2864@psf.upfronthosting.co.za>


New submission from Thomas Guettler :

The current documentation of etree [1] does not explain the 
syntax of the supported xpaths.


[1] current documation:
http://docs.python.org/lib/elementtree-elementtree-objects.html

[2] ElementTree supported XPath:
http://effbot.org/zone/element-xpath.htm

It would be very nice to have some simple examples for myetree.find(xpath).

----------
assignee: georg.brandl
components: Documentation
messages: 66863
nosy: georg.brandl, guettli
severity: normal
status: open
title: etree: Add XPath documentation
type: feature request

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 16:39:45 2008
From: report at bugs.python.org (paul rubin)
Date: Thu, 15 May 2008 14:39:45 +0000
Subject: [issue2857] add codec for java modified utf-8
In-Reply-To: <1210820919.45.0.733381289954.issue2857@psf.upfronthosting.co.za>
Message-ID: <1210862385.72.0.789210868978.issue2857@psf.upfronthosting.co.za>


paul rubin  added the comment:

I'm not sure what you mean by "ditto for Lucene indexes".  I wasn't
planning to use C code.  I was hoping to write Python code to parse
those indexes, then found they use this weird encoding, and Python's
codec set is fairly inclusive already, so this codec sounded like a
reasonably useful addition.  It probably shows up other places as well.
 It might even be a reasonable internal representation for Python, which
as I understand it currently can't represent codepoints outside the BMP.
 Also, it is used in Java serialization, which I think of as a somewhat
weird and whacky thing, but it's conceivable that somebody someday might
want to write a Python program that speaks the Java serialization
protocol (I don't have a good sense of whether that's feasible).

Writing an application specific codec with the C API is doable in
principle, but it seems like an awful lot of effort for just one quickie
program.  These indexes are very large and so writing the codec in
Python would probably be painfully slow.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 17:03:19 2008
From: report at bugs.python.org (Petr Splichal)
Date: Thu, 15 May 2008 15:03:19 +0000
Subject: [issue967161] pty.spawn() enhancements
Message-ID: <1210863799.05.0.768407833623.issue967161@psf.upfronthosting.co.za>


Petr Splichal  added the comment:

Is there any plan to modify pty.spawn() so that it reports child's
status? I think this would be really a very useful feature.
Thanx!

----------
nosy: +psss

____________________________________
Tracker 

____________________________________

From report at bugs.python.org  Thu May 15 17:10:00 2008
From: report at bugs.python.org (Georg Brandl)
Date: Thu, 15 May 2008 15:10:00 +0000
Subject: [issue2863] Generator __name__ and better repr()
In-Reply-To: <1210861511.93.0.62534649214.issue2863@psf.upfronthosting.co.za>
Message-ID: <1210864200.16.0.410914424133.issue2863@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

Okay, committed as r63320.

----------
resolution:  -> accepted
status: open -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 17:11:47 2008
From: report at bugs.python.org (Georg Brandl)
Date: Thu, 15 May 2008 15:11:47 +0000
Subject: [issue2857] add codec for java modified utf-8
In-Reply-To: <1210820919.45.0.733381289954.issue2857@psf.upfronthosting.co.za>
Message-ID: <1210864307.48.0.185830577812.issue2857@psf.upfronthosting.co.za>


Georg Brandl  added the comment:

Since we also support oddball codecs like UTF-8-SIG, why not this one too?

Given the importance of UTF-8, it seems a good idea to support common
variations.

----------
nosy: +georg.brandl

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 17:14:14 2008
From: report at bugs.python.org (Stijn van Drongelen)
Date: Thu, 15 May 2008 15:14:14 +0000
Subject: [issue2865] syntax error in fix_imports.py
In-Reply-To: <1210864454.67.0.912563715467.issue2865@psf.upfronthosting.co.za>
Message-ID: <1210864454.67.0.912563715467.issue2865@psf.upfronthosting.co.za>


New submission from Stijn van Drongelen :

In the current revision of 2to3 (63319), somebody forgot a comma at the
end of line 27 of lib2to3/fix_imports.py, resulting in a syntax error.

----------
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool)
files: fix_imports-syntaxerror-63319.patch
keywords: patch
messages: 66867
nosy: Tinctorius, collinwinter
severity: normal
status: open
title: syntax error in fix_imports.py
type: compile error
Added file: http://bugs.python.org/file10333/fix_imports-syntaxerror-63319.patch

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 17:14:30 2008
From: report at bugs.python.org (Kurt B. Kaiser)
Date: Thu, 15 May 2008 15:14:30 +0000
Subject: [issue2755] IDLE ignores module change before restart
In-Reply-To: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za>
Message-ID: <1210864470.28.0.657864262407.issue2755@psf.upfronthosting.co.za>


Kurt B. Kaiser  added the comment:

Sorry for the delay.

OK, we are getting closer.  Please tell me exactly how you start IDLE.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 17:14:34 2008
From: report at bugs.python.org (Stijn van Drongelen)
Date: Thu, 15 May 2008 15:14:34 +0000
Subject: [issue2866] syntax error in fix_imports.py
In-Reply-To: <1210864474.73.0.391554702591.issue2866@psf.upfronthosting.co.za>
Message-ID: <1210864474.73.0.391554702591.issue2866@psf.upfronthosting.co.za>


New submission from Stijn van Drongelen :

In the current revision of 2to3 (63319), somebody forgot a comma at the
end of line 27 of lib2to3/fix_imports.py, resulting in a syntax error.

----------
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool)
files: fix_imports-syntaxerror-63319.patch
keywords: patch
messages: 66869
nosy: Tinctorius, collinwinter
severity: normal
status: open
title: syntax error in fix_imports.py
type: compile error
Added file: http://bugs.python.org/file10334/fix_imports-syntaxerror-63319.patch

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 18:54:18 2008
From: report at bugs.python.org (Guilherme Polo)
Date: Thu, 15 May 2008 16:54:18 +0000
Subject: [issue429031] Text widget, bindtags and Tabs
Message-ID: <1210870454.68.0.197000986163.issue429031@psf.upfronthosting.co.za>


Guilherme Polo  added the comment:

The "tab" key is bound globally to move the focus to the next widget,
but that is not what you would want for a text widget. So, text widgets
breaks the natural flow of tab key events to achieve this, and, when you
specify bindings like that (in your "not ok" example), it stops your
widget-level binding from firing.

I don't see anything to be fixed here, so I'm closing it.

----------
nosy: +gpolo
resolution:  -> invalid
status: open -> closed

____________________________________
Tracker 

____________________________________

From report at bugs.python.org  Thu May 15 19:03:19 2008
From: report at bugs.python.org (Devin Jeanpierre)
Date: Thu, 15 May 2008 17:03:19 +0000
Subject: [issue2867] curses-howto link in curses module documentation gives a
	404
In-Reply-To: <1210870990.17.0.248799344481.issue2867@psf.upfronthosting.co.za>
Message-ID: <1210870990.17.0.248799344481.issue2867@psf.upfronthosting.co.za>


New submission from Devin Jeanpierre :

In the curses module documentation < http://docs.python.org/lib/module-
curses.html >, there is a link to a curses-howto, at < 
http://www.python.org/doc/howto/curses/curses.html >. That page doesn't 
exist: it gives an HTTP 404.

I am aware that the last time I reported a documentation error it was 
actually fixed in the unreleased most recent version of the docs. I am 
not sure where that was meant-- I can't find anything but the 2.6 alpha 
docs < http://docs.python.org/dev/ >, where the error is indeed 
corrected (< http://docs.python.org/dev/library/curses.html >, < 
http://docs.python.org/dev/howto/curses.html >). If was what was meant 
(I'd always thought that errors would get corrected right away (in the 
same version), so it doesn't fit with my expectations), then I 
apologize for making a wasteful report. I figured that it would be 
better to risk a bit of time wasted than leave an error until later.

----------
assignee: georg.brandl
components: Documentation
messages: 66871
nosy: Devin Jeanpierre, georg.brandl
severity: normal
status: open
title: curses-howto link in curses module documentation gives a 404
versions: Python 2.5

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 19:35:21 2008
From: report at bugs.python.org (Ambarish Malpani)
Date: Thu, 15 May 2008 17:35:21 +0000
Subject: [issue2868] Problem with urllib and urllib2 in urlopen?
In-Reply-To: <1210872918.44.0.781386707742.issue2868@psf.upfronthosting.co.za>
Message-ID: <1210872918.44.0.781386707742.issue2868@psf.upfronthosting.co.za>


New submission from Ambarish Malpani :

I have the following code:

import urllib
u = 'http://www.mercurynews.com/ci_9216417'
h = urllib.urlopen(u).read()
print h
# Get an empty string
#(can use urllib2 also - get the same behavior)

If I visit the same page with my browser, get the contents of the page
(after some redirects...)

----------
components: Extension Modules
messages: 66872
nosy: ambarish
severity: normal
status: open
title: Problem with urllib and urllib2 in urlopen?
type: behavior
versions: Python 2.5

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 19:44:53 2008
From: report at bugs.python.org (Collin Winter)
Date: Thu, 15 May 2008 17:44:53 +0000
Subject: [issue2866] syntax error in fix_imports.py
In-Reply-To: <1210864474.73.0.391554702591.issue2866@psf.upfronthosting.co.za>
Message-ID: <1210873493.17.0.78968808594.issue2866@psf.upfronthosting.co.za>


Collin Winter  added the comment:

Fixed in r63321

----------
resolution:  -> fixed
status: open -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 20:14:21 2008
From: report at bugs.python.org (Jochen Kupperschmidt)
Date: Thu, 15 May 2008 18:14:21 +0000
Subject: [issue2869] Wrong doc for `calendar.Calendar.iterweekdays`
In-Reply-To: <1210875257.46.0.726174573952.issue2869@psf.upfronthosting.co.za>
Message-ID: <1210875257.46.0.726174573952.issue2869@psf.upfronthosting.co.za>


New submission from Jochen Kupperschmidt :

The documentation for `calendar.Calendar.iterweekdays` (both 2.5 and
2.6a3 online) states that the method would take an argument `weekday`.
However, testing it and looking at the module source reveals that it
takes no arguments.

----------
assignee: georg.brandl
components: Documentation
messages: 66874
nosy: georg.brandl, yogi
severity: normal
status: open
title: Wrong doc for `calendar.Calendar.iterweekdays`
versions: Python 2.5, Python 2.6

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 20:43:38 2008
From: report at bugs.python.org (Brett Cannon)
Date: Thu, 15 May 2008 18:43:38 +0000
Subject: [issue2775] Implement PEP 3108
In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za>
Message-ID: <1210877018.85.0.365775269099.issue2775@psf.upfronthosting.co.za>


Changes by Brett Cannon :


----------
dependencies: +Patch to rename markupbase to _markupbase

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 20:44:21 2008
From: report at bugs.python.org (Brett Cannon)
Date: Thu, 15 May 2008 18:44:21 +0000
Subject: [issue2861] Patch to rename markupbase to _markupbase
In-Reply-To: <1210844561.67.0.674925614552.issue2861@psf.upfronthosting.co.za>
Message-ID: <1210877061.38.0.0472496080142.issue2861@psf.upfronthosting.co.za>


Brett Cannon  added the comment:

Added as a dependency on issue 2775 so as to not lose this patch.

----------
nosy: +brett.cannon

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 20:48:58 2008
From: report at bugs.python.org (Mark Veldhuis)
Date: Thu, 15 May 2008 18:48:58 +0000
Subject: [issue2755] IDLE ignores module change before restart
In-Reply-To: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za>
Message-ID: <1210877336.88.0.22571519136.issue2755@psf.upfronthosting.co.za>


Mark Veldhuis  added the comment:

Interesting. I click on an icon-launcher in my panel. The command in the
launcher's properties is: "/usr/bin/idle-python2.5 -n". I got the icon
by dragging the regular icon from under applications-programming-Idle to
the panel.

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 21:25:41 2008
From: report at bugs.python.org (Alexander Belopolsky)
Date: Thu, 15 May 2008 19:25:41 +0000
Subject: [issue2863] Generator __name__ and better repr()
In-Reply-To: <1210861511.93.0.62534649214.issue2863@psf.upfronthosting.co.za>
Message-ID: <1210879539.24.0.552910285046.issue2863@psf.upfronthosting.co.za>


Alexander Belopolsky  added the comment:

Any reason why generator object repr is formed differently from
function and code?

>>> def f(): yield 1
...
>>> f()

>>> f

>>> f.__code__
", line 1>

----------
nosy: +belopolsky

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 21:53:47 2008
From: report at bugs.python.org (Alexander Belopolsky)
Date: Thu, 15 May 2008 19:53:47 +0000
Subject: [issue2869] Wrong doc for `calendar.Calendar.iterweekdays`
In-Reply-To: <1210875257.46.0.726174573952.issue2869@psf.upfronthosting.co.za>
Message-ID: <1210881227.98.0.558212570129.issue2869@psf.upfronthosting.co.za>


Changes by Alexander Belopolsky :


----------
keywords: +patch
Added file: http://bugs.python.org/file10335/issue2869.diff

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 22:41:19 2008
From: report at bugs.python.org (Benjamin Peterson)
Date: Thu, 15 May 2008 20:41:19 +0000
Subject: [issue2865] syntax error in fix_imports.py
In-Reply-To: <1210864454.67.0.912563715467.issue2865@psf.upfronthosting.co.za>
Message-ID: <1210884079.94.0.100695723131.issue2865@psf.upfronthosting.co.za>


Changes by Benjamin Peterson :


----------
resolution:  -> fixed
status: open -> closed

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 23:32:55 2008
From: report at bugs.python.org (Benjamin Peterson)
Date: Thu, 15 May 2008 21:32:55 +0000
Subject: [issue2854] Add gestalt back into Python 3.0
In-Reply-To: <1210795778.91.0.672202960486.issue2854@psf.upfronthosting.co.za>
Message-ID: <1210887175.41.0.979004969766.issue2854@psf.upfronthosting.co.za>


Benjamin Peterson  added the comment:

Here's a patch. I moved gestalt to Modules and renamed it _gestalt. I
inlined the few lines of pymactoolbox that I needed, so that doesn't
have to come back.

----------
keywords: +patch
Added file: http://bugs.python.org/file10336/gestalt_is_back.patch

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 23:40:33 2008
From: report at bugs.python.org (Benjamin Peterson)
Date: Thu, 15 May 2008 21:40:33 +0000
Subject: [issue2860] re module fails to handle digits in byte strings
In-Reply-To: <1210838903.44.0.718972367839.issue2860@psf.upfronthosting.co.za>
Message-ID: <1210887633.12.0.138627114031.issue2860@psf.upfronthosting.co.za>


Benjamin Peterson  added the comment:

I think it's debatable whether re should byte strings since it is
searching through text and not raw binary data. However, this may be a
case of practicality over purity.

----------
nosy: +benjamin.peterson

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 23:43:11 2008
From: report at bugs.python.org (Juno)
Date: Thu, 15 May 2008 21:43:11 +0000
Subject: [issue2870] cmathmodule.c compile error
In-Reply-To: <1210887790.81.0.134090801256.issue2870@psf.upfronthosting.co.za>
Message-ID: <1210887790.81.0.134090801256.issue2870@psf.upfronthosting.co.za>


New submission from Juno :

Building on Linux Debian Etch 2.6.18-6-k7 #1 SMP Thu May 8 08:09:57 UTC
2008 i686 GNU/Linux

Python version 2.6 svn trunk:63321
Compiler : GCC 4.1.2
Compile error in Modules/cmathmodule.c

Detailled error message follows :

building 'cmath' extension
gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -I/data/User/AppSVN/Python/./Include -I.
-IInclude -I./Include -I/usr/local/include
-I/data/User/AppSVN/Python/Include -I/data/User/AppSVN/Python -c
/data/User/AppSVN/Python/Modules/cmathmodule.c -o
build/temp.linux-i686-2.6/data/User/AppSVN/Python/Modules/cmathmodule.o
/data/User/AppSVN/Python/Modules/cmathmodule.c: In function 'cmath_phase':
/data/User/AppSVN/Python/Modules/cmathmodule.c:923: error: 'r'
undeclared (first use in this function)
/data/User/AppSVN/Python/Modules/cmathmodule.c:923: error: (Each
undeclared identifier is reported only once
/data/User/AppSVN/Python/Modules/cmathmodule.c:923: error: for each
function it appears in.)

Checking previous function in the file cmathmodule.c, it seems that you
have to declare line 916 :
Py_complex z,r;

After this correction the compilation is ok. I do not test the function
itself, I just try to have the code compiling.

----------
components: Extension Modules
messages: 66880
nosy: Juno
severity: normal
status: open
title: cmathmodule.c compile error
type: compile error
versions: Python 2.6

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 23:46:10 2008
From: report at bugs.python.org (Benjamin Peterson)
Date: Thu, 15 May 2008 21:46:10 +0000
Subject: [issue2868] Problem with urllib and urllib2 in urlopen?
In-Reply-To: <1210872918.44.0.781386707742.issue2868@psf.upfronthosting.co.za>
Message-ID: <1210887970.42.0.482567386512.issue2868@psf.upfronthosting.co.za>


Benjamin Peterson  added the comment:

This is what happens on the trunk:

>>> import urllib
>>> u = 'http://www.mercurynews.com/ci_9216417'
>>> h = urllib.urlopen(u).read()
Traceback (most recent call last):
  File "", line 1, in 
  File "/temp/python/trunk/Lib/ssl.py", line 333, in read
data = self._sslobj.read(recv_size)
ssl.SSLError: [Errno 8] _ssl.c:1276: EOF occurred in violation of protocol

----------
nosy: +benjamin.peterson

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 23:50:55 2008
From: report at bugs.python.org (Irmen de Jong)
Date: Thu, 15 May 2008 21:50:55 +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: <1210888254.97.0.197047518827.issue2871@psf.upfronthosting.co.za>


New submission from Irmen de Jong :

I've ran into a problem where it would be very nice to be able to tell
the tread.get_ident() of a given threading.Thread object.

Currently, when creating a new Thread object, there is no good way of
getting that thread's get_ident() value. 

I propose adding the get_ident() value as a publicly accessible field of
every threading.Thread object.

----------
components: Extension Modules
messages: 66882
nosy: irmen
severity: normal
status: open
title: store thread.get_ident() thread identifier inside threading.Thread objects
type: feature request

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Thu May 15 23:51:43 2008
From: report at bugs.python.org (Donovan Baarda)
Date: Thu, 15 May 2008 21:51:43 +0000
Subject: [issue1767370] Make xmlrpc use HTTP/1.1 and keepalive
In-Reply-To: <1210647916.37.0.590624263328.issue1767370@psf.upfronthosting.co.za>
Message-ID: <482CAFF2.80003@minkirri.apana.org.au>


Donovan Baarda  added the comment:

One more time... this time after adding correct email addresses to my 
existing account...

Mart?n Conte Mac Donell wrote:
> Mart?n Conte Mac Donell  added the comment:
> 
> I made this patch works against trunk, also i'v fixed some typos.

Sorry for not responding to this earlier...

I didn't write this patch, but submitted it on behalf of the original
author (Cc'ed on this email). I spoke to him about getting this patch
updated, and he said that he has made some more improvements and fixes
since I submitted it.

I will try to get him to produce a new patch, but he (and I) are both
very busy on other things, so I suspect you guys will be able to polish
  up what is already there before we manage to pull something together...

I will give him another poke tomorrow...

> ----------
> nosy: +Reflejo
> versions: +Python 2.5
> Added file: http://bugs.python.org/file10313/xmlrpc-keepalive.diff
> 
> _____________________________________
> Tracker 
> 
> _____________________________________

_____________________________________
Tracker 

_____________________________________

From report at bugs.python.org  Fri May 16 00:11:20 2008
From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=)
Date: Thu, 15 May 2008 22:11:20 +0000
Subject: [issue2837] OpenID wannabe
In-Reply-To: <1210606658.94.0.916012162383.issue2837@psf.upfronthosting.co.za>
Message-ID: <1210889479.76.0.837532522409.issue2837@psf.upfronthosting.co.za>


Martin v. L?wis  added the comment:

The reason to close this report is that you are not reporting a bug in
Python. Instead, you report an issue with the bug tracker itself. This
tracker is solely, only, exclusively, for bugs you find in the
implementation of Python often referred to as CPython.

Reporting it here is incorrect, and a reason to close the report. Please
report it in the place where problems with the bug tracker get reported
(you'll need yet another account over there as well. Feel free to use
the same username and password).

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Fri May 16 00:28:42 2008
From: report at bugs.python.org (Gregory P. Smith)
Date: Thu, 15 May 2008 22:28:42 +0000
Subject: [issue2858] bsddb.db.DBEnv.lock_get test_lock.test03_set_timeout
	crashes
In-Reply-To: <1210828209.22.0.850566546074.issue2858@psf.upfronthosting.co.za>
Message-ID: <1210890522.38.0.711085077749.issue2858@psf.upfronthosting.co.za>


Changes by Gregory P. Smith :


----------
assignee:  -> jcea

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Fri May 16 00:40:39 2008
From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=)
Date: Thu, 15 May 2008 22:40:39 +0000
Subject: [issue1251] ssl module doesn't support non-blocking handshakes
In-Reply-To: <1191970098.04.0.2942232647.issue1251@psf.upfronthosting.co.za>
Message-ID: <1210891239.03.0.693345238731.issue1251@psf.upfronthosting.co.za>


Changes by Jes?s Cea Avi?n :


----------
nosy: +jcea

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Fri May 16 00:41:13 2008
From: report at bugs.python.org (Benjamin Peterson)
Date: Thu, 15 May 2008 22:41:13 +0000
Subject: [issue2867] curses-howto link in curses module documentation gives a
	404
In-Reply-To: <1210870990.17.0.248799344481.issue2867@psf.upfronthosting.co.za>
Message-ID: <1210891245.73.0.232604321433.issue2867@psf.upfronthosting.co.za>


Benjamin Peterson  added the comment:

Usually, we don't bother fixing doc problems until the next major release.

----------
nosy: +benjamin.peterson

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Fri May 16 00:56:08 2008
From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=)
Date: Thu, 15 May 2008 22:56:08 +0000
Subject: [issue1251] ssl module doesn't support non-blocking handshakes
In-Reply-To: <1191970098.04.0.2942232647.issue1251@psf.upfronthosting.co.za>
Message-ID: <1210892168.02.0.341445626136.issue1251@psf.upfronthosting.co.za>


Jes?s Cea Avi?n  added the comment:

I'm hitting this issue aswell. How is going?.

I'm creating a socket with a, let say, 5 seconds timeout. The timeout
works fine before the "wrap_socket()", and after it. But the timeout
doesn't work WHILE in the "wrap_socket()" method call.

What can I do?.

If I need to call "do_handshake()" myself, working with
SSL_ERROR_WANT_READ/WRITE, I think this *needs* to be documented somewhere.

That is, any difference between "normal" sockets and "ssl" sockets need
to be documented in docs. Explicitly.

My opinion, of course :).

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Fri May 16 02:22:15 2008
From: report at bugs.python.org (Bill Janssen)
Date: Fri, 16 May 2008 00:22:15 +0000
Subject: [issue1251] ssl module doesn't support non-blocking handshakes
In-Reply-To: <1210892168.02.0.341445626136.issue1251@psf.upfronthosting.co.za>
Message-ID: <4b3e516a0805151721h5c839425r1ed9bef08fdd05c9@mail.gmail.com>


Bill Janssen  added the comment:

Here's what's in the 3.0 docs:

The parameter do_handshake_on_connect specifies whether to do the SSL
handshake automatically after doing a socket.connect(), or whether the
application program will call it explicitly, by invoking the
SSLSocket.do_handshake()method.
Calling
SSLSocket.do_handshake()explicitly
gives the program control over the blocking behavior of the
socket I/O involved in the handshake.

Look at test.test_ssl.testNonBlockingHandshake() in 3.0alpha or in the PyPI
module.  I'm still working on 2.6.

Bill

On Thu, May 15, 2008 at 3:56 PM, Jes?s Cea Avi?n 
wrote:

>
> Jes?s Cea Avi?n  added the comment:
>
> I'm hitting this issue aswell. How is going?.
>
> I'm creating a socket with a, let say, 5 seconds timeout. The timeout
> works fine before the "wrap_socket()", and after it. But the timeout
> doesn't work WHILE in the "wrap_socket()" method call.
>
> What can I do?.
>
> If I need to call "do_handshake()" myself, working with
> SSL_ERROR_WANT_READ/WRITE, I think this *needs* to be documented somewhere.
>
> That is, any difference between "normal" sockets and "ssl" sockets need
> to be documented in docs. Explicitly.
>
> My opinion, of course :).
>
> __________________________________
> Tracker 
> 
> __________________________________
>

Added file: http://bugs.python.org/file10337/unnamed

__________________________________
Tracker 

__________________________________
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: unnamed
URL: 

From report at bugs.python.org  Fri May 16 04:37:11 2008
From: report at bugs.python.org (Senthil)
Date: Fri, 16 May 2008 02:37:11 +0000
Subject: [issue2868] Problem with urllib and urllib2 in urlopen?
In-Reply-To: <1210872918.44.0.781386707742.issue2868@psf.upfronthosting.co.za>
Message-ID: <1210905430.81.0.209799252269.issue2868@psf.upfronthosting.co.za>


Senthil  added the comment:

Here is my analysis:

>>> import urllib2
>>> url = "http://www.mercurynews.com/ci_9216417"
>>> content = urllib2.urlopen(url).read()
>>> print content

>>> opened = urllib2.urlopen(url)
>>> print opened.geturl()
https://secure.passport.mnginteractive.com/mngi/servletDispatch/ErightsPassportServlet.dyn?url=http://www.mercurynews.com/ci_9216417?nclick_check=1&forced=true

# This URL Redirection is a 302 Redirection. 
# Browser is "unable" to launch the redirected site.
https://secure.passport.mnginteractive.com/mngi/servletDispatch/ErightsPassportServlet.dyn?url=http://www.mercurynews.com/ci_9216417?nclick_check=1&forced=true
# Logically, the urllib /urllib2 is giving a Blank when reading this site.

I would't entire say urllib2's fault before understanding how FF is
handling the redirection of the first site.
1) Open the site mentioned in the Location of 302, you will experience
the same behaviour as 302.

It seems more of an issue at server end, we have to know how, Firefox is
handling at the first place.

----------
nosy: +orsenthil

__________________________________
Tracker 

__________________________________

From report at bugs.python.org  Fri May 16 05:08:07 2008
From: report at bugs.python.org (Senthil)
Date: Fri, 16 May 2008 03:08:07 +0000
Subject: [issue2464] urllib2 can't handle http://www.wikispaces.com
In-Reply-To: <1206283270.11.0.221591174332.issue2464@psf.upfronthosting.co.za>
Message-ID: <1210907286.95.0.736706304722.issue2464@psf.upfronthosting.co.za>


Senthil  added the comment:

The issue is not just with null character. If you observe now the
diretion is 302-302-200 and there is no null character.
However, still urllib2 is unable to handle multiple redirection properly
(IIRC, there is a portion of code to handle multiple redirection and
exit on infinite loop)
>>> url = "http://www.wikispaces.com"
>>> opened = urllib.urlopen(url)
>>> print opened.geturl()
http://www.wikispaces.com?responseToken=344289da354a29c67d48928dbe72042a
>>> print opened.read()

400 Bad Request

400 Bad Request


nginx/0.6.30
Needs a relook, IMO. ---------- nosy: +orsenthil __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 05:48:40 2008 From: report at bugs.python.org (Senthil) Date: Fri, 16 May 2008 03:48:40 +0000 Subject: [issue2583] urlparse normalize URL path In-Reply-To: <1207663018.75.0.231530474022.issue2583@psf.upfronthosting.co.za> Message-ID: <1210909720.18.0.718159575959.issue2583@psf.upfronthosting.co.za> Senthil added the comment: Just try it this way. >>> print urlparse.urljoin('http://site.com/', 'path/../path/.././path/./') http://site.com/path/ >>> The difference is the inital '/' in the second argument. Human interpretation is: Go to http://site.com/ and 1) go to path directory 2) go to one-level above (/../) which results in site.com again 3) go to path directory 4) go to one-level above (..) (results site.com )5) Stay in the same directory (.) 6) goto path 7) stay there (.) Final result is http://www.site.com/path/ When you start the path with a '/' >>> print urlparse.urljoin('http://site.com/', '/path/../path/.././path/./') http://site.com/path/../path/.././path/./ The RFC (1808) suggests the following. urlparse.urljoin('http://a/b/c/d','/./g') = The argument is taken as a complete path for the server. The way to use this would be, this way: >>> print urlparse.urljoin('http://site.com/', 'path/../path/.././path/./') http://site.com/path/ >>> This is not a bug and can be closed. ---------- nosy: +orsenthil __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 05:49:14 2008 From: report at bugs.python.org (Dustin J. Mitchell) Date: Fri, 16 May 2008 03:49:14 +0000 Subject: [issue1187] pipe fd handling issues in subprocess.py on POSIX In-Reply-To: <1190400129.03.0.21752289973.issue1187@psf.upfronthosting.co.za> Message-ID: <1210909754.64.0.899828456121.issue1187@psf.upfronthosting.co.za> Dustin J. Mitchell added the comment: Hmm.. I see why you didn't write a unit test for this! Attached is a patch with a unit test that tickles this behavior, along with Andrew's fix. Added file: http://bugs.python.org/file10338/1187-dustin.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 05:51:06 2008 From: report at bugs.python.org (Senthil) Date: Fri, 16 May 2008 03:51:06 +0000 Subject: [issue2583] urlparse normalize URL path In-Reply-To: <1207663018.75.0.231530474022.issue2583@psf.upfronthosting.co.za> Message-ID: <1210909866.9.0.285532348434.issue2583@psf.upfronthosting.co.za> Senthil added the comment: Btw, Thank you for the exciting report monk.e.boy. :-) There are many hidden in urlparse,urllib*. I hope you will have fun time finding them (and fixing them too :) And one general comment. If the bug is valid, Python official Documentation cannot be made to reference a blog site. Instead, a patch to fix the python doc would itself be welcome. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:26:42 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:26:42 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210912002.18.0.961210005623.issue2775@psf.upfronthosting.co.za> Brett Cannon added the comment: Removing htmllib is not as simple as just removing the modules as pydoc uses htmllib. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:37:28 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:37:28 +0000 Subject: [issue2872] Remove commands for PEP 3108 In-Reply-To: <1210912647.86.0.565995912638.issue2872@psf.upfronthosting.co.za> Message-ID: <1210912647.86.0.565995912638.issue2872@psf.upfronthosting.co.za> New submission from Brett Cannon : The commands module is slated to go. The getstatus() function needs to be deprecated, with the rest of the module moving into subprocess (and thus adding commands to the 2to3 fix_import fixer). ---------- components: Library (Lib) messages: 66894 nosy: brett.cannon priority: release blocker severity: normal status: open title: Remove commands for PEP 3108 type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:37:44 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:37:44 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210912664.48.0.989477392334.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Remove commands for PEP 3108 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:39:03 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:39:03 +0000 Subject: [issue2839] Moving lib-tk to tkinter package In-Reply-To: <1210615239.35.0.359819643531.issue2839@psf.upfronthosting.co.za> Message-ID: <1210912743.58.0.0600997091181.issue2839@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- priority: -> release blocker __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:41:12 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:41:12 +0000 Subject: [issue1000] Patch to rename *Server modules to lower-case In-Reply-To: <1187897119.59.0.989686888119.issue1000@psf.upfronthosting.co.za> Message-ID: <1210912872.72.0.312292870532.issue1000@psf.upfronthosting.co.za> Brett Cannon added the comment: SocketServer is the only *Server module who name is being directly lowercased. All the rest are ending up in various packages with a totally different name. ---------- assignee: -> collinwinter nosy: +brett.cannon resolution: -> rejected status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:42:29 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:42:29 +0000 Subject: [issue1002] Patch to rename HTMLParser module to lower_case In-Reply-To: <1187900417.52.0.984066469485.issue1002@psf.upfronthosting.co.za> Message-ID: <1210912949.08.0.660513883928.issue1002@psf.upfronthosting.co.za> Brett Cannon added the comment: Closing as out of date to try to make the number of PEP 3108 issues more manageable. HTMLParser is becoming html.parser in 3.0. ---------- resolution: -> out of date status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:42:40 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:42:40 +0000 Subject: [issue2861] Patch to rename markupbase to _markupbase In-Reply-To: <1210844561.67.0.674925614552.issue2861@psf.upfronthosting.co.za> Message-ID: <1210912960.61.0.925481912022.issue2861@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- priority: -> release blocker __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:42:51 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:42:51 +0000 Subject: [issue2847] Remove cl usage from aifc In-Reply-To: <1210726634.74.0.297516553516.issue2847@psf.upfronthosting.co.za> Message-ID: <1210912971.7.0.591709633626.issue2847@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- priority: critical -> release blocker __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:43:08 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:43:08 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1210912988.27.0.682472641801.issue2848@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- priority: critical -> release blocker __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:43:17 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:43:17 +0000 Subject: [issue2849] Remove usage of rfc822 from the stdlib In-Reply-To: <1210726924.82.0.902490265063.issue2849@psf.upfronthosting.co.za> Message-ID: <1210912997.61.0.852683459237.issue2849@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- priority: critical -> release blocker __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:43:28 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:43:28 +0000 Subject: [issue2621] rename test_support to support In-Reply-To: <1207960346.09.0.959941490384.issue2621@psf.upfronthosting.co.za> Message-ID: <1210913008.7.0.045518364517.issue2621@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- priority: -> release blocker __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:44:05 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:44:05 +0000 Subject: [issue2873] Remove htmllib use in the stdlib In-Reply-To: <1210913045.12.0.944933316665.issue2873@psf.upfronthosting.co.za> Message-ID: <1210913045.12.0.944933316665.issue2873@psf.upfronthosting.co.za> New submission from Brett Cannon : htmllib cannot be removed from 3.0 until its use is removed from pydoc. ---------- components: Library (Lib) messages: 66897 nosy: brett.cannon priority: release blocker severity: normal status: open title: Remove htmllib use in the stdlib type: behavior versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:44:28 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:44:28 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210913068.58.0.807186547256.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Remove htmllib use in the stdlib __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:45:45 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:45:45 +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: <1210913145.44.0.456986373707.issue2874@psf.upfronthosting.co.za> New submission from Brett Cannon : The stat module is slated to go in Python 3.0, but that can't happen until all uses of the module are gone. This will require moving over to using the named tuple features of os.stat() along with adding methods to the object that the stat module has as functions. ---------- components: Library (Lib) messages: 66898 nosy: brett.cannon priority: release blocker severity: normal status: open title: Remove use of the stat module in the stdlib type: behavior versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:45:57 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:45:57 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210913157.73.0.913908783111.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Remove use of the stat module in the stdlib __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:46:45 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:46:45 +0000 Subject: [issue2875] Rename the thread module to _thread In-Reply-To: <1210913205.44.0.787741913156.issue2875@psf.upfronthosting.co.za> Message-ID: <1210913205.44.0.787741913156.issue2875@psf.upfronthosting.co.za> New submission from Brett Cannon : PEP 3108 has thread slated to be renamed _thread (along with dummy_thread to _dummy_thread). ---------- components: Library (Lib) messages: 66899 nosy: brett.cannon priority: release blocker severity: normal status: open title: Rename the thread module to _thread type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:47:00 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:47:00 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210913220.41.0.123697170181.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Rename the thread module to _thread __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:49:08 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:49:08 +0000 Subject: [issue2876] Backport UserDict move in 3.0 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> New submission from Brett Cannon : In Python 3.0, the UserDict module was removed and the UserDict class was moved to the collections module. That change-over needs to be backported to 2.6 so that the UserDict module can be deprecated. ---------- components: Library (Lib) messages: 66900 nosy: brett.cannon priority: release blocker severity: normal status: open title: Backport UserDict move in 3.0 type: behavior versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:49:20 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:49:20 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210913360.61.0.695915888373.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Backport UserDict move in 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:50:06 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:50:06 +0000 Subject: [issue2877] Backport UserString move from 3.0 In-Reply-To: <1210913405.95.0.573859631329.issue2877@psf.upfronthosting.co.za> Message-ID: <1210913405.95.0.573859631329.issue2877@psf.upfronthosting.co.za> New submission from Brett Cannon : The UserString class was moved from its own module to the collections module. That change needs to be backported. ---------- components: Library (Lib) messages: 66901 nosy: brett.cannon priority: release blocker severity: normal status: open title: Backport UserString move from 3.0 type: behavior versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:50:21 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:50:21 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210913421.86.0.55118338893.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Backport UserString move from 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:51:10 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:51:10 +0000 Subject: [issue2878] Backport UserList move in 3.0 In-Reply-To: <1210913470.53.0.764611269723.issue2878@psf.upfronthosting.co.za> Message-ID: <1210913470.53.0.764611269723.issue2878@psf.upfronthosting.co.za> New submission from Brett Cannon : The UserList class was moved from the UserList module to the collections module. That move along with the stdlib update needs to be backported to 2.6. ---------- components: Library (Lib) messages: 66902 nosy: brett.cannon priority: release blocker severity: normal status: open title: Backport UserList move in 3.0 type: behavior versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:52:06 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:52:06 +0000 Subject: [issue2879] Rename _winreg to winreg In-Reply-To: <1210913526.61.0.164470356579.issue2879@psf.upfronthosting.co.za> Message-ID: <1210913526.61.0.164470356579.issue2879@psf.upfronthosting.co.za> New submission from Brett Cannon : The _winreg module needs to be renamed winreg for PEP 3108. ---------- components: Library (Lib) messages: 66903 nosy: brett.cannon priority: release blocker severity: normal status: open title: Rename _winreg to winreg type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:52:18 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 04:52:18 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210913538.52.0.00195378489303.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Rename _winreg to winreg __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 06:59:52 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 16 May 2008 04:59:52 +0000 Subject: [issue2876] Backport UserDict move in 3.0 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1210913992.63.0.21263395474.issue2876@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This doesn't make any sense to me. The 2.6 code runs fine as-is. The 2-to-3 tool can handle switching from UserDict.UserDict to collections.UserDict. What's the issue? And why is this marked as a release blocker? ---------- nosy: +rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:00:26 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:00:26 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1210914025.96.0.857212711106.issue2750@psf.upfronthosting.co.za> Brett Cannon added the comment: Can this issue be closed? __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:01:45 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 16 May 2008 05:01:45 +0000 Subject: [issue2877] Backport UserString move from 3.0 In-Reply-To: <1210913405.95.0.573859631329.issue2877@psf.upfronthosting.co.za> Message-ID: <1210914105.69.0.954318302505.issue2877@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Same questions as for UserDict. Why backport this and break existing 2.5 code? There's no benefit. ---------- nosy: +rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:03:20 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:03:20 +0000 Subject: [issue2880] Rename repr to reprlib In-Reply-To: <1210914200.71.0.373705833301.issue2880@psf.upfronthosting.co.za> Message-ID: <1210914200.71.0.373705833301.issue2880@psf.upfronthosting.co.za> New submission from Brett Cannon : The repr module is slated to be renamed reprlib in PEP 3108. ---------- components: Library (Lib) messages: 66907 nosy: brett.cannon priority: release blocker severity: normal status: open title: Rename repr to reprlib type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:04:23 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:04:23 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210914263.07.0.704888977966.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Rename repr to reprlib __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:05:28 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:05:28 +0000 Subject: [issue2881] Create the dbm package In-Reply-To: <1210914327.93.0.813244927721.issue2881@psf.upfronthosting.co.za> Message-ID: <1210914327.93.0.813244927721.issue2881@psf.upfronthosting.co.za> New submission from Brett Cannon : The dbm package as outlined in PEP 3108 needs to be created. ---------- components: Library (Lib) messages: 66908 nosy: brett.cannon priority: release blocker severity: normal status: open title: Create the dbm package type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:05:39 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:05:39 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210914339.92.0.718888252052.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Create the dbm package __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:06:17 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:06:17 +0000 Subject: [issue2882] Create the html package In-Reply-To: <1210914377.14.0.176353307506.issue2882@psf.upfronthosting.co.za> Message-ID: <1210914377.14.0.176353307506.issue2882@psf.upfronthosting.co.za> New submission from Brett Cannon : The html package as outlined in PEP 3108 needs to be created. ---------- components: Library (Lib) messages: 66909 nosy: brett.cannon priority: release blocker severity: normal status: open title: Create the html package type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:06:30 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:06:30 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210914390.23.0.938144462049.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Create the html package __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:07:26 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:07:26 +0000 Subject: [issue2883] Create the http package In-Reply-To: <1210914446.04.0.852197194543.issue2883@psf.upfronthosting.co.za> Message-ID: <1210914446.04.0.852197194543.issue2883@psf.upfronthosting.co.za> New submission from Brett Cannon : Create the http package as outlined in PEP 3108. Initial patches exist in issue 2775. ---------- components: Library (Lib) messages: 66910 nosy: brett.cannon priority: release blocker severity: normal status: open title: Create the http package versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:08:47 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:08:47 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210914527.9.0.798396736987.issue2775@psf.upfronthosting.co.za> Brett Cannon added the comment: Issue 2883 is where future http package stuff should occur. I referenced this issue for initial patches. ---------- dependencies: +Create the http package __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:10:08 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:10:08 +0000 Subject: [issue2884] Create the tkinter package In-Reply-To: <1210914608.62.0.531820285886.issue2884@psf.upfronthosting.co.za> Message-ID: <1210914608.62.0.531820285886.issue2884@psf.upfronthosting.co.za> New submission from Brett Cannon : The tkinter package as outlined in PEP 3108 needs to be created. See issue 2775 for initial patches. ---------- components: Library (Lib) keywords: patch messages: 66912 nosy: brett.cannon priority: release blocker severity: normal status: open title: Create the tkinter package type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:10:23 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:10:23 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210914623.61.0.703347366475.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Create the tkinter package __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:11:31 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:11:31 +0000 Subject: [issue2885] Create the urllib package In-Reply-To: <1210914691.08.0.848288242706.issue2885@psf.upfronthosting.co.za> Message-ID: <1210914691.08.0.848288242706.issue2885@psf.upfronthosting.co.za> New submission from Brett Cannon : The urllib package as outlined in PEP 3108 needs to be created. ---------- assignee: jhylton components: Library (Lib) messages: 66913 nosy: brett.cannon, jhylton priority: release blocker severity: normal status: open title: Create the urllib package type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:11:46 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:11:46 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210914706.33.0.741159870411.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Create the urllib package __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:12:17 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:12:17 +0000 Subject: [issue2885] Create the urllib package In-Reply-To: <1210914691.08.0.848288242706.issue2885@psf.upfronthosting.co.za> Message-ID: <1210914737.49.0.406464375242.issue2885@psf.upfronthosting.co.za> Brett Cannon added the comment: Issue 2884 is to be used to track the tkinter package. I reference this issue for initial patches. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:12:21 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:12:21 +0000 Subject: [issue2885] Create the urllib package In-Reply-To: <1210914691.08.0.848288242706.issue2885@psf.upfronthosting.co.za> Message-ID: <1210914741.78.0.443681510835.issue2885@psf.upfronthosting.co.za> Changes by Brett Cannon : __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:12:48 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:12:48 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210914768.76.0.570590030214.issue2775@psf.upfronthosting.co.za> Brett Cannon added the comment: Issue 2884 references this issue as it is to be used to tracker the new tkinter package. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:12:59 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:12:59 +0000 Subject: [issue2883] Create the http package In-Reply-To: <1210914446.04.0.852197194543.issue2883@psf.upfronthosting.co.za> Message-ID: <1210914779.15.0.913020099407.issue2883@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- keywords: +patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:13:42 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:13:42 +0000 Subject: [issue2886] Create the xmlrpc package In-Reply-To: <1210914821.89.0.572470213845.issue2886@psf.upfronthosting.co.za> Message-ID: <1210914821.89.0.572470213845.issue2886@psf.upfronthosting.co.za> New submission from Brett Cannon : The xmlrpc package as outlined in PEP 3108 needs to be created. ---------- components: Library (Lib) messages: 66916 nosy: brett.cannon priority: release blocker severity: normal status: open title: Create the xmlrpc package type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:13:53 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:13:53 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210914833.27.0.20773753702.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Create the xmlrpc package __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:17:14 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 05:17:14 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210915033.98.0.515143015451.issue2775@psf.upfronthosting.co.za> Brett Cannon added the comment: I have created an individual issue for every major step left in implementing PEP 3108. Each one that is still open is now listed as a dependency for this issue. ---------- dependencies: -Patch to rename *Server modules to lower-case, Patch to rename HTMLParser module to lower_case, Remove mac modules __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 07:27:43 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 16 May 2008 05:27:43 +0000 Subject: [issue2887] bsddb 4.6.4 needs to be ported to Python 3.0 In-Reply-To: <1210915662.48.0.494614370174.issue2887@psf.upfronthosting.co.za> Message-ID: <1210915662.48.0.494614370174.issue2887@psf.upfronthosting.co.za> New submission from Alexandre Vassalotti : The recent updates to bsddb (r63207, r63210 and r63218) needs to forward-ported to the py3k branch. At first glance, here is the things that needs to be done in the test suite: - Change the import: from test_all import ... into a relative import: from .test_all import ... - Replace code incompatible with 3.0, such as changing ``dict.has_key(key)`` to ``key in dict``. - Change str literals to bytes literals where appropriate. - Optional: change code like ``type([])`` or ``type(())`` to respectively ``list`` and ``tuple``. - Change print statements into print() calls. - Change ``x != None`` to ``x is not None``. In the modules: - Change PyInt__* to PyLong_*. - Update the PyTypeObject declaration: statichere PyTypeObject DB_Type = { PyObject_HEAD_INIT(NULL) 0, /*ob_size*/ "DB", /*tp_name*/ sizeof(DBObject), /*tp_basicsize*/ ... to: static PyTypeObject DB_Type = { PyVarObject_HEAD_INIT(NULL, 0) "DB", /*tp_name*/ sizeof(DBObject), /*tp_basicsize*/ ... - Update module init declaration: DL_EXPORT(void) init_bsddb(void) { ... to: PyMODINIT_FUNC init_bsddb(void) { ... - Remove Py_TPFLAGS_HAVE_WEAKREFS. - Change PyString_* calls to PyUnicode_* where appropriate. There probably other things that I missed, but that should give you a good start. ---------- components: Extension Modules, Library (Lib), Tests messages: 66918 nosy: alexandre.vassalotti, gregory.p.smith, jcea priority: normal severity: normal status: open title: bsddb 4.6.4 needs to be ported to Python 3.0 type: feature request versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 08:10:58 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 16 May 2008 06:10:58 +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: <1210918255.72.0.267363953828.issue2888@psf.upfronthosting.co.za> New submission from Alexandre Vassalotti : The indent argument produces different output in Python 2.6 and 3.0: Python 3.0a5+ (py3k:63349:63350M, May 16 2008, 00:37:17) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pprint >>> stuff = ['spam', 'eggs', 'lumberjack', 'knights', 'ni'] >>> stuff.insert(0, stuff[:]) >>> pprint.pprint(stuff, indent=4) [ ['spam', 'eggs', 'lumberjack', 'knights', 'ni'], 'spam', 'eggs', 'lumberjack', 'knights', 'ni'] Python 2.6a3+ (trunk:63323, May 15 2008, 16:09:01) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pprint >>> stuff = ['spam', 'eggs', 'lumberjack', 'knights', 'ni'] >>> stuff.insert(0, stuff[:]) >>> pprint.pprint(stuff, indent=4) [ [ 'spam', 'eggs', 'lumberjack', 'knights', 'ni'], 'spam', 'eggs', 'lumberjack', 'knights', 'ni'] ---------- components: Library (Lib) messages: 66919 nosy: alexandre.vassalotti priority: low severity: normal status: open title: pprint produces different output in 2.6 and 3.0 type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 08:38:27 2008 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 16 May 2008 06:38:27 +0000 Subject: [issue2889] curses for windows (alternative patch) In-Reply-To: <1210919907.42.0.842256015219.issue2889@psf.upfronthosting.co.za> Message-ID: <1210919907.42.0.842256015219.issue2889@psf.upfronthosting.co.za> New submission from anatoly techtonik : Make curses available on Windows by using PDCurses library. Alternative patch for issue 1005895 using current trunk. Attached .bat file is used to compile it under MinGW, but I'd be glad to know how to integrate the patch into Python build system. PDCurses includes support for mouse functions compatible with ncurses, but to turn it on if requires to define NCURSES_MOUSE_VERSION to 2 before is included. I am not familiar with configure.* stuff, so I've just pasted required definitions into _cursesmodule.c With attached .bat file it works by external definition. Some functions, such as initterm are not available on Windows platform and were defined out. I hope that curses module will be included in next Python 2.6 ---------- components: Extension Modules files: curses_win_port.patch.txt messages: 66920 nosy: techtonik severity: normal status: open title: curses for windows (alternative patch) versions: Python 2.6 Added file: http://bugs.python.org/file10339/curses_win_port.patch.txt __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 08:38:33 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 16 May 2008 06:38:33 +0000 Subject: [issue2880] Rename repr to reprlib In-Reply-To: <1210914200.71.0.373705833301.issue2880@psf.upfronthosting.co.za> Message-ID: <1210919913.74.0.977674745434.issue2880@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- assignee: -> alexandre.vassalotti nosy: +alexandre.vassalotti __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 08:39:47 2008 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 16 May 2008 06:39:47 +0000 Subject: [issue2889] curses for windows (alternative patch) In-Reply-To: <1210919907.42.0.842256015219.issue2889@psf.upfronthosting.co.za> Message-ID: <1210919987.7.0.312488814195.issue2889@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file10340/curses_win_compile.bat __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 09:18:12 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 16 May 2008 07:18:12 +0000 Subject: [issue2880] Rename repr to reprlib In-Reply-To: <1210914200.71.0.373705833301.issue2880@psf.upfronthosting.co.za> Message-ID: <1210922292.81.0.0562828603055.issue2880@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 09:25:11 2008 From: report at bugs.python.org (Ismail Donmez) Date: Fri, 16 May 2008 07:25:11 +0000 Subject: [issue2890] O_ASYNC and FASYNC should be defined for *nix systems In-Reply-To: <1210922705.9.0.115557259504.issue2890@psf.upfronthosting.co.za> Message-ID: <1210922705.9.0.115557259504.issue2890@psf.upfronthosting.co.za> New submission from Ismail Donmez : os module have varios O_ declerations but it doesn't define O_ASYNC. Same for fcntl module which doesn't define FASYNC. Simply defining O_ASYNC = 020000 works fine but its not as elegant as saying os.O_ASYNC. ---------- components: Library (Lib) messages: 66921 nosy: cartman severity: normal status: open title: O_ASYNC and FASYNC should be defined for *nix systems versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 09:25:23 2008 From: report at bugs.python.org (Ismail Donmez) Date: Fri, 16 May 2008 07:25:23 +0000 Subject: [issue2890] O_ASYNC and FASYNC should be defined for *nix systems In-Reply-To: <1210922705.9.0.115557259504.issue2890@psf.upfronthosting.co.za> Message-ID: <1210922723.54.0.608433483147.issue2890@psf.upfronthosting.co.za> Changes by Ismail Donmez : ---------- type: -> feature request __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 10:16:24 2008 From: report at bugs.python.org (Andrii V. Mishkovskyi) Date: Fri, 16 May 2008 08:16:24 +0000 Subject: [issue2890] O_ASYNC and FASYNC should be defined for *nix systems In-Reply-To: <1210922705.9.0.115557259504.issue2890@psf.upfronthosting.co.za> Message-ID: <1210925784.16.0.384830343128.issue2890@psf.upfronthosting.co.za> Andrii V. Mishkovskyi added the comment: These flags are non-posix, linux-specific constants. Python 'os' module uses 'posix' module for all *nix systems, including those, that do not support O_ASYNC and FASYNC flags. I think your feature request should be rejected. ---------- nosy: +mishok13 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 10:31:33 2008 From: report at bugs.python.org (Ismail Donmez) Date: Fri, 16 May 2008 08:31:33 +0000 Subject: [issue2890] O_ASYNC and FASYNC should be defined for *nix systems In-Reply-To: <1210922705.9.0.115557259504.issue2890@psf.upfronthosting.co.za> Message-ID: <1210926693.11.0.0194777204335.issue2890@psf.upfronthosting.co.za> Ismail Donmez added the comment: I think they at least should be supported on Linux then. It does work if you use the value itself anyway. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 10:55:31 2008 From: report at bugs.python.org (Andrii V. Mishkovskyi) Date: Fri, 16 May 2008 08:55:31 +0000 Subject: [issue2890] O_ASYNC and FASYNC should be defined for *nix systems In-Reply-To: <1210922705.9.0.115557259504.issue2890@psf.upfronthosting.co.za> Message-ID: <1210928131.33.0.740217939164.issue2890@psf.upfronthosting.co.za> Andrii V. Mishkovskyi added the comment: >I think they at least should be supported on Linux then. And what happens if some Unix flavor (i.e. Solaris) adds new flag, say O_NONLINUXSYNC and it has the same value as linux's O_ASYNC? And then FreeBSD adds O_BSDSYNC flag with the same number and so on. Then Python will have to have separate system-specific module for each *nix system that uses Python. Why do you think Python maintainers would want that? >It does work if you use the value itself anyway. It's the way fcntl works -- it's just a thin layer on top of fcntl() and ioctl() calls. But that's not a good reason for including non-posix flags to 'posix' module __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 11:25:33 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 16 May 2008 09:25:33 +0000 Subject: [issue2890] O_ASYNC and FASYNC should be defined for *nix systems In-Reply-To: <1210922705.9.0.115557259504.issue2890@psf.upfronthosting.co.za> Message-ID: <1210929932.02.0.753152638499.issue2890@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Platform-specific values are not a problem. On win32 os.O_NOINHERIT == 128, and on linux os.O_EXCL has the same value. Python just exposes the available #defines at the module level. (btw, the posix module is also available on windows. It is named 'nt', but it is really the same module) And in posixmodule.c, There are already some "GNU extensions": os.O_DIRECT, os.O_NOFOLLOW... ---------- nosy: +amaury.forgeotdarc __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 11:30:37 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 09:30:37 +0000 Subject: [issue2870] cmathmodule.c compile error In-Reply-To: <1210887790.81.0.134090801256.issue2870@psf.upfronthosting.co.za> Message-ID: <1210930237.35.0.750301548073.issue2870@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> christian.heimes nosy: +christian.heimes priority: -> critical __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 11:35:04 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 09:35:04 +0000 Subject: [issue2863] Generator __name__ and better repr() In-Reply-To: <1210861511.93.0.62534649214.issue2863@psf.upfronthosting.co.za> Message-ID: <1210930503.98.0.326182581818.issue2863@psf.upfronthosting.co.za> Georg Brandl added the comment: Changed in r63364. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 11:47:44 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 09:47:44 +0000 Subject: [issue2869] Wrong doc for `calendar.Calendar.iterweekdays` In-Reply-To: <1210875257.46.0.726174573952.issue2869@psf.upfronthosting.co.za> Message-ID: <1210931264.0.0.700772502848.issue2869@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r63365. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 12:18:49 2008 From: report at bugs.python.org (daggett) Date: Fri, 16 May 2008 10:18:49 +0000 Subject: [issue2891] urllib not handling ftp servers that do not support REST In-Reply-To: <1210933128.84.0.447091600093.issue2891@psf.upfronthosting.co.za> Message-ID: <1210933128.84.0.447091600093.issue2891@psf.upfronthosting.co.za> New submission from daggett : I reported a bug in fedora bugzilla : https://bugzilla.redhat.com/show_bug.cgi?id=443033 I thought this was an Anaconda (Fedora installer written in Python) error, but someone wrote this is a Python urllib error, so I post it here to be sure this is a Python error or not. The bug is: When downloading a file from an FTP server, it uses the REST command everytime and don't bother to check if the FTP server supports this command. So if the FTP server does not support the REST command, the download just fails and there is no alternative: no mean to download a file. But it should have detected that the FTP server does not support the REST command and try to download using the GET command instead. It happened when net-installing Fedora8 from ftp://ftp.proxad.net which does not support the REST command (for more information, see the URL to the bug I submitted to Fedora Bugzilla). regards, Dag ---------- components: Build messages: 66928 nosy: daggett severity: normal status: open title: urllib not handling ftp servers that do not support REST type: behavior versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 12:23:47 2008 From: report at bugs.python.org (Christian Heimes) Date: Fri, 16 May 2008 10:23:47 +0000 Subject: [issue2870] cmathmodule.c compile error In-Reply-To: <1210887790.81.0.134090801256.issue2870@psf.upfronthosting.co.za> Message-ID: <1210933427.66.0.440960623733.issue2870@psf.upfronthosting.co.za> Christian Heimes added the comment: Fixed in r63366 ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 13:11:25 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Fri, 16 May 2008 11:11:25 +0000 Subject: [issue1251] ssl module doesn't support non-blocking handshakes In-Reply-To: <1191970098.04.0.2942232647.issue1251@psf.upfronthosting.co.za> Message-ID: <1210936285.62.0.129849573051.issue1251@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Thanks, Bill. I was reading 2.6 preview documentation, and nothing is said there. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 13:34:40 2008 From: report at bugs.python.org (Ismail Donmez) Date: Fri, 16 May 2008 11:34:40 +0000 Subject: [issue2890] O_ASYNC and FASYNC should be defined for *nix systems In-Reply-To: <1210922705.9.0.115557259504.issue2890@psf.upfronthosting.co.za> Message-ID: <1210937679.98.0.00678498847028.issue2890@psf.upfronthosting.co.za> Ismail Donmez added the comment: Add O_ASYNC and FASYNC as GNU extensions. ---------- keywords: +patch Added file: http://bugs.python.org/file10341/async.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 13:36:26 2008 From: report at bugs.python.org (Ismail Donmez) Date: Fri, 16 May 2008 11:36:26 +0000 Subject: [issue2890] O_ASYNC and FASYNC should be defined for *nix systems In-Reply-To: <1210922705.9.0.115557259504.issue2890@psf.upfronthosting.co.za> Message-ID: <1210937784.92.0.927997943391.issue2890@psf.upfronthosting.co.za> Ismail Donmez added the comment: Python code already has GNU/Windows only exceptions. Attached patch adds O_ASYNC and FASYNC as GNU extensions. If accepted I can send a complimentary documentation patch. Added file: http://bugs.python.org/file10342/async.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 13:36:49 2008 From: report at bugs.python.org (Ismail Donmez) Date: Fri, 16 May 2008 11:36:49 +0000 Subject: [issue2890] O_ASYNC and FASYNC should be defined for *nix systems In-Reply-To: <1210922705.9.0.115557259504.issue2890@psf.upfronthosting.co.za> Message-ID: <1210937809.37.0.0984096143345.issue2890@psf.upfronthosting.co.za> Changes by Ismail Donmez : Removed file: http://bugs.python.org/file10341/async.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 13:37:04 2008 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 16 May 2008 11:37:04 +0000 Subject: [issue2884] Create the tkinter package In-Reply-To: <1210914608.62.0.531820285886.issue2884@psf.upfronthosting.co.za> Message-ID: <1210937824.51.0.0990721244729.issue2884@psf.upfronthosting.co.za> Guilherme Polo added the comment: I have started doing this at issue 2839, but I need help from someone with available time and commit privs ---------- nosy: +gpolo __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 13:40:29 2008 From: report at bugs.python.org (Ismail Donmez) Date: Fri, 16 May 2008 11:40:29 +0000 Subject: [issue2890] O_ASYNC and FASYNC should be defined if available In-Reply-To: <1210922705.9.0.115557259504.issue2890@psf.upfronthosting.co.za> Message-ID: <1210938029.23.0.168289015953.issue2890@psf.upfronthosting.co.za> Changes by Ismail Donmez : ---------- title: O_ASYNC and FASYNC should be defined for *nix systems -> O_ASYNC and FASYNC should be defined if available __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 14:00:47 2008 From: report at bugs.python.org (Mark Veldhuis) Date: Fri, 16 May 2008 12:00:47 +0000 Subject: [issue2755] IDLE ignores module change before restart In-Reply-To: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za> Message-ID: <1210939246.11.0.930852525238.issue2755@psf.upfronthosting.co.za> Mark Veldhuis added the comment: I think this solves my problem, I took away the -n from the launcher so the command is just "/usr/bin/idle-python2.5". Now Idle does not show the No subprocesses text, and when I press F5 the Python shell displays a line with ====Restart====. I tested my case and the value change in the imported module was recognised as expected. The launcher under applications still gives the no subprocesses version. But for other Ubuntu users the problem may persist, where does the "/usr/bin/idle-python2.5 -n" come from? I installed idle using System-Administration-Synaptic package manager, where I selected Idle-python2.5 I don't know enough about it to say whether the command comes from there or is interpreted somehow during the installation, or some other way. Thank you for your help so far, it makes my Python learning so much easier __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 14:20:36 2008 From: report at bugs.python.org (=?utf-8?q?Hrvoje_Nik=C5=A1i=C4=87?=) Date: Fri, 16 May 2008 12:20:36 +0000 Subject: [issue2892] improve cElementTree iterparse error handling In-Reply-To: <1210940435.5.0.243679200602.issue2892@psf.upfronthosting.co.za> Message-ID: <1210940435.5.0.243679200602.issue2892@psf.upfronthosting.co.za> New submission from Hrvoje Nik?i? : In some cases it is unfortunate that any error in the XML chunk seen by the buffer prevents the events generated before the error from being delivered. For example, in some cases valid XML is embedded in a larger file or stream, and it is useful to be able to ignore text that follows the root tag, if any. The iterparse API and expat itself make this possible, but it doesn't work because in case of a parsing exception, iterparse doesn't deliver the events generated before the exception. A simple change to iterparse makes this possible, however. I would like to share the change with you for possible inclusion in a future release. Note that this change shouldn't affect the semantics of iterparse: the exception is still delivered to the caller, the only difference is that the events generated by expat before the exception are not forgotten. I am attaching a diff between the current implementation of iterparse, and a modified one that fixes this problem. ---------- components: Extension Modules files: patch messages: 66935 nosy: hniksic severity: normal status: open title: improve cElementTree iterparse error handling type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10343/patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 14:46:31 2008 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Fri, 16 May 2008 12:46:31 +0000 Subject: [issue2882] Create the html package In-Reply-To: <1210914377.14.0.176353307506.issue2882@psf.upfronthosting.co.za> Message-ID: <1210941991.03.0.179116102695.issue2882@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- assignee: -> fdrake nosy: +fdrake __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 14:56:29 2008 From: report at bugs.python.org (Kurt B. Kaiser) Date: Fri, 16 May 2008 12:56:29 +0000 Subject: [issue2755] IDLE ignores module change before restart In-Reply-To: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za> Message-ID: <1210942588.96.0.634553923245.issue2755@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: Yes, removing the -n is the way to fix your problem. We went to quite a bit of effort to run user code from scratch on each Run/F5 using the subprocess. Running without the subprocess is considered 'expert' mode these days. (Although it's still used on Windows if the user edits a file via the right click menu - something we hope to fix.) There is a way around your difficulty - it involves using 'reload', but I didn't want to tell you about that too soon :-) Now I need to look at Debian/Ubuntu to find out why the switch was added. I run Debian, but not Ubuntu, and I use the command line pretty exclusively, so it didn't bite me. If this is the way the IDLE package is configured, I'm surprised the issue hasn't been reported previously. Thanks for the report! ---------- assignee: -> kbk __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 15:07:31 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 13:07:31 +0000 Subject: [issue2892] improve cElementTree iterparse error handling In-Reply-To: <1210940435.5.0.243679200602.issue2892@psf.upfronthosting.co.za> Message-ID: <1210943251.03.0.766854575499.issue2892@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> effbot nosy: +effbot __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 15:10:36 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 13:10:36 +0000 Subject: [issue2890] O_ASYNC and FASYNC should be defined if available In-Reply-To: <1210922705.9.0.115557259504.issue2890@psf.upfronthosting.co.za> Message-ID: <1210943436.05.0.296542421763.issue2890@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, committed patch in r63368. Thanks! ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 15:12:55 2008 From: report at bugs.python.org (Ismail Donmez) Date: Fri, 16 May 2008 13:12:55 +0000 Subject: [issue2890] O_ASYNC and FASYNC should be defined if available In-Reply-To: <1210922705.9.0.115557259504.issue2890@psf.upfronthosting.co.za> Message-ID: <1210943575.61.0.727983968039.issue2890@psf.upfronthosting.co.za> Ismail Donmez added the comment: Thanks, can you also apply to py3k branch? :) __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 15:15:08 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 13:15:08 +0000 Subject: [issue2890] O_ASYNC and FASYNC should be defined if available In-Reply-To: <1210922705.9.0.115557259504.issue2890@psf.upfronthosting.co.za> Message-ID: <1210943708.37.0.0100615937977.issue2890@psf.upfronthosting.co.za> Georg Brandl added the comment: That will happen automatically. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 15:16:17 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 13:16:17 +0000 Subject: [issue2867] curses-howto link in curses module documentation gives a 404 In-Reply-To: <1210870990.17.0.248799344481.issue2867@psf.upfronthosting.co.za> Message-ID: <1210943777.69.0.262060773385.issue2867@psf.upfronthosting.co.za> Georg Brandl added the comment: Especially with the rollover to the new docs. When both trunk and stable version have the same base again, I'll continue backporting doc changes as usual. ---------- resolution: -> wont fix status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 15:19:01 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 13:19:01 +0000 Subject: [issue2845] shutil.copy2() copies permission bits In-Reply-To: <1210714130.89.0.107453943261.issue2845@psf.upfronthosting.co.za> Message-ID: <1210943941.27.0.749285413116.issue2845@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r63369. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 15:30:19 2008 From: report at bugs.python.org (Ismail Donmez) Date: Fri, 16 May 2008 13:30:19 +0000 Subject: [issue2890] O_ASYNC and FASYNC should be defined if available In-Reply-To: <1210922705.9.0.115557259504.issue2890@psf.upfronthosting.co.za> Message-ID: <1210944619.73.0.987049147111.issue2890@psf.upfronthosting.co.za> Ismail Donmez added the comment: Documentation patch is added too. Added file: http://bugs.python.org/file10344/async-doc.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 15:35:25 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 13:35:25 +0000 Subject: [issue1574217] isinstance swallows exceptions Message-ID: <1210944925.82.0.579101436086.issue1574217@psf.upfronthosting.co.za> Georg Brandl added the comment: There are more locations in abstract.c where exceptions are unconditionally masked after a GetAttr operation: * line 1630, 1717 in PyNumber_{Long,Int} when looking for .__trunc__ * line 2932, in PyObject_IsInstance ---------- nosy: +benjamin.peterson, georg.brandl _____________________________________ Tracker _____________________________________ From report at bugs.python.org Fri May 16 15:36:59 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 13:36:59 +0000 Subject: [issue2794] Figure directive not handled for latex writing in Sphinx In-Reply-To: <1210277486.1.0.0867984749288.issue2794@psf.upfronthosting.co.za> Message-ID: <1210945019.24.0.154038983681.issue2794@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, committed as r63372. ---------- resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 15:42:04 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 13:42:04 +0000 Subject: [issue2890] O_ASYNC and FASYNC should be defined if available In-Reply-To: <1210922705.9.0.115557259504.issue2890@psf.upfronthosting.co.za> Message-ID: <1210945323.21.0.184766290223.issue2890@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, applied in r63373. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 16:13:25 2008 From: report at bugs.python.org (David Binger) Date: Fri, 16 May 2008 14:13:25 +0000 Subject: [issue2893] dict.has_key() expected in h2py.py. In-Reply-To: <1210947204.94.0.6947477076.issue2893@psf.upfronthosting.co.za> Message-ID: <1210947204.94.0.6947477076.issue2893@psf.upfronthosting.co.za> New submission from David Binger : The h2py.py script is invoked at the end of "make install" on OS X. It raises an exception on the line where dict.has_key() is called. (There seem to be many calls to has_key() in the current 3.0 tree. I bet there are other cases like this one.) ---------- components: Installation messages: 66946 nosy: dbinger severity: normal status: open title: dict.has_key() expected in h2py.py. type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 16:47:22 2008 From: report at bugs.python.org (Juracy Filho) Date: Fri, 16 May 2008 14:47:22 +0000 Subject: [issue2883] Create the http package In-Reply-To: <1210914446.04.0.852197194543.issue2883@psf.upfronthosting.co.za> Message-ID: <1210949242.42.0.242277724863.issue2883@psf.upfronthosting.co.za> Changes by Juracy Filho : ---------- nosy: +juracy __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 16:48:41 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 16 May 2008 14:48:41 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1210949320.22.0.487138765065.issue2819@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's (msum.py) an example in Python of one fairly straightforward way of dealing with overflow correctly, without needing more than one pass through the data, and without significant slowdown in the normal case. (The Python code is needlessly inefficient in places, notably in that partials[1:] creates a new list; this is obviously not a problem in C.) The idea is essentially just to maintain the sum modulo integer multiples of 2.**1024. partials[0] is reserved for keeping track of the current multiple of 2.**!024. So at each stage, the sum so far is sum(partials[1:], 0.0) + 2.**1024 * partials[0]. I'm 97.3% convinced that the proof of correctness goes through: it's still true with this modification that partials always consists of nonadjacent, nonzero values of increasing magnitude. One of the keys to proving this is to note that for any value x between 2**1023 and 2**1024, both x-2**1023 and x-2**1024 are exactly representable. --- There's one more 'nice-to-have' that I think should be considered: it would be nice if the result of msum were always correctly rounded. One aspect of correct rounding is that it provides a guarantee that the sum is independent of the order of the summands, so msum(list) == msum(sorted(list)) would hold true. Added file: http://bugs.python.org/file10345/msum.py __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 17:08:04 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 16 May 2008 15:08:04 +0000 Subject: [issue2664] The position of special value tables (cmathmodule.c) In-Reply-To: <1208738562.06.0.91336742493.issue2664@psf.upfronthosting.co.za> Message-ID: <1210950484.71.0.580939906231.issue2664@psf.upfronthosting.co.za> Mark Dickinson added the comment: I agree that having lines >= 80 characters long is ugly (and violates PEP 7). But I think this particular case falls under the 'rules are made to be broken' comment at the start of PEP 7. I like the fact that if you squint at the tables hard enough, each one looks almost like a copy of the complex plane. :-). ---------- resolution: -> wont fix status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 17:29:46 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 15:29:46 +0000 Subject: [issue2734] 2to3 converts long(itude) argument to int In-Reply-To: <1209669660.53.0.857681626906.issue2734@psf.upfronthosting.co.za> Message-ID: <1210951785.38.0.710530908607.issue2734@psf.upfronthosting.co.za> Georg Brandl added the comment: Let me note that this also happens for assignments like: long = Type("long", "l") ---------- nosy: +georg.brandl __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 17:37:44 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 15:37:44 +0000 Subject: [issue2894] 2to3 discards comments before import statements In-Reply-To: <1210952262.85.0.552260999958.issue2894@psf.upfronthosting.co.za> Message-ID: <1210952262.85.0.552260999958.issue2894@psf.upfronthosting.co.za> New submission from Georg Brandl : I got this diff from Tools/freeze/freeze.py: - - -# Import the freeze-private modules - -import checkextensions -import makeconfig -import makefreeze -import makemakefile -import parsesetup -import bkfile +from . import checkextensions +from . import makeconfig +from . import makefreeze +from . import makemakefile +from . import parsesetup +from . import bkfile ---------- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) messages: 66950 nosy: collinwinter, georg.brandl severity: normal status: open title: 2to3 discards comments before import statements type: behavior __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 17:44:46 2008 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 16 May 2008 15:44:46 +0000 Subject: [issue2839] Moving lib-tk to tkinter package In-Reply-To: <1210615239.35.0.359819643531.issue2839@psf.upfronthosting.co.za> Message-ID: <1210952686.62.0.695564927818.issue2839@psf.upfronthosting.co.za> Guilherme Polo added the comment: New patch, this one does the following: * Fix tkinter imports in idlelib, pydoc and Canvas (deprecated) * Creates stub modules for all old Tkinter modules, except tkFileDialog and tkSimpleDialog * Updates test_py3kwarn for all these renames What is missing now: * Merging tkSimpleDialog into tkinter.simpledialog and tkFileDialog into tkinter.filedialog, I believe this should be done using svn merge and then correct the result a bit. * Update docs Added file: http://bugs.python.org/file10346/tkinter_step2.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 17:48:49 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 15:48:49 +0000 Subject: [issue2839] Moving lib-tk to tkinter package In-Reply-To: <1210615239.35.0.359819643531.issue2839@psf.upfronthosting.co.za> Message-ID: <1210952929.43.0.597522470396.issue2839@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed step 2 patch as r63376. ---------- nosy: +georg.brandl __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 17:54:17 2008 From: report at bugs.python.org (Jean Brouwers) Date: Fri, 16 May 2008 15:54:17 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1210953257.48.0.0107926891639.issue2819@psf.upfronthosting.co.za> Changes by Jean Brouwers : Removed file: http://bugs.python.org/file10306/unnamed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 17:57:23 2008 From: report at bugs.python.org (Jean Brouwers) Date: Fri, 16 May 2008 15:57:23 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1210953443.12.0.731243984534.issue2819@psf.upfronthosting.co.za> Jean Brouwers added the comment: Two tests failed with Python 2.6a3 on MacOS X Intel. Test 11 failed: 9007199254740992.0 vs 9007199254740991.0 expected for [9007199254740992.0, -0.5, -5.5511151231257827e-17]. Test 12 failed: inf vs 1.7976931348623157e+308 expected for [8.9884656743115785e+307, -1.0, 8.9884656743115795e+307]. /Jeab Brouwers Added file: http://bugs.python.org/file10347/msum3.py __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 18:03:20 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 16 May 2008 16:03:20 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1210953800.28.0.989903838132.issue2819@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Test 11 failed: 9007199254740992.0 vs 9007199254740991.0 expected for > [9007199254740992.0, -0.5, -5.5511151231257827e-17]. Yes: that's the lack of correct rounding rearing its ugly head... > Test 12 failed: inf vs 1.7976931348623157e+308 expected for > [8.9884656743115785e+307, -1.0, 8.9884656743115795e+307]. I'm still trying to work out how to get around this one; again, the result's not out by much, but it would be nice to be able to guarantee correctly rounded answers *all* the time, instead of just *most* of the time. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 18:08:31 2008 From: report at bugs.python.org (Facundo Batista) Date: Fri, 16 May 2008 16:08:31 +0000 Subject: [issue2885] Create the urllib package In-Reply-To: <1210914691.08.0.848288242706.issue2885@psf.upfronthosting.co.za> Message-ID: <1210954111.33.0.00046249396723.issue2885@psf.upfronthosting.co.za> Changes by Facundo Batista : ---------- nosy: +facundobatista __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 18:48:45 2008 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 16 May 2008 16:48:45 +0000 Subject: [issue2839] Moving lib-tk to tkinter package In-Reply-To: <1210615239.35.0.359819643531.issue2839@psf.upfronthosting.co.za> Message-ID: <1210956525.23.0.916587466585.issue2839@psf.upfronthosting.co.za> Guilherme Polo added the comment: Patching for updating the docs added. I've also added a script that should be executed after the patch is applied, it will rename scrolledtext.rst to tkinter.scrolledtext.rst; tix.rst to tkinter.rst and turtle.rst to tkinter.turtle.rst. Added file: http://bugs.python.org/file10348/tkinter_doc_updates.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 18:49:09 2008 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 16 May 2008 16:49:09 +0000 Subject: [issue2839] Moving lib-tk to tkinter package In-Reply-To: <1210615239.35.0.359819643531.issue2839@psf.upfronthosting.co.za> Message-ID: <1210956549.33.0.466730143293.issue2839@psf.upfronthosting.co.za> Changes by Guilherme Polo : Added file: http://bugs.python.org/file10349/rename_tkdocs.py __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 19:03:01 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 17:03:01 +0000 Subject: [issue2893] dict.has_key() expected in h2py.py. In-Reply-To: <1210947204.94.0.6947477076.issue2893@psf.upfronthosting.co.za> Message-ID: <1210957381.6.0.962217900333.issue2893@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed, among with all other files in Tools/, in r63378. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 19:17:05 2008 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 16 May 2008 17:17:05 +0000 Subject: [issue2839] Moving lib-tk to tkinter package In-Reply-To: <1210615239.35.0.359819643531.issue2839@psf.upfronthosting.co.za> Message-ID: <1210958225.32.0.00235523443147.issue2839@psf.upfronthosting.co.za> Guilherme Polo added the comment: After merging all these changes in py3k, lib-tk should be removed from sys.path there. Patch added for this. Note that the iss script at PC/VS7.1 should be regenerated Added file: http://bugs.python.org/file10350/remove_libtk_path.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 19:19:22 2008 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 16 May 2008 17:19:22 +0000 Subject: [issue2895] Crash in ParseTupleAndKeywords when passing byte string keywords In-Reply-To: <1210958362.57.0.837653467098.issue2895@psf.upfronthosting.co.za> Message-ID: <1210958362.57.0.837653467098.issue2895@psf.upfronthosting.co.za> New submission from Stefan Behnel : Using 3.0a5, the following code crashes in vgetargskeywords (getargs.c:1542) >>> d = {b"encoding": "abc"} >>> str(b"abc", **d) It should raise a TypeError instead, i.e. line 1535 should read if (!PyUnicode_Check(key)) { instead of if (!PyString_Check(key) && !PyUnicode_Check(key)) { ---------- components: Interpreter Core messages: 66958 nosy: scoder severity: normal status: open title: Crash in ParseTupleAndKeywords when passing byte string keywords type: crash versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 19:24:23 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Fri, 16 May 2008 17:24:23 +0000 Subject: [issue2858] bsddb.db.DBEnv.lock_get test_lock.test03_set_timeout crashes In-Reply-To: <1210828209.22.0.850566546074.issue2858@psf.upfronthosting.co.za> Message-ID: <1210958663.62.0.0103550250985.issue2858@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Neal Norwitz did a patch for this. Hope it solves this issue. Neal, please, post the svn r number. ---------- nosy: +nnorwitz __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 19:29:11 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 17:29:11 +0000 Subject: [issue2895] Crash in ParseTupleAndKeywords when passing byte string keywords In-Reply-To: <1210958362.57.0.837653467098.issue2895@psf.upfronthosting.co.za> Message-ID: <1210958951.33.0.280758744832.issue2895@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, added a test and fixed in r63379. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 19:38:33 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 May 2008 17:38:33 +0000 Subject: [issue2884] Create the tkinter package In-Reply-To: <1210914608.62.0.531820285886.issue2884@psf.upfronthosting.co.za> Message-ID: <1210959513.41.0.646998307342.issue2884@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> duplicate status: open -> closed superseder: -> Moving lib-tk to tkinter package __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 20:05:12 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 16 May 2008 18:05:12 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1210961112.49.0.139251429773.issue2775@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Quentin Gallet-Gilles wrote: > I've found some places where configparser, copyreg, queue and > socketserver haven't been renamed. The attached patch > 'renaming_leftovers_2.6.patch' corrects this. Thanks! Applied in r63384. ---------- nosy: +alexandre.vassalotti __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 20:15:47 2008 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_JEANNENOT?=) Date: Fri, 16 May 2008 18:15:47 +0000 Subject: [issue2896] cmathmodule.c compilation error In-Reply-To: <1210961747.58.0.40976494617.issue2896@psf.upfronthosting.co.za> Message-ID: <1210961747.58.0.40976494617.issue2896@psf.upfronthosting.co.za> New submission from St?phane JEANNENOT : Build infos : Python 3.0a5+ (py3k:63383, May 16 2008, 19:58:25) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 Build options : ./configure --with-fpectl --with-wctype-functions --with-pymalloc --with-doc-strings --with-threads --with-signal-module --with-system-ffi Same bug as issue 2870, certainly same correction ! ---------- components: Extension Modules messages: 66962 nosy: Juno, christian.heimes severity: normal status: open title: cmathmodule.c compilation error type: compile error versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 20:56:33 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 16 May 2008 18:56:33 +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: <1210964193.6.0.784837134166.issue2874@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Brett wrote: > This will require moving over to using the named tuple features of > os.stat() along with adding methods to the object that the stat module > has as functions. How do you add new methods to a PyStructSequence? ---------- nosy: +alexandre.vassalotti __________________________________ Tracker __________________________________ From brett at python.org Fri May 16 21:20:51 2008 From: brett at python.org (Brett Cannon) Date: Fri, 16 May 2008 12:20:51 -0700 Subject: [issue2874] Remove use of the stat module in the stdlib In-Reply-To: <1210964193.6.0.784837134166.issue2874@psf.upfronthosting.co.za> References: <1210913145.44.0.456986373707.issue2874@psf.upfronthosting.co.za> <1210964193.6.0.784837134166.issue2874@psf.upfronthosting.co.za> Message-ID: On Fri, May 16, 2008 at 11:56 AM, Alexandre Vassalotti wrote: > > Alexandre Vassalotti added the comment: > > Brett wrote: >> This will require moving over to using the named tuple features of >> os.stat() along with adding methods to the object that the stat module >> has as functions. > > How do you add new methods to a PyStructSequence? > No clue. =) Might not be doable. In the end a custom class might be needed that supports indexes. From report at bugs.python.org Fri May 16 21:21:00 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 16 May 2008 19:21:00 +0000 Subject: [issue2874] Remove use of the stat module in the stdlib In-Reply-To: <1210964193.6.0.784837134166.issue2874@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Fri, May 16, 2008 at 11:56 AM, Alexandre Vassalotti wrote: > > Alexandre Vassalotti added the comment: > > Brett wrote: >> This will require moving over to using the named tuple features of >> os.stat() along with adding methods to the object that the stat module >> has as functions. > > How do you add new methods to a PyStructSequence? > No clue. =) Might not be doable. In the end a custom class might be needed that supports indexes. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 21:44:16 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 16 May 2008 19:44:16 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1210967055.1.0.134989432087.issue2819@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ensuring correct rounding isn't as onerous as I expected it to be. crsum.py is a snippet of Python code showing how to add nonadjacent floats and get the correctly rounded result. Added file: http://bugs.python.org/file10351/crsum.py __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 22:13:59 2008 From: report at bugs.python.org (Thomas Heller) Date: Fri, 16 May 2008 20:13:59 +0000 Subject: [issue1793] ctypes.util.find_msvcrt() function In-Reply-To: <1200063578.88.0.774833430715.issue1793@psf.upfronthosting.co.za> Message-ID: <1210968839.13.0.25937751007.issue1793@psf.upfronthosting.co.za> Thomas Heller added the comment: Committed in trunk as rev. 63395. I've changed the code that Amaury suggested so that None is returned when get_build_version() returns None. Thanks. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 16 23:51:23 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 16 May 2008 21:51:23 +0000 Subject: [issue689895] Imports can deadlock Message-ID: <1210974683.04.0.787429425824.issue689895@psf.upfronthosting.co.za> Changes by Adam Olsen : ---------- nosy: +Rhamphoryncus ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 17 00:09:20 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 16 May 2008 22:09:20 +0000 Subject: [issue2896] cmathmodule.c compilation error In-Reply-To: <1210961747.58.0.40976494617.issue2896@psf.upfronthosting.co.za> Message-ID: <1210975760.57.0.647518515377.issue2896@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Christian, this was fixed right? ---------- assignee: -> christian.heimes nosy: +benjamin.peterson priority: -> high __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 00:20:31 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 16 May 2008 22:20:31 +0000 Subject: [issue1489051] keyword and topic help broken in Pythonwin IDE Message-ID: <1210976431.66.0.181763115851.issue1489051@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Py3.0a5 installed in C;/Program Files/ Start/Python30/Python Manuals, using Python30.chm, works great. Thank you for that. In the interpreter (and IDLE) help(object) works fine. Ditto. But for topics and keywords, I got the same message as the OP. Opinion: After 2 years, I think the priority of this issue should be raised: help should 'just work' as installed, especially on Windows. Until is does, the instructions need to be improved so that normal users and Python beginners, and not just DOS/Windows experts, can fix it. The instruction ''' On the Microsoft Windows operating system, the files can be built by running "hh -decompile . PythonNN.chm" in the C:\PythonNN\Doc> directory.''' makes several assumptions about knowledge that many do not have. Since a running Python knows its version and starting location, it should make the implied substitutions itself. With that done, here are two possible interpretations of 'run... in..." 1. '''Open Start/Run, enter "hh -decompile . C:/Program Files/Python30/Doc/Python30.chm" in the box, and click OK'''. [Since I did not try this, I do not really know if this will put the result in the right place.] 2. '''Open Start/All programs/Accessories/Command Prompt, enter "cd C:/Program Files/Python30/Doc", enter "dir" to check that Python30.chm is present, enter "hh -decompile . Python30.chm", and enter "dir' again and you should see several new files and directories.''' I suspect that very few of additions are needed by help() for topics and keywords. If I am correct, then instead of a complete decompile,... Suggestion 1a (permanent): When installing on Windows, include in /Doc the minimum html files needed by help() so no decompile is needed. Suggestion 1b (interim): expand instructions as indicated above. After closing and restarting Python, I still got the same error message. I assumed "because the Python HTML documentation files could not be found. If you have installed them, please set the environment variable PYTHONDOCS to indicate their location." indicated the problem. But what should one do with more than one version of Python present, which is or will be normal for most who install 3.0. Suggeston 2a (permanent): help should just look in the default location for the version it is running on. Or it should set its own copy on first use. Or the interpreter should. Suggestion 2b (interim): give details on how to set an e.v. Python is the first Windows XP program I can remember that asked me to do this. XP procedure: To set for all users, switch to admin account. Open Start/Control Panel/System. Click Advanced tab and Environment Variables button. For all users, add a System variable. Otherwise, add a User variable. In either case, set PYTHONDOCS to "C:\Program Files\Python30\Doc" However, after I did this, I restarted Python, and listed os.environ.items() to verify ('PYTHONDOCS', 'C:\\Program Files\\Python30\\Doc'). However help still does not work. ????? ---------- nosy: +tjreedy _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 17 00:30:29 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 16 May 2008 22:30:29 +0000 Subject: [issue1574217] isinstance swallows exceptions Message-ID: <1210977029.56.0.919152323323.issue1574217@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'd like to clarify the approach to fixing these types of problems. I fixed a issue (#2196) like this by only propagating exceptions that didn't descend from Exception because of this sentence in the hasattr docs: This is implemented by calling getattr(object, name) and seeing whether it raises an exception or not.) However, I like constricting it to AttributeError only as that would make it much less confusing. This might be something to bring up on python-dev. _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 17 00:35:27 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 16 May 2008 22:35:27 +0000 Subject: [issue2750] Add simplejson to Python 2.6/3.0 standard library In-Reply-To: <1209851575.56.0.265185398375.issue2750@psf.upfronthosting.co.za> Message-ID: <1210977327.22.0.0887373997237.issue2750@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Let's see: 1. Fix up and add to trunk. Check! 2. Convert docs to reST. Check! 3. Port to 3.0. Check! 4. Fix docs in 3.0. Check! Yes, we can close this. ---------- resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 00:36:48 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 16 May 2008 22:36:48 +0000 Subject: [issue1489051] keyword and topic help broken in Pythonwin IDE In-Reply-To: <1210976431.66.0.181763115851.issue1489051@psf.upfronthosting.co.za> Message-ID: <482E0C7A.8030705@v.loewis.de> Martin v. L?wis added the comment: > Opinion: After 2 years, I think the priority of this issue should be > raised: help should 'just work' as installed, especially on Windows. > Until is does, the instructions need to be improved so that normal users > and Python beginners, and not just DOS/Windows experts, can fix it. Counter-opinion: contributions are welcome. Raising the priority does NOTHING to accelerate the processing. The effecting of raisig it a little is zero; the effect of raising it much is that it gets lowered if it remains unresolved an a release approaches. > However, after I did this, I restarted Python, and listed > os.environ.items() to verify ('PYTHONDOCS', 'C:\\Program > Files\\Python30\\Doc'). However help still does not work. ????? Without checking: it's most likely that the actual HTML file names have changed in 2.6, so that the interactive invocation of HTML pages would work on no system. Either you provide a fix, or it remains unfixed until somebody provides a fix. Unassigning myself, as I will have no time to work on this in the coming months. _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 17 00:37:16 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 16 May 2008 22:37:16 +0000 Subject: [issue1489051] keyword and topic help broken in Pythonwin IDE Message-ID: <1210977436.29.0.428039148125.issue1489051@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- assignee: loewis -> _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 17 00:45:13 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 16 May 2008 22:45:13 +0000 Subject: [issue2897] include structmember.h in Python.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> New submission from Benjamin Peterson : As the comment in descrobject.c says: /* Why is this not included in Python.h? */ ---------- messages: 66972 nosy: benjamin.peterson severity: normal status: open title: include structmember.h in Python.h type: feature request __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 00:45:28 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 16 May 2008 22:45:28 +0000 Subject: [issue2897] include structmember.h in Python.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1210977928.31.0.00400486695864.issue2897@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- components: +Interpreter Core versions: +Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 01:33:10 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 16 May 2008 23:33:10 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1210980789.88.0.728549021476.issue2848@psf.upfronthosting.co.za> Benjamin Peterson added the comment: mimetools.Message is compatible with email.message.Message, right? ---------- nosy: +barry, benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 02:02:12 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 17 May 2008 00:02:12 +0000 Subject: [issue1362475] Text.edit_modified() doesn't work Message-ID: <1210982531.81.0.902181462188.issue1362475@psf.upfronthosting.co.za> Guilherme Polo added the comment: This bug still exists, I'm attaching a patch against current python-trunk. This patch is based on the fact that documentation tk 8.4 (version which edit command was added) and tk 8.5 says only edit_modified is supposed to return something, which is either 0 or 1, so there was no reason to use _gettints on that tk.call, and returning an empty tuple is against the expected value, 0. ---------- keywords: +patch nosy: +gpolo Added file: http://bugs.python.org/file10352/edit_modified.diff _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 17 08:13:27 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 17 May 2008 06:13:27 +0000 Subject: [issue2858] bsddb.db.DBEnv.lock_get test_lock.test03_set_timeout crashes In-Reply-To: <1210828209.22.0.850566546074.issue2858@psf.upfronthosting.co.za> Message-ID: <1211004807.63.0.0659080773145.issue2858@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I submitted a patch from Neal Norwitz after jcea reviewed it to trunk as r63403. I'll take care of backporting it to release25-maint. ---------- assignee: jcea -> gregory.p.smith versions: -Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 08:47:05 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 17 May 2008 06:47:05 +0000 Subject: [issue2858] bsddb.db.DBEnv.lock_get test_lock.test03_set_timeout crashes In-Reply-To: <1210828209.22.0.850566546074.issue2858@psf.upfronthosting.co.za> Message-ID: <1211006825.27.0.29940559677.issue2858@psf.upfronthosting.co.za> Gregory P. Smith added the comment: r63404 in release25-maint. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 08:54:51 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 17 May 2008 06:54:51 +0000 Subject: [issue1275] bsddb closing a DB object before all DBCursors using it are closed crashes In-Reply-To: <1192216802.58.0.956972286502.issue1275@psf.upfronthosting.co.za> Message-ID: <1211007291.44.0.640074864634.issue1275@psf.upfronthosting.co.za> Gregory P. Smith added the comment: This is fixed in trunk now that jcea has done his merge. If anyone wants it fixed in release25-maint it'll need a volunteer to backport just the bugfix parts without the bsddb 4.6.x feature additions. ---------- assignee: gregory.p.smith -> jcea priority: normal -> low versions: -Python 2.4, Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 08:55:55 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 17 May 2008 06:55:55 +0000 Subject: [issue1397] mysteriously failing test_bsddb3 threading test in other threads In-Reply-To: <1194352164.91.0.707733802252.issue1397@psf.upfronthosting.co.za> Message-ID: <1211007354.79.0.801464174692.issue1397@psf.upfronthosting.co.za> Gregory P. Smith added the comment: does this still apply to the current test suite Jesus? ---------- assignee: gregory.p.smith -> jcea __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 08:57:42 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 17 May 2008 06:57:42 +0000 Subject: [issue1010645] bsddb3 testsuite failure when running more than one time Message-ID: <1211007462.04.0.78498978708.issue1010645@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I believe this was finally cleaned up. There are still changes to be made to the current test suite (blindly using a directory under /tmp and not cleaning it up afterwards is bad) but the actual bug this refers to was fixed. ---------- resolution: -> fixed status: open -> closed _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 17 09:01:10 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 17 May 2008 07:01:10 +0000 Subject: [issue834461] simple bsddb interface potential for deadlock with threads Message-ID: <1211007670.44.0.217871412588.issue834461@psf.upfronthosting.co.za> Gregory P. Smith added the comment: This bug was created to track my FIXME in the code. Nobody else has commented on it. I doubt its an issue worth fixing. It is a valid FIXME but I'm marking it as low priority and leaving it unassigned just to track the issue incase someone actually does want to improve the legacy/simple bsddb interface. ---------- assignee: gregory.p.smith -> priority: normal -> low ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 17 09:01:59 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 17 May 2008 07:01:59 +0000 Subject: [issue1391] Adds the .compact() method to bsddb db.DB objects In-Reply-To: <1194227398.84.0.43254190344.issue1391@psf.upfronthosting.co.za> Message-ID: <1211007719.0.0.735802242394.issue1391@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Jesus is the bsddb maintainer now. ---------- assignee: gregory.p.smith -> jcea __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 09:04:41 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 17 May 2008 07:04:41 +0000 Subject: [issue1215023] bsddb dbobj.DB.associate doesn't accept dbobj.DB param Message-ID: <1211007881.02.0.291200000761.issue1215023@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I think the workaround proposed in my email in this bug is sufficient. Blindly letting associate work on python wrapped overridden objects such that the underlying library doesn't call into the wrapper could confuse people. ---------- resolution: -> wont fix status: open -> closed _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 17 09:12:40 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 17 May 2008 07:12:40 +0000 Subject: [issue2587] PyString_FromStringAndSize() to be considered unsafe In-Reply-To: <1207669747.73.0.910333357226.issue2587@psf.upfronthosting.co.za> Message-ID: <1211008359.23.0.401315848617.issue2587@psf.upfronthosting.co.za> Gregory P. Smith added the comment: the redundant asserts were removed. reclosing. further discussion on signedness issues in the code base should take place on the mailing list, future bugs or peps as appropriate. ---------- status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 09:14:55 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 17 May 2008 07:14:55 +0000 Subject: [issue2632] performance problem in socket._fileobject.read In-Reply-To: <1208197816.87.0.564994342754.issue2632@psf.upfronthosting.co.za> Message-ID: <1211008495.58.0.865949076721.issue2632@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I'm going to let the committed change bake in Python trunk for a beta release or two before backporting it to release25-maint. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 09:17:57 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 17 May 2008 07:17:57 +0000 Subject: [issue2381] test_subprocess fails if your sys.executable is on a path with a space in it In-Reply-To: <1205813955.12.0.0111122307325.issue2381@psf.upfronthosting.co.za> Message-ID: <1211008677.02.0.658257338354.issue2381@psf.upfronthosting.co.za> Gregory P. Smith added the comment: fixed in trunk r63405 ---------- priority: -> normal resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 10:26:58 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 17 May 2008 08:26:58 +0000 Subject: [issue2896] cmathmodule.c compilation error In-Reply-To: <1210961747.58.0.40976494617.issue2896@psf.upfronthosting.co.za> Message-ID: <1211012817.79.0.1994540412.issue2896@psf.upfronthosting.co.za> Georg Brandl added the comment: It would be a good thing to paste the exact error message from the compiler. ---------- nosy: +georg.brandl __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 10:38:33 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 17 May 2008 08:38:33 +0000 Subject: [issue2896] cmathmodule.c compilation error In-Reply-To: <1210961747.58.0.40976494617.issue2896@psf.upfronthosting.co.za> Message-ID: <1211013513.12.0.244378763194.issue2896@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Hello. This issue seems to be fixed by r63385. (alexandre.vassalotti's merge) ---------- nosy: +ocean-city __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 12:24:38 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 17 May 2008 10:24:38 +0000 Subject: [issue2896] cmathmodule.c compilation error In-Reply-To: <1210961747.58.0.40976494617.issue2896@psf.upfronthosting.co.za> Message-ID: <1211019876.72.0.0974123712718.issue2896@psf.upfronthosting.co.za> Georg Brandl added the comment: Ah, it wasn't merged yet. So this can be closed. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 12:44:32 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Sat, 17 May 2008 10:44:32 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> New submission from Robert Schuppenies : I propose a patch which allows to query the memory footprint of an object. Calling 'footprint(o)', a python developer can retrieve the size of any python object. Only the size of the object itself will be returned, the size of any referenced objects will be ignored. The patch implements a generic function to compute the object size. This works in most, but a few cases. One of these exceptions is the dictionary with its particular table implementation. Such cases can be handled by implementing an optional method in C. This would also be the case for third-party implementations with unusual type definitions. One advantage with this approach is that the object size can be computed at the level an object is allocated, not requiring complex computations and considerations on higher levels. I am not completely happy with the name 'footprint', but think using 'sizeof' would be confused with plain 'size', and 'memory_usage' was somewhat too long to be typed conveniently. Current test pass on linux32 and linux64, but the test suite is not complete, yet. This patch is part of my Google Summer of Code project on Python memory profiling (http://code.google.com/soc/2008/psf/appinfo.html?csaid=13F0E9C8B6E064EF). Also, this is my first patch, so please let me know where missed something, did not follow coding conventions, or made wrong assumptions. ---------- components: Interpreter Core files: footprint.patch keywords: patch messages: 66989 nosy: okkoto severity: normal status: open title: Add memory footprint query type: feature request versions: Python 2.6 Added file: http://bugs.python.org/file10353/footprint.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 12:50:25 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 17 May 2008 10:50:25 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1211021423.8.0.630490978124.issue2898@psf.upfronthosting.co.za> Georg Brandl added the comment: Can't you write this as a simple Python function using type.__basicsize__ and type.__itemsize__? In any case, if this is added somewhere it should not be a builtin. This operation is nowhere near the usefulness to be one. ---------- nosy: +georg.brandl __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 13:00:30 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Sat, 17 May 2008 11:00:30 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1211022029.77.0.684293335319.issue2898@psf.upfronthosting.co.za> Robert Schuppenies added the comment: > Can't you write this as a simple Python function using > type.__basicsize__ and type.__itemsize__? Yes, it would be possible and has been done, e.g. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/546530. The problem is though, that it requires handling of all special cases externally. Any changes need to be addressed separately and unknown type definitions cannot be addressed at all. Also I figured the programmer implementing a type would know best about its size. Another point is different architectures which result in different object sizes. > In any case, if this is added somewhere it should not be a builtin. What place would you consider to be appropriate? __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 13:02:45 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 17 May 2008 11:02:45 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1211022165.42.0.971243677479.issue2898@psf.upfronthosting.co.za> Georg Brandl added the comment: Such implementation-specific things usually went into the sys module. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 14:30:17 2008 From: report at bugs.python.org (Haoyu Bai) Date: Sat, 17 May 2008 12:30:17 +0000 Subject: [issue2899] Fixes find, rfind, etc in 'string' module In-Reply-To: <1211027417.56.0.456898655973.issue2899@psf.upfronthosting.co.za> Message-ID: <1211027417.56.0.456898655973.issue2899@psf.upfronthosting.co.za> New submission from Haoyu Bai : Functions like find() rfind() index() rindex() has been removed in Python 3.0. So there should be a 2to3 fix for it. Eg. fix if string.find(s, "hello") >= 0: to if str.find(s, "hello") >= 0: Thank you! ---------- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) messages: 66993 nosy: bhy, collinwinter severity: normal status: open title: Fixes find, rfind, etc in 'string' module type: feature request versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 15:46:50 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 17 May 2008 13:46:50 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1211032009.49.0.6289145402.issue2898@psf.upfronthosting.co.za> Martin v. L?wis added the comment: It's actually not possible, in general, to compute the memory consumption of an object using basicsize and itemsize. An example is the dictionary, where there is no way to find out how many slots are currently allocated. Even for the things such as lists where the formula basicsize+len*itemsize would be correct it may fail, e.g. a list reports its itemsize as zero, even though each list item consumes four bytes (on a 32-bit system). I don't really see a problem with calling it sizeof, so I would then propose sys.sizeof as the appropriate location. ---------- nosy: +loewis __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 15:55:07 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 17 May 2008 13:55:07 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1211032506.53.0.362158166003.issue2898@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Proposals like this have been rejected in the past. Memory consumption is an evasive concept. Lists over-allocate space, there are freelists, there are immortal objects, the python memory allocator may hang-on to space thought to be available, the packing and alignment of structures varies across implementations, the system memory allocator may assign much larger chunks than are needed for a single object, and the memory may not be freed back to the system. Because of these issues, it is not that meaningful to say the object x consumes y bytes. ---------- nosy: +rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 16:11:33 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 17 May 2008 14:11:33 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211032506.53.0.362158166003.issue2898@psf.upfronthosting.co.za> Message-ID: <482EE751.5050601@v.loewis.de> Martin v. L?wis added the comment: > Proposals like this have been rejected in the past. Memory consumption > is an evasive concept. Lists over-allocate space That issue is addressed in this patch. > there are freelists, but they allocate just an upper bound. > there are immortal objects, the python memory allocator may hang-on to > space thought to be available These issues are orthogonal to the memory consumption of a single object. > the packing and alignment of structures > varies across implementations This is addressed in the current patch. > the system memory allocator may assign > much larger chunks than are needed for a single object While true in general, this is not true in practice - in particular, when objects get allocated through pymalloc. > and the memory > may not be freed back to the system. Because of these issues, it is > not that meaningful to say the object x consumes y bytes. This is not true. It is meaningful to say that (and many that you noted are independent from such a statement, as they say things for the whole interpreter, not an individual object). The patch meets a real need, and is the minimum amount of code that actually *has* to be implemented in the virtual machine, to get a reasonable analysis of the total memory consumption. Please be practical here, not puristic. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 16:39:17 2008 From: report at bugs.python.org (Christian Heimes) Date: Sat, 17 May 2008 14:39:17 +0000 Subject: [issue2900] math.copysign(1, float('nan')) In-Reply-To: <1211035155.03.0.494078567366.issue2900@psf.upfronthosting.co.za> Message-ID: <1211035155.03.0.494078567366.issue2900@psf.upfronthosting.co.za> New submission from Christian Heimes : What's your opinion on the edge case >>> math.copysign(1, float('nan')) 1.0 Is 1.0 the correct answer? IMHO Nan would be better ... ---------- assignee: marketdickinson components: Extension Modules messages: 66997 nosy: christian.heimes, marketdickinson priority: normal severity: normal status: open title: math.copysign(1, float('nan')) type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 16:45:19 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 17 May 2008 14:45:19 +0000 Subject: [issue2900] math.copysign(1, float('nan')) In-Reply-To: <1211035155.03.0.494078567366.issue2900@psf.upfronthosting.co.za> Message-ID: <1211035519.55.0.418759026234.issue2900@psf.upfronthosting.co.za> Mark Dickinson added the comment: This is fine. copysign isn't supposed to propagate NaNs---it's just supposed to silently transfer the sign bit from the second argument to the first. So I think this is correct behaviour. Incidentally, on OS X: >>> from math import copysign >>> copysign(1, float('nan')) -1.0 This is also fine, IMO. It just so happens that on OS X the 'default' NaN has its sign bit set. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 17:03:49 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 17 May 2008 15:03:49 +0000 Subject: [issue2839] Moving lib-tk to tkinter package In-Reply-To: <1210615239.35.0.359819643531.issue2839@psf.upfronthosting.co.za> Message-ID: <1211036629.37.0.258382514833.issue2839@psf.upfronthosting.co.za> Guilherme Polo added the comment: This new patch handles the merging of tkSimpleDialog into tkinter.simpledialog and tkFileDialog into tkinter.filedialog. After doing it, the old files may be removed from lib-tk: svn del Lib/lib-tk/tkSimpleDialog.py svn del Lib/lib-tk/tkFileDialog.py I will do the stub modules for these modules after the commit then, thanks. Added file: http://bugs.python.org/file10354/tkinter_modmerge.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 17:07:48 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 17 May 2008 15:07:48 +0000 Subject: [issue2839] Moving lib-tk to tkinter package In-Reply-To: <1210615239.35.0.359819643531.issue2839@psf.upfronthosting.co.za> Message-ID: <1211036868.61.0.838329369518.issue2839@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed modmerge patch in r63408. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 17:54:21 2008 From: report at bugs.python.org (Matthias Kievernagel) Date: Sat, 17 May 2008 15:54:21 +0000 Subject: [issue1362475] Text.edit_modified() doesn't work Message-ID: <1211039661.45.0.638996984139.issue1362475@psf.upfronthosting.co.za> Matthias Kievernagel added the comment: Hi Guilherme, funny, I wasn't aware of this duplicate of this issue until I got the message of your comment :) The other duplicate is: http://bugs.python.org/issue1643641 which was closed by Georg Brandl upon my request. The oldest issue is: http://bugs.python.org/issue961805 Both these issues have my patch attached. (it's somewhat resembling yours and the proposition of Ron Provost - except that it is 1.5 years older) The latter issue also has demo code attached. Can someone close this one or the other open issue?? Cheers, Matthias Kievernagel _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 17 17:58:05 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 17 May 2008 15:58:05 +0000 Subject: [issue1362475] Text.edit_modified() doesn't work Message-ID: <1211039885.2.0.413000537926.issue1362475@psf.upfronthosting.co.za> Guilherme Polo added the comment: Closed as this is yet another duplicate. ---------- resolution: -> duplicate status: open -> closed superseder: -> Text.edit_modified() fails _____________________________________ Tracker _____________________________________ From report at bugs.python.org Sat May 17 17:59:38 2008 From: report at bugs.python.org (Martin McNickle) Date: Sat, 17 May 2008 15:59:38 +0000 Subject: [issue2868] Problem with urllib and urllib2 in urlopen? In-Reply-To: <1210872918.44.0.781386707742.issue2868@psf.upfronthosting.co.za> Message-ID: <1211039978.02.0.321691869326.issue2868@psf.upfronthosting.co.za> Martin McNickle added the comment: I verified the behaviour but this is a problem with that particular site, not with urllib/urllib2. Should be closed. ---------- nosy: +BitTorment __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 18:00:27 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 17 May 2008 16:00:27 +0000 Subject: [issue961805] Text.edit_modified() fails Message-ID: <1211040027.4.0.526883428165.issue961805@psf.upfronthosting.co.za> Guilherme Polo added the comment: >From issue 1362475: This bug still exists, I'm attaching a patch against current python-trunk. This patch is based on the fact that documentation tk 8.4 (version which edit command was added) and tk 8.5 says only edit_modified is supposed to return something, which is either 0 or 1, so there was no reason to use _gettints on that tk.call, and returning an empty tuple is against the expected value, 0. --- cut --- This message and patch is almost a duplicate of Matthias, just updating from the just closed, and duplicated, issue 1362475 ---------- keywords: +patch nosy: +gpolo Added file: http://bugs.python.org/file10355/edit_modified.diff ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 17 18:16:54 2008 From: report at bugs.python.org (Matthias Kievernagel) Date: Sat, 17 May 2008 16:16:54 +0000 Subject: [issue837234] Tk.quit and sys.exit cause Fatal Error Message-ID: <1211041014.89.0.0942313187287.issue837234@psf.upfronthosting.co.za> Matthias Kievernagel added the comment: Hi, found a related (duplicate ?) issue which mentions a platform and has code producing the error: http://bugs.python.org/issue775544 Can someone based on WinXP try the code? Attaching it here for easier reference. Works without problem on my Linux 2.6, Python 2.4.1 with Tk 8.4 Guess the other issue is similar enough to close it. Regards, Matthias Kievernagel ---------- nosy: +mkiever Added file: http://bugs.python.org/file10356/issue775544.py ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 17 18:28:19 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 17 May 2008 16:28:19 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211041698.33.0.964584400829.issue2819@psf.upfronthosting.co.za> Mark Dickinson added the comment: Okay, just to show it's possible: Here (msum4.py) is a modified version of Raymond's recipe that deals correctly with: (1) intermediate overflows (2) special values (infs and nans) in the input, and (3) always gives correctly rounded results. The file contains more tests, and a proof of correctness. The algorithm still makes only a single pass through the given iterable, and there should be minimal slowdown in the common case. It's still only 60-70 lines of Python code, so I don't think it would be unreasonable to aim to include these modifications in the C version. Added file: http://bugs.python.org/file10357/msum4.py __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 18:50:14 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 17 May 2008 16:50:14 +0000 Subject: [issue2868] Problem with urllib and urllib2 in urlopen? In-Reply-To: <1210872918.44.0.781386707742.issue2868@psf.upfronthosting.co.za> Message-ID: <1211043014.02.0.322826502442.issue2868@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 19:05:16 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 17 May 2008 17:05:16 +0000 Subject: [issue2899] Fixers find, rfind, etc in 'string' module In-Reply-To: <1211027417.56.0.456898655973.issue2899@psf.upfronthosting.co.za> Message-ID: <1211043916.68.0.214936557721.issue2899@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- title: Fixes find, rfind, etc in 'string' module -> Fixers find, rfind, etc in 'string' module __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 19:57:30 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 17 May 2008 17:57:30 +0000 Subject: [issue961805] Text.edit_modified() fails Message-ID: <1211047049.87.0.679958247338.issue961805@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, committed patch as r63412. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 17 20:49:34 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 17 May 2008 18:49:34 +0000 Subject: [issue2337] Backport oct() and hex() to use __index__ In-Reply-To: <1205776266.64.0.297851457778.issue2337@psf.upfronthosting.co.za> Message-ID: <1211050174.55.0.345770252749.issue2337@psf.upfronthosting.co.za> Georg Brandl added the comment: The warning message for oct() should include that the output will be different too. Else this is fine with me. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 20:52:33 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 17 May 2008 18:52:33 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1211050353.05.0.400609418376.issue2898@psf.upfronthosting.co.za> Georg Brandl added the comment: Lists will need a custom tp_footprint then, too. Or, if we call it sizeof, the slot should be tp_sizeof. BTW, is a new slot necessary, or can it just be a type method called __sizeof__? __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 21:01:24 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 17 May 2008 19:01:24 +0000 Subject: [issue2839] Moving lib-tk to tkinter package In-Reply-To: <1210615239.35.0.359819643531.issue2839@psf.upfronthosting.co.za> Message-ID: <1211050884.57.0.180848461591.issue2839@psf.upfronthosting.co.za> Guilherme Polo added the comment: Patch added for handling the merging of tkSimpleDialog into tkinter.simpledialog and tkFileDialog into tkinter.filedialog, specific for py3k. Added file: http://bugs.python.org/file10358/tkinter_modmerge_py3k.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 21:18:13 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 17 May 2008 19:18:13 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211050353.05.0.400609418376.issue2898@psf.upfronthosting.co.za> Message-ID: <482F2F6C.3070909@v.loewis.de> Martin v. L?wis added the comment: > Lists will need a custom tp_footprint then, too. True. > BTW, is a new slot necessary, or > can it just be a type method called __sizeof__? It wouldn't be a type method, but a regular method on the specific type, right? I think that would work as well. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 21:20:21 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 17 May 2008 19:20:21 +0000 Subject: [issue2839] Moving lib-tk to tkinter package In-Reply-To: <1210615239.35.0.359819643531.issue2839@psf.upfronthosting.co.za> Message-ID: <1211052021.35.0.93298427416.issue2839@psf.upfronthosting.co.za> Georg Brandl added the comment: Handled Py3k branch in revs 63417 to 63423. Closing this issue. ---------- resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 21:23:33 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 17 May 2008 19:23:33 +0000 Subject: [issue2337] Backport oct() and hex() to use __index__ In-Reply-To: <1205776266.64.0.297851457778.issue2337@psf.upfronthosting.co.za> Message-ID: <1211052213.02.0.700233642933.issue2337@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Done in r63425. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 22:04:15 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 17 May 2008 20:04:15 +0000 Subject: [issue2349] Py3K warn against assigning to True/False In-Reply-To: <1205781558.49.0.8223061173.issue2349@psf.upfronthosting.co.za> Message-ID: <1211054655.55.0.663286820972.issue2349@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm attaching a new patch with changes made from the Georg's comments. Added file: http://bugs.python.org/file10359/bool_assign6.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 22:11:49 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 17 May 2008 20:11:49 +0000 Subject: [issue2337] Backport oct() and hex() to use __index__ In-Reply-To: <1205776266.64.0.297851457778.issue2337@psf.upfronthosting.co.za> Message-ID: <1211055109.68.0.330105221944.issue2337@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I have reverted this. See mail.python.org/pipermail/python-checkins/2008-May/069843.html. ---------- resolution: fixed -> status: closed -> pending __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 22:36:02 2008 From: report at bugs.python.org (Eric Smith) Date: Sat, 17 May 2008 20:36:02 +0000 Subject: [issue2337] Backport oct() and hex() to use __index__ In-Reply-To: <1205776266.64.0.297851457778.issue2337@psf.upfronthosting.co.za> Message-ID: <1211056562.3.0.581399112456.issue2337@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 17 23:04:19 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 17 May 2008 21:04:19 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1211058259.74.0.305715975527.issue2898@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Guido, recently you've been opposed to adding more slots. Any opinions on this one? Also, is this something you want an additional builtin for? ---------- assignee: -> gvanrossum nosy: +gvanrossum __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 00:13:17 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 17 May 2008 22:13:17 +0000 Subject: [issue2353] Use of file.xreadlines() should raise a Py3K warning In-Reply-To: <1205782140.75.0.577448630615.issue2353@psf.upfronthosting.co.za> Message-ID: <1211062397.59.0.520686951392.issue2353@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed slightly reviewed patch and test in r63340. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 02:18:48 2008 From: report at bugs.python.org (=?utf-8?q?H=C3=A5kan_Waara?=) Date: Sun, 18 May 2008 00:18:48 +0000 Subject: [issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data In-Reply-To: <1211069816.05.0.311102248623.issue2901@psf.upfronthosting.co.za> Message-ID: <1211069928.72.0.599853253175.issue2901@psf.upfronthosting.co.za> H?kan Waara added the comment: test_server.py and test_client.py zipped attached. Added file: http://bugs.python.org/file10360/testcase.zip __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 02:16:56 2008 From: report at bugs.python.org (=?utf-8?q?H=C3=A5kan_Waara?=) Date: Sun, 18 May 2008 00:16:56 +0000 Subject: [issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data In-Reply-To: <1211069816.05.0.311102248623.issue2901@psf.upfronthosting.co.za> Message-ID: <1211069816.05.0.311102248623.issue2901@psf.upfronthosting.co.za> New submission from H?kan Waara : I'm using the standard lib SimpleXMLRPCServer to receive a file from a client. The file is sent using an instance of the xmlrpclib.Binary class. Whenever the file is bigger than a few MB, the server reports spews out an internal error to stderr: Python(13950) malloc: *** mmap(size=9916416) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug This *only* happens if the client and server are not the same machine; i.e., connecting and sending to "localhost" always works. Attached testcase: * test_server.py opens a server on port 8001 waiting to receive a blob of data over HTTP. * Modify test_client.py to point at a big file, and then connect to the server machine, and you will ses the error. I'm running OS X-bundled Python 2.5.1 on OS X 10.5.2 ---------- messages: 67018 nosy: hwaara severity: normal status: open title: "error: can't allocate region" from mmap() when receiving big chunk of data versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 02:22:51 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 18 May 2008 00:22:51 +0000 Subject: [issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data In-Reply-To: <1211069816.05.0.311102248623.issue2901@psf.upfronthosting.co.za> Message-ID: <1211070171.34.0.941837202139.issue2901@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- type: -> crash __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 02:56:44 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 18 May 2008 00:56:44 +0000 Subject: [issue2902] tkinter uses MacOS In-Reply-To: <1211072203.77.0.284787779391.issue2902@psf.upfronthosting.co.za> Message-ID: <1211072203.77.0.284787779391.issue2902@psf.upfronthosting.co.za> New submission from Benjamin Peterson : A few days ago I removed the MacOS module. I didn't realize that it was used in Tkinter until today. It seems the module is only used in one spot: if _MacOS and hasattr(_MacOS, 'SchedParams'): # Disable event scanning except for Command-Period _MacOS.SchedParams(1, 0) # Work around nasty MacTk bug # XXX Is this one still needed? self.update() Is this still needed? If so, this check will have to integrated into _tkinter. ---------- messages: 67020 nosy: benjamin.peterson priority: critical severity: normal status: open title: tkinter uses MacOS type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 03:40:57 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 18 May 2008 01:40:57 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211074857.68.0.917663165554.issue2819@psf.upfronthosting.co.za> Jean Brouwers added the comment: I intend to submit a C version of msum4 shortly. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 05:12:37 2008 From: report at bugs.python.org (Guillaume Knispel) Date: Sun, 18 May 2008 03:12:37 +0000 Subject: [issue2903] Add __name__ in globals of generated namedtuple namespace In-Reply-To: <1211080350.94.0.662865007097.issue2903@psf.upfronthosting.co.za> Message-ID: <1211080350.94.0.662865007097.issue2903@psf.upfronthosting.co.za> New submission from Guillaume Knispel : Some 3rd party tracers rely on frame.f_globals["__name__"] to be set to the module name that contains the code currently executed. frame.f_globals["__name__"] is not defined when some code has been generated with exec, which is the way namedtuples are created. The attached patch set __name__ to '__generated_%s__' % typename in the generated namespace, which is quite handy to see where the code comes from. Indeed if sys._getframe is available it sets __name__ to '__generated_%s__%s__' % (typename, result.__module__) which is even more useful. ---------- components: Library (Lib) files: collections.r59898.patch keywords: patch messages: 67022 nosy: xilun severity: normal status: open title: Add __name__ in globals of generated namedtuple namespace versions: Python 2.6 Added file: http://bugs.python.org/file10361/collections.r59898.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 07:03:11 2008 From: report at bugs.python.org (Leandro Lucarella) Date: Sun, 18 May 2008 05:03:11 +0000 Subject: [issue2904] Cross-referencing to a method using an alternate title don't work with add_function_parentheses=True In-Reply-To: <1211086991.24.0.536909381187.issue2904@psf.upfronthosting.co.za> Message-ID: <1211086991.24.0.536909381187.issue2904@psf.upfronthosting.co.za> New submission from Leandro Lucarella : When using cross-references to a method using an alternate title, like :meth:`some title ` and configuration option add_function_parentheses is True, the link is not generated (if this option is False, it works fine. ---------- assignee: georg.brandl components: Documentation tools (Sphinx) messages: 67023 nosy: georg.brandl, llucax severity: normal status: open title: Cross-referencing to a method using an alternate title don't work with add_function_parentheses=True type: behavior versions: 3rd party __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 08:24:33 2008 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Sun, 18 May 2008 06:24:33 +0000 Subject: [issue2882] Create the html package In-Reply-To: <1210914377.14.0.176353307506.issue2882@psf.upfronthosting.co.za> Message-ID: <1211091872.99.0.470547021189.issue2882@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: Completed in revisions 63430, 63432, 63434 (Python 2.6), and 63431, 63435, 63439 (Python 3.0). ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 08:25:41 2008 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Sun, 18 May 2008 06:25:41 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211091941.18.0.370371332768.issue2775@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: The html package has been created (issue 2882). ---------- nosy: +fdrake __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 11:56:48 2008 From: report at bugs.python.org (Ismail Donmez) Date: Sun, 18 May 2008 09:56:48 +0000 Subject: [issue2905] test_urllib.py crashes with bus error on Darwin In-Reply-To: <1211104607.9.0.755526483675.issue2905@psf.upfronthosting.co.za> Message-ID: <1211104607.9.0.755526483675.issue2905@psf.upfronthosting.co.za> New submission from Ismail Donmez : Using latest py3k SVN on MacOSX 10.5.2 : [~/Sources/py3k/Lib/test]> ../../python regrtest.py test_urllib.py test_urllib zsh: bus error ../../python regrtest.py test_urllib.py Backtrace: #0 _CallProc (pProc=0x904e95f0 , argtuple=0x5e7bc0, flags=4353, argtypes=0x0, restype=0x2637b0, checker=0x0) at /Users/cartman/Sources/py3k/Modules/_ctypes/callproc.c:984 #1 0x00662352 in CFuncPtr_call (self=0x5c9738, inargs=0x5e7bc0, kwds=0x0) at /Users/cartman/Sources/py3k/Modules/_ctypes/_ctypes.c:3767 #2 0x00008229 in PyObject_Call (func=0x5c9738, arg=0x5e7bc0, kw=0x0) at Objects/abstract.c:2184 #3 0x0009e9f4 in [inlined] () at :0 #4 0x0009e9f4 in PyEval_EvalFrameEx (f=0x2615e0, throwflag=0) at Python/ceval.c:0 #5 0x0009ffc8 in PyEval_EvalFrameEx (f=0x23f6d0, throwflag=0) at Python/ceval.c:3536 #6 0x0009ffc8 in PyEval_EvalFrameEx (f=0x260d70, throwflag=0) at Python/ceval.c:3536 #7 0x000a1133 in PyEval_EvalCodeEx (co=0x3cfcc8, globals=0x3c60c0, locals=0x0, args=0x5eb6dc, argcount=1, kws=0x2576d0, kwcount=0, defs=0x54d9bc, defcount=1, kwdefs=0x0, closure=0x0) at Python/ceval.c:2743 #8 0x0002b055 in function_call (func=0x54cd68, arg=0x5eb6d0, kw=0x5ecb70) at Objects/funcobject.c:628 #9 0x00008229 in PyObject_Call (func=0x54cd68, arg=0x5eb6d0, kw=0x5ecb70) at Objects/abstract.c:2184 #10 0x0009d418 in PyEval_EvalFrameEx (f=0x260c00, throwflag=0) at Python/ceval.c:3749 #11 0x000a1133 in PyEval_EvalCodeEx (co=0x3d53c8, globals=0x3c60c0, locals=0x0, args=0x5eb6bc, argcount=1, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:2743 #12 0x0002b055 in function_call (func=0x5321e0, arg=0x5eb6b0, kw=0x0) at Objects/funcobject.c:628 #13 0x00008229 in PyObject_Call (func=0x5321e0, arg=0x5eb6b0, kw=0x0) at Objects/abstract.c:2184 #14 0x0001715e in method_call (func=0x5321e0, arg=0x1ac030, kw=0x0) at Objects/classobject.c:323 #15 0x00008229 in PyObject_Call (func=0x5230a8, arg=0x1ac030, kw=0x0) at Objects/abstract.c:2184 #16 0x000579c7 in slot_tp_init (self=0x0, args=0x1ac030, kwds=0x0) at Objects/typeobject.c:5187 #17 0x00053be2 in type_call (type=0x24f8f0, args=0x1ac030, kwds=0x0) at Objects/typeobject.c:651 #18 0x00008229 in PyObject_Call (func=0x24f8f0, arg=0x1ac030, kw=0x0) at Objects/abstract.c:2184 #19 0x0009e9f4 in [inlined] () at :0 #20 0x0009e9f4 in PyEval_EvalFrameEx (f=0x260a90, throwflag=0) at Python/ceval.c:0 #21 0x000a1133 in PyEval_EvalCodeEx (co=0x3cfb60, globals=0x3c60c0, locals=0x0, args=0x2608e4, argcount=1, kws=0x2608e8, kwcount=0, defs=0x3cbeec, defcount=2, kwdefs=0x0, closure=0x0) at Python/ceval.c:2743 #22 0x0009f874 in [inlined] () at :0 #23 0x0009f874 in PyEval_EvalFrameEx (f=0x2607a0, throwflag=0) at Python/ceval.c:0 #24 0x0009ffc8 in PyEval_EvalFrameEx (f=0x25f3d0, throwflag=0) at Python/ceval.c:3536 #25 0x000a1133 in PyEval_EvalCodeEx (co=0x538848, globals=0x5330c0, locals=0x0, args=0x5de67c, argcount=2, kws=0x258880, kwcount=0, defs=0x5b569c, defcount=1, kwdefs=0x0, closure=0x0) at Python/ceval.c:2743 #26 0x0002b055 in function_call (func=0x5b68e8, arg=0x5de670, kw=0x5ec930) at Objects/funcobject.c:628 #27 0x00008229 in PyObject_Call (func=0x5b68e8, arg=0x5de670, kw=0x5ec930) at Objects/abstract.c:2184 #28 0x0009d418 in PyEval_EvalFrameEx (f=0x25f260, throwflag=0) at Python/ceval.c:3749 #29 0x000a1133 in PyEval_EvalCodeEx (co=0x538890, globals=0x5330c0, locals=0x0, args=0x5dedfc, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:2743 #30 0x0002b055 in function_call (func=0x5b6930, arg=0x5dedf0, kw=0x0) at Objects/funcobject.c:628 #31 0x00008229 in PyObject_Call (func=0x5b6930, arg=0x5dedf0, kw=0x0) at Objects/abstract.c:2184 #32 0x0001715e in method_call (func=0x5b6930, arg=0x5eb650, kw=0x0) at Objects/classobject.c:323 #33 0x00008229 in PyObject_Call (func=0x523198, arg=0x5eb650, kw=0x0) at Objects/abstract.c:2184 #34 0x00057d97 in slot_tp_call (self=0x0, args=0x5eb650, kwds=0x0) at Objects/typeobject.c:4960 #35 0x00008229 in PyObject_Call (func=0x5e3e50, arg=0x5eb650, kw=0x0) at Objects/abstract.c:2184 #36 0x0009e9f4 in [inlined] () at :0 #37 0x0009e9f4 in PyEval_EvalFrameEx (f=0x25f0f0, throwflag=0) at Python/ceval.c:0 #38 0x000a1133 in PyEval_EvalCodeEx (co=0x538f50, globals=0x5330c0, locals=0x0, args=0x5de6a4, argcount=2, kws=0x258870, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:2743 #39 0x0002b055 in function_call (func=0x5b6e88, arg=0x5de698, kw=0x5ec8a0) at Objects/funcobject.c:628 #40 0x00008229 in PyObject_Call (func=0x5b6e88, arg=0x5de698, kw=0x5ec8a0) at Objects/abstract.c:2184 #41 0x0009d418 in PyEval_EvalFrameEx (f=0x25ef80, throwflag=0) at Python/ceval.c:3749 #42 0x000a1133 in PyEval_EvalCodeEx (co=0x538f98, globals=0x5330c0, locals=0x0, args=0x5de744, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:2743 #43 0x0002b055 in function_call (func=0x5b6ed0, arg=0x5de738, kw=0x0) at Objects/funcobject.c:628 #44 0x00008229 in PyObject_Call (func=0x5b6ed0, arg=0x5de738, kw=0x0) at Objects/abstract.c:2184 #45 0x0001715e in method_call (func=0x5b6ed0, arg=0x5eb5b0, kw=0x0) at Objects/classobject.c:323 #46 0x00008229 in PyObject_Call (func=0x5230d0, arg=0x5eb5b0, kw=0x0) at Objects/abstract.c:2184 #47 0x00057d97 in slot_tp_call (self=0x0, args=0x5eb5b0, kwds=0x0) at Objects/typeobject.c:4960 #48 0x00008229 in PyObject_Call (func=0x5e3eb0, arg=0x5eb5b0, kw=0x0) at Objects/abstract.c:2184 #49 0x0009e9f4 in [inlined] () at :0 #50 0x0009e9f4 in PyEval_EvalFrameEx (f=0x25ee10, throwflag=0) at Python/ceval.c:0 #51 0x000a1133 in PyEval_EvalCodeEx (co=0x538f50, globals=0x5330c0, locals=0x0, args=0x5de5b4, argcount=2, kws=0x254b40, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:2743 #52 0x0002b055 in function_call (func=0x5b6e88, arg=0x5de5a8, kw=0x5ec810) at Objects/funcobject.c:628 #53 0x00008229 in PyObject_Call (func=0x5b6e88, arg=0x5de5a8, kw=0x5ec810) at Objects/abstract.c:2184 #54 0x0009d418 in PyEval_EvalFrameEx (f=0x25eca0, throwflag=0) at Python/ceval.c:3749 #55 0x000a1133 in PyEval_EvalCodeEx (co=0x538f98, globals=0x5330c0, locals=0x0, args=0x53a924, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:2743 #56 0x0002b055 in function_call (func=0x5b6ed0, arg=0x53a918, kw=0x0) at Objects/funcobject.c:628 #57 0x00008229 in PyObject_Call (func=0x5b6ed0, arg=0x53a918, kw=0x0) at Objects/abstract.c:2184 #58 0x0001715e in method_call (func=0x5b6ed0, arg=0x5eb450, kw=0x0) at Objects/classobject.c:323 #59 0x00008229 in PyObject_Call (func=0x578e18, arg=0x5eb450, kw=0x0) at Objects/abstract.c:2184 #60 0x00057d97 in slot_tp_call (self=0x0, args=0x5eb450, kwds=0x0) at Objects/typeobject.c:4960 #61 0x00008229 in PyObject_Call (func=0x53f8f0, arg=0x5eb450, kw=0x0) at Objects/abstract.c:2184 #62 0x0009e9f4 in [inlined] () at :0 #63 0x0009e9f4 in PyEval_EvalFrameEx (f=0x25e560, throwflag=0) at Python/ceval.c:0 #64 0x0009ffc8 in PyEval_EvalFrameEx (f=0x25e120, throwflag=0) at Python/ceval.c:3536 #65 0x0009ffc8 in PyEval_EvalFrameEx (f=0x25b070, throwflag=0) at Python/ceval.c:3536 #66 0x000a1133 in PyEval_EvalCodeEx (co=0x5bca40, globals=0x533c90, locals=0x0, args=0x25074c, argcount=7, kws=0x250768, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:2743 #67 0x0009f874 in [inlined] () at :0 #68 0x0009f874 in PyEval_EvalFrameEx (f=0x250610, throwflag=0) at Python/ceval.c:0 #69 0x0009ffc8 in PyEval_EvalFrameEx (f=0x233530, throwflag=0) at Python/ceval.c:3536 #70 0x000a1133 in PyEval_EvalCodeEx (co=0x3cfa88, globals=0x1d50c0, locals=0x1d50c0, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:2743 #71 0x000a12ef in PyEval_EvalCode (co=0x0, globals=0x0, locals=0x0) at Python/ceval.c:500 #72 0x000c7691 in [inlined] () at :0 #73 0x000c7691 in PyRun_FileExFlags (fp=0xa0670de0, filename=0xbffff2dc "test_urllib.py", start=257, globals=0x1d50c0, locals=0x1d50c0, closeit=1, flags=0xbffff73c) at Python/pythonrun.c:0 #74 0x000c7b23 in PyRun_SimpleFileExFlags (fp=, filename=0xbffff2dc "test_urllib.py", closeit=1, flags=0xbffff73c) at Python/pythonrun.c:1040 #75 0x000d4da9 in Py_Main (argc=2, argv=0x2000f0) at Modules/main.c:592 #76 0x000024c0 in main (argc=2, argv=0xbffff808) at python.c:57 ---------- components: Library (Lib) messages: 67026 nosy: cartman severity: normal status: open title: test_urllib.py crashes with bus error on Darwin type: crash versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 13:14:20 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 18 May 2008 11:14:20 +0000 Subject: [issue2905] test_urllib.py crashes with bus error on Darwin In-Reply-To: <1211104607.9.0.755526483675.issue2905@psf.upfronthosting.co.za> Message-ID: <1211109259.77.0.126332857193.issue2905@psf.upfronthosting.co.za> Georg Brandl added the comment: Should be fixed in r63448. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 13:55:53 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 18 May 2008 11:55:53 +0000 Subject: [issue2897] include structmember.h in Python.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1211111753.6.0.952539894343.issue2897@psf.upfronthosting.co.za> Georg Brandl added the comment: We could include it in Py3k. ---------- assignee: -> gvanrossum nosy: +georg.brandl, gvanrossum versions: +Python 3.0 -Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 15:38:15 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 18 May 2008 13:38:15 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211117895.52.0.620850462932.issue2775@psf.upfronthosting.co.za> Changes by Guilherme Polo : Removed file: http://bugs.python.org/file10296/tkinter_package_and_fixes_2.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 17:38:58 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 18 May 2008 15:38:58 +0000 Subject: [issue2906] tkinter, assorted fixes In-Reply-To: <1211125137.99.0.839625810587.issue2906@psf.upfronthosting.co.za> Message-ID: <1211125137.99.0.839625810587.issue2906@psf.upfronthosting.co.za> New submission from Guilherme Polo : This patch adds support for Tk options that could be passed as a list or tuple, for example. I didn't investigate if there are any of these in tk 8.4, but tk 8.5 has this (the padding option for Ttk Label, for example). Note that this should, if possible, be backported to python 2.5 at least, since it segfaults here when I pass a list as an option value. It also aligns some docstrings; documents the support for the 'in_' option for grid, place and pack, actually all options may end with an "_", but it is good to document 'in_' specifically because the option 'in' can't be passed "naturally". Lastly it removes the duplicate code in class Place that checks for the 'in_' option. ---------- components: Tkinter files: fixes_tkinter.diff keywords: patch, patch messages: 67029 nosy: gpolo severity: normal status: open title: tkinter, assorted fixes versions: Python 3.0 Added file: http://bugs.python.org/file10362/fixes_tkinter.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 18:29:59 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 May 2008 16:29:59 +0000 Subject: [issue2900] math.copysign(1, float('nan')) In-Reply-To: <1211035155.03.0.494078567366.issue2900@psf.upfronthosting.co.za> Message-ID: <1211128199.68.0.17353341156.issue2900@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing this; I'm 99.72% sure the current behaviour is okay. :-) Christian, please feel free to reopen if you think further discussion is needed. ---------- resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 19:04:26 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 May 2008 17:04:26 +0000 Subject: [issue1811] True division of integers could be more accurate In-Reply-To: <1200115229.68.0.232140016038.issue1811@psf.upfronthosting.co.za> Message-ID: <1211130266.85.0.0133504211468.issue1811@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch that fixes the rounding of integer division. It includes a fast path for the case where both integers are small (less than about 3.5e12). ---------- keywords: +patch Added file: http://bugs.python.org/file10363/long_division.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 19:59:43 2008 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 May 2008 17:59:43 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211133582.13.0.672587525733.issue2775@psf.upfronthosting.co.za> Brett Cannon added the comment: I have now removed the closed issues as dependencies. Thanks to everyone who has helped so far! You have no idea how appreciative I am. ---------- dependencies: -Create the html package, Create the tkinter package, Moving lib-tk to tkinter package, Rename repr to reprlib __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 20:06:36 2008 From: report at bugs.python.org (Chester) Date: Sun, 18 May 2008 18:06:36 +0000 Subject: [issue2907] ZeroDivisionError error message needs clarification In-Reply-To: <1211133995.44.0.708041484383.issue2907@psf.upfronthosting.co.za> Message-ID: <1211133995.44.0.708041484383.issue2907@psf.upfronthosting.co.za> New submission from Chester : Please fix the ZeroDivisionError error message string literal to clarify the error message: from if (y == 0) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); return DIVMOD_ERROR; to if (y == 0) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division by zero or modulo by zero"); return DIVMOD_ERROR; This code is located here: http://svn.python.org/view/python/trunk/Objects/intobject.c?rev=62380&view=markup ---------- messages: 67033 nosy: chester severity: normal status: open title: ZeroDivisionError error message needs clarification versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 21:25:47 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 18 May 2008 19:25:47 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211138747.95.0.403326658367.issue2819@psf.upfronthosting.co.za> Changes by Jean Brouwers : Removed file: http://bugs.python.org/file10364/mathmodule4.c.2.6a3.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 21:25:39 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 18 May 2008 19:25:39 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211138738.25.0.228446616831.issue2819@psf.upfronthosting.co.za> Jean Brouwers added the comment: Attached is the patch for the the mathmodule.c file of Python 2.6a3 containing the C version of the msum() function from Marks's msum4.py Python implementation. Please review the C code, in particular the setting of _do_sum_pow_2 for FLT_RADIX not equal to 2. The results of the C and Python versions match (on 32-bit MacOS X Intel), using the test_math_sum4.py script. That includes all the tests from msum4.py and from Raymond's recipe. More testing and the cmath version are still to be done. /Jean Brouwers Added file: http://bugs.python.org/file10364/mathmodule4.c.2.6a3.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 21:28:07 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 18 May 2008 19:28:07 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211138887.54.0.17218956102.issue2819@psf.upfronthosting.co.za> Changes by Jean Brouwers : Added file: http://bugs.python.org/file10365/mathmodule4.c.2.6a3.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 21:29:33 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 18 May 2008 19:29:33 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211138973.03.0.168949533293.issue2819@psf.upfronthosting.co.za> Changes by Jean Brouwers : Added file: http://bugs.python.org/file10366/test_math_sum4.py __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 21:37:54 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 18 May 2008 19:37:54 +0000 Subject: [issue2907] ZeroDivisionError error message needs clarification In-Reply-To: <1211133995.44.0.708041484383.issue2907@psf.upfronthosting.co.za> Message-ID: <1211139474.17.0.867267249606.issue2907@psf.upfronthosting.co.za> Georg Brandl added the comment: Rejecting - this isn't leading anywhere. ---------- nosy: +georg.brandl resolution: -> rejected status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 21:49:40 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 18 May 2008 19:49:40 +0000 Subject: [issue2908] fix_imports new entries for tkinter rename In-Reply-To: <1211140179.6.0.751466797927.issue2908@psf.upfronthosting.co.za> Message-ID: <1211140179.6.0.751466797927.issue2908@psf.upfronthosting.co.za> New submission from Guilherme Polo : Added entries on fix_imports to deal with the tkinter renaming. ---------- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) files: tkinter_imports_fix.diff keywords: patch messages: 67036 nosy: collinwinter, gpolo severity: normal status: open title: fix_imports new entries for tkinter rename Added file: http://bugs.python.org/file10367/tkinter_imports_fix.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 21:51:30 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 18 May 2008 19:51:30 +0000 Subject: [issue2908] fix_imports new entries for tkinter rename In-Reply-To: <1211140179.6.0.751466797927.issue2908@psf.upfronthosting.co.za> Message-ID: <1211140290.03.0.163824714167.issue2908@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed r63456. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 21:55:04 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 18 May 2008 19:55:04 +0000 Subject: [issue2903] Add __name__ in globals of generated namedtuple namespace In-Reply-To: <1211080350.94.0.662865007097.issue2903@psf.upfronthosting.co.za> Message-ID: <1211140504.94.0.692965893334.issue2903@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> rhettinger nosy: +rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 22:00:32 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 18 May 2008 20:00:32 +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: <1211140832.85.0.684084573647.issue2384@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: -> release blocker __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 22:13:21 2008 From: report at bugs.python.org (Aaron Gallagher) Date: Sun, 18 May 2008 20:13:21 +0000 Subject: [issue2909] struct.Struct.unpack to return a namedtuple for easier attribute access In-Reply-To: <1211141600.93.0.483393592548.issue2909@psf.upfronthosting.co.za> Message-ID: <1211141600.93.0.483393592548.issue2909@psf.upfronthosting.co.za> New submission from Aaron Gallagher : With the advent of collections.namedtuple, I thought that having a counterpart in the struct module would make having to deal with unpacked data much easier. Per suggestion, this extends the behavior of _struct.Struct rather than a separate NamedStruct class. The regexp might not be immediately obvious as to what the format required is. The format string is represented like this: "attribute_name1(attribute_format) attribute_name2(attribute_format2)" and so on. Formats given in parentheses without an attribute name are allowed, so that byte order and pad bytes can be specified. For example: "(!) x1(h) x2(h) (2x) y1(h) y2(h)" Suggestions and criticism are welcome. I think it would simplify using the struct module a lot to be able to have named attributes like this. ---------- components: Library (Lib) files: named-struct.patch keywords: patch messages: 67038 nosy: habnabit severity: normal status: open title: struct.Struct.unpack to return a namedtuple for easier attribute access versions: Python 3.0 Added file: http://bugs.python.org/file10368/named-struct.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 22:20:33 2008 From: report at bugs.python.org (Laurent Gautier) Date: Sun, 18 May 2008 20:20:33 +0000 Subject: [issue2437] Distutils runtime_library_dirs broken on Windows In-Reply-To: <1206044595.46.0.100105317073.issue2437@psf.upfronthosting.co.za> Message-ID: <1211142033.01.0.00430896185509.issue2437@psf.upfronthosting.co.za> Laurent Gautier added the comment: The bug is still here with Python 2.5.2. I anyone want to have it work urgently, there is a quick but very ugly fix: add g['CC'] = 'gcc' into the function _init_nt() in the file Lib\distutils\sysconfig.py of the Python install. ---------- nosy: +lgautier __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 22:52:41 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 18 May 2008 20:52:41 +0000 Subject: [issue2908] fix_imports new entries for tkinter rename In-Reply-To: <1211140179.6.0.751466797927.issue2908@psf.upfronthosting.co.za> Message-ID: <1211143960.87.0.0585784303843.issue2908@psf.upfronthosting.co.za> Guilherme Polo added the comment: Hi Georg, sorry but I duplicated the FileDialog entry in tkFileDialog and forgot to update the correct names for tkFileDialog, here is a patch to apply over the previous one. I took the time to review the other entries too, just in case I did this somewhere else, but they are all fine. ---------- resolution: accepted -> status: closed -> open Added file: http://bugs.python.org/file10369/fix_tkfiledialog_imports.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 22:54:27 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 18 May 2008 20:54:27 +0000 Subject: [issue2854] Add gestalt back into Python 3.0 In-Reply-To: <1210795778.91.0.672202960486.issue2854@psf.upfronthosting.co.za> Message-ID: <1211144067.22.0.348657332395.issue2854@psf.upfronthosting.co.za> Changes by Benjamin Peterson : Added file: http://bugs.python.org/file10370/gestalt_is_back2.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 23:02:33 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 18 May 2008 21:02:33 +0000 Subject: [issue2908] fix_imports new entries for tkinter rename In-Reply-To: <1211140179.6.0.751466797927.issue2908@psf.upfronthosting.co.za> Message-ID: <1211144553.13.0.88457139441.issue2908@psf.upfronthosting.co.za> Georg Brandl added the comment: Okay, thanks. Fixed in r63461. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 23:04:27 2008 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 May 2008 21:04:27 +0000 Subject: [issue2910] Remove plat-mac from 3.0 In-Reply-To: <1211144667.58.0.62394748766.issue2910@psf.upfronthosting.co.za> Message-ID: <1211144667.58.0.62394748766.issue2910@psf.upfronthosting.co.za> New submission from Brett Cannon : The plat-mac directory is empty in 3.0, but is still there. Plus there are still references in Makefile.pre.in to the package as well. ---------- components: Library (Lib) messages: 67042 nosy: brett.cannon priority: critical severity: normal status: open title: Remove plat-mac from 3.0 type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 23:04:43 2008 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 May 2008 21:04:43 +0000 Subject: [issue2910] Remove plat-mac from 3.0 In-Reply-To: <1211144667.58.0.62394748766.issue2910@psf.upfronthosting.co.za> Message-ID: <1211144683.02.0.542882466239.issue2910@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 23:04:55 2008 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 May 2008 21:04:55 +0000 Subject: [issue2910] Remove plat-mac from 3.0 In-Reply-To: <1211144667.58.0.62394748766.issue2910@psf.upfronthosting.co.za> Message-ID: <1211144695.93.0.420875449981.issue2910@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- priority: critical -> normal __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 23:09:17 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 18 May 2008 21:09:17 +0000 Subject: [issue2349] Py3K warn against assigning to True/False In-Reply-To: <1205781558.49.0.8223061173.issue2349@psf.upfronthosting.co.za> Message-ID: <1211144957.59.0.599765906805.issue2349@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: benjamin.peterson -> brett.cannon __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 23:18:10 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 18 May 2008 21:18:10 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211145490.58.0.22083385908.issue2819@psf.upfronthosting.co.za> Changes by Jean Brouwers : Removed file: http://bugs.python.org/file10366/test_math_sum4.py __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 23:18:04 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 18 May 2008 21:18:04 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211145484.92.0.922296721242.issue2819@psf.upfronthosting.co.za> Changes by Jean Brouwers : Removed file: http://bugs.python.org/file10365/mathmodule4.c.2.6a3.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 23:18:26 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 18 May 2008 21:18:26 +0000 Subject: [issue1257] atexit errors should result in nonzero exit code In-Reply-To: <1192046186.55.0.804669715206.issue1257@psf.upfronthosting.co.za> Message-ID: <1211145505.96.0.326041125427.issue1257@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm assigning this to Christian because he was doing the GHOP review. ---------- assignee: gvanrossum -> christian.heimes nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 23:19:16 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 18 May 2008 21:19:16 +0000 Subject: [issue2909] struct.Struct.unpack to return a namedtuple for easier attribute access In-Reply-To: <1211141600.93.0.483393592548.issue2909@psf.upfronthosting.co.za> Message-ID: <1211145556.08.0.900857022537.issue2909@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger type: -> feature request __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 23:21:25 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 18 May 2008 21:21:25 +0000 Subject: [issue2910] Remove plat-mac from 3.0 In-Reply-To: <1211144667.58.0.62394748766.issue2910@psf.upfronthosting.co.za> Message-ID: <1211145685.28.0.409823159637.issue2910@psf.upfronthosting.co.za> Georg Brandl added the comment: Do you want me to remove this? ---------- nosy: +georg.brandl __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 23:21:38 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 18 May 2008 21:21:38 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211145698.7.0.765551696625.issue2819@psf.upfronthosting.co.za> Jean Brouwers added the comment: Attached are updated patches for both the mathmodule.c and cmathmodule.c files for Python 2.6a3 and for the test_math_sum4.py script. Please ignore the ones posted earlier. Added file: http://bugs.python.org/file10371/mathmodule4.c.2.6a3.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 23:22:25 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 18 May 2008 21:22:25 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211145745.43.0.985268901815.issue2819@psf.upfronthosting.co.za> Changes by Jean Brouwers : Added file: http://bugs.python.org/file10372/cmathmodule4.c.2.6a3.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 23:23:21 2008 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 18 May 2008 21:23:21 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211145801.27.0.949532536665.issue2819@psf.upfronthosting.co.za> Changes by Jean Brouwers : Added file: http://bugs.python.org/file10373/test_math_sum4.py __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 23:32:08 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 18 May 2008 21:32:08 +0000 Subject: [issue1322] platform.dist() has unpredictable result under Linux In-Reply-To: <1193246464.1.0.269134020057.issue1322@psf.upfronthosting.co.za> Message-ID: <1211146328.13.0.317520501904.issue1322@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Christian was reviewing this for GHOP. ---------- assignee: georg.brandl -> christian.heimes nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From brett at python.org Sun May 18 23:33:18 2008 From: brett at python.org (Brett Cannon) Date: Sun, 18 May 2008 14:33:18 -0700 Subject: [issue2910] Remove plat-mac from 3.0 In-Reply-To: <1211145685.28.0.409823159637.issue2910@psf.upfronthosting.co.za> References: <1211144667.58.0.62394748766.issue2910@psf.upfronthosting.co.za> <1211145685.28.0.409823159637.issue2910@psf.upfronthosting.co.za> Message-ID: On Sun, May 18, 2008 at 2:21 PM, Georg Brandl wrote: > > Georg Brandl added the comment: > > Do you want me to remove this? > I was holding off until a decision was made as to where to put gestalt back into the stdlib (Mac/Modules, Modules, plat-mac, or plat-darwin). From report at bugs.python.org Sun May 18 23:33:30 2008 From: report at bugs.python.org (Brett Cannon) Date: Sun, 18 May 2008 21:33:30 +0000 Subject: [issue2910] Remove plat-mac from 3.0 In-Reply-To: <1211145685.28.0.409823159637.issue2910@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Sun, May 18, 2008 at 2:21 PM, Georg Brandl wrote: > > Georg Brandl added the comment: > > Do you want me to remove this? > I was holding off until a decision was made as to where to put gestalt back into the stdlib (Mac/Modules, Modules, plat-mac, or plat-darwin). __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 23:41:15 2008 From: report at bugs.python.org (Aaron Gallagher) Date: Sun, 18 May 2008 21:41:15 +0000 Subject: [issue2909] struct.Struct.unpack to return a namedtuple for easier attribute access In-Reply-To: <1211141600.93.0.483393592548.issue2909@psf.upfronthosting.co.za> Message-ID: <1211146874.93.0.827550579385.issue2909@psf.upfronthosting.co.za> Aaron Gallagher added the comment: Okay, here's a new version of my patch. Instead of replacing the default functionality of struct.Struct, this patch now adds the functionality to a separate class called NamedStruct, so as to not break backwards compatibility. The coding style has been revised, and it now also raises a more descriptive error if the regex fails to parse. Also included: a unit test. ---------- versions: +Python 2.6 Added file: http://bugs.python.org/file10374/named-struct2.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 18 23:41:42 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 18 May 2008 21:41:42 +0000 Subject: [issue2910] Remove plat-mac from 3.0 In-Reply-To: <1211144667.58.0.62394748766.issue2910@psf.upfronthosting.co.za> Message-ID: <1211146902.2.0.144097418577.issue2910@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Well, I reimplemented gestalt as C (#2854), so I imagine it should go in Modules. ---------- nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 00:03:26 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 18 May 2008 22:03:26 +0000 Subject: [issue2909] struct.Struct.unpack to return a namedtuple for easier attribute access In-Reply-To: <1211141600.93.0.483393592548.issue2909@psf.upfronthosting.co.za> Message-ID: <1211148206.48.0.0849031619309.issue2909@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for submitting the patch and the idea. I've previously looked at this approach and decided against it. The struct module is highly optimized and typically called many times in a loop and a patch like this would hurt performance. Also, it adds complexity to the module making it more difficult to learn an remember. It is better to leave named tuples separate and allow users to combine them downstream -- see the SQLite example for instance -- the cast to named tuples could be applied directly, so there was no need for a change to the SQL module. It is better design for us to leave the data retrieval (struct, csv, sql, etc) separate from the code for collections.namedtuple. Instead of this patch, I propose to add a simple example to the struct module documentation showing how to cast to a named tuple. Also, FWIW, the preferred way to cast tuples to named tuples is to use the _make() method instead of using the constructor with the star operator. nt._make(t) instead of nt(*t). __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 00:23:32 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 18 May 2008 22:23:32 +0000 Subject: [issue2911] rewrite test_struct as a unittest In-Reply-To: <1211149411.88.0.00220562909175.issue2911@psf.upfronthosting.co.za> Message-ID: <1211149411.88.0.00220562909175.issue2911@psf.upfronthosting.co.za> New submission from Benjamin Peterson : Perhaps a bigger bug day task? ---------- components: Tests keywords: easy messages: 67051 nosy: benjamin.peterson priority: low severity: normal status: open title: rewrite test_struct as a unittest type: feature request __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 02:16:13 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 19 May 2008 00:16:13 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> New submission from Benjamin Peterson : Sometimes os.uname (which is used to bootstrap platform.uname) can return 'unknown' for some items. The fallback code in platform.uname can usually fill these blanks in. However, this is only used when os.uname is not present. It would be useful if platform tried to fill these unknowns in. ---------- keywords: easy messages: 67052 nosy: benjamin.peterson severity: normal status: open title: let platform.uname try harder type: feature request __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 02:16:36 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 19 May 2008 00:16:36 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1211156196.94.0.967924553325.issue2912@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- versions: +Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 02:19:10 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 19 May 2008 00:19:10 +0000 Subject: [issue2912] let platform.uname try harder In-Reply-To: <1211156171.95.0.0218034569692.issue2912@psf.upfronthosting.co.za> Message-ID: <1211156350.7.0.0285145109114.issue2912@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- components: +Library (Lib) priority: -> low __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 03:22:11 2008 From: report at bugs.python.org (Jean Brouwers) Date: Mon, 19 May 2008 01:22:11 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211160128.71.0.578432305952.issue2819@psf.upfronthosting.co.za> Jean Brouwers added the comment: The tests of the test_math_sum4.py script all pass with the latest math- and cmathmodule.c files for 4 different builds of Python 2.6a3: - GNU gcc 4.0.1 on MacOS X 10.4.11 (Intel Core Duo), 32-bit - GNU gcc 4.1.2 on RHEL 3 update 7 (Opteron), 64-bit - Sun C 5.8 on Solaris 10 (Opteron), both 32- and 64-bit Also interesting might be that the tests run 25+ times faster with the C math.sum compared to the Python implementation of msum(). /Jean Brouwers __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 05:02:41 2008 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 19 May 2008 03:02:41 +0000 Subject: [issue1447222] tkinter Dialog fails when more than four buttons are used Message-ID: <1211166159.69.0.522548260556.issue1447222@psf.upfronthosting.co.za> Guilherme Polo added the comment: I just tried it here and it still happens, it also happens for the 11th button and that is it (5th and 11th). I tried it with tk 8.4 and tk 8.5, python-trunk, python 2.5.2. I'm investigating this. For some reason a pixel object is being returned inside a tuple. _tkinter detects a ListType object, then creates a tuple with one object, which is a pixel object and it has the value you would expect, 4 or 10. ---------- nosy: +gpolo _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 19 07:34:41 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Mon, 19 May 2008 05:34:41 +0000 Subject: [issue2849] Remove usage of rfc822 from the stdlib In-Reply-To: <1210726924.82.0.902490265063.issue2849@psf.upfronthosting.co.za> Message-ID: <1211175281.19.0.939934247038.issue2849@psf.upfronthosting.co.za> Humberto Diogenes added the comment: A quick search for rfc822 imports in py3k reveals this: $ find . -name '*.py' | xargs egrep -nr '(from|import) rfc822' ./Demo/scripts/mboxconvert.py:7:import rfc822 ./Lib/cgi.py:39:import rfc822 ./Lib/mimetools.py:5:import rfc822 ./Lib/test/test_rfc822.py:1:import rfc822 ./Lib/test/test_urllib2.py:587: import rfc822, socket ./Tools/faqwiz/faqwiz.py:210: import rfc822 ./Tools/scripts/mailerdaemon.py:3:import rfc822 ./Tools/versioncheck/pyversioncheck.py:2:import rfc822 The real "release blockers" should be cgi, mimetools and test_urllib2. ---------- nosy: +hdiogenes __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 08:00:34 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Mon, 19 May 2008 06:00: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: <1211176834.21.0.695902785055.issue2849@psf.upfronthosting.co.za> Humberto Diogenes added the comment: Correction: mimetools is also being removed from py3k (issue 2848). __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 08:36:32 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Mon, 19 May 2008 06:36:32 +0000 Subject: [issue2849] Remove usage of rfc822 from the stdlib In-Reply-To: <1210726924.82.0.902490265063.issue2849@psf.upfronthosting.co.za> Message-ID: <1211178992.64.0.594163229993.issue2849@psf.upfronthosting.co.za> Changes by Humberto Diogenes : Added file: http://bugs.python.org/file10375/remove_rfc822-test_urllib2.py __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 09:00:51 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Mon, 19 May 2008 07:00:51 +0000 Subject: [issue2849] Remove usage of rfc822 from the stdlib In-Reply-To: <1210726924.82.0.902490265063.issue2849@psf.upfronthosting.co.za> Message-ID: <1211180450.95.0.696897341165.issue2849@psf.upfronthosting.co.za> Humberto Diogenes added the comment: Tried to just replace rfc822.Message with email.message_from_file in cgi.py but it didn't work. I still have to figure out how to fix FieldStorage.read_multi. Added file: http://bugs.python.org/file10376/remove_rfc822-cgi-incomplete.py __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 09:48:44 2008 From: report at bugs.python.org (Jeevan Varshney) Date: Mon, 19 May 2008 07:48:44 +0000 Subject: [issue2445] Use The CygwinCCompiler Under Cygwin In-Reply-To: <1206117698.01.0.240143600903.issue2445@psf.upfronthosting.co.za> Message-ID: <1211183323.52.0.116291095341.issue2445@psf.upfronthosting.co.za> Jeevan Varshney added the comment: The following will also let environment variables be passed to the CygwinCCompiler. --- orig/sysconfig.py 2008-05-19 00:26:03.953125000 -0700 +++ copy/sysconfig.py 2008-05-19 00:14:51.609375000 -0700 @@ -145,7 +145,7 @@ Mainly needed on Unix, so we can plug in the information that varies across Unices and is stored in Python's Makefile. """ - if compiler.compiler_type == "unix": + if compiler.compiler_type in ("unix", "cygwin"): (cc, cxx, opt, cflags, ccshared, ldshared, so_ext) = \ get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SO') ---------- nosy: +jayvee __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 13:09:51 2008 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 19 May 2008 11:09:51 +0000 Subject: [issue615772] Tkinter.Misc has no __contains__ method Message-ID: <1211195390.67.0.416366843927.issue615772@psf.upfronthosting.co.za> Guilherme Polo added the comment: Can you tell me why anyone would do `option in widget` ? I don't see the benefit of making tkinter widgets more "dict-like". Do you have some good use cases ? ---------- nosy: +gpolo ____________________________________ Tracker ____________________________________ From report at bugs.python.org Mon May 19 13:49:46 2008 From: report at bugs.python.org (Mark Summerfield) Date: Mon, 19 May 2008 11:49:46 +0000 Subject: [issue2913] idlelib/EditorWindow.py uses xrange() In-Reply-To: <1211197785.96.0.212094869578.issue2913@psf.upfronthosting.co.za> Message-ID: <1211197785.96.0.212094869578.issue2913@psf.upfronthosting.co.za> New submission from Mark Summerfield : In Py30a5 idlelib/EditorWindow.py line 292 uses xrange() when it should use range(). ---------- components: IDLE messages: 67060 nosy: mark severity: normal status: open title: idlelib/EditorWindow.py uses xrange() versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 13:53:19 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 19 May 2008 11:53:19 +0000 Subject: [issue615772] Tkinter.Misc has no __contains__ method Message-ID: <1211197999.88.0.135258443571.issue615772@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- type: -> feature request ____________________________________ Tracker ____________________________________ From report at bugs.python.org Mon May 19 14:54:19 2008 From: report at bugs.python.org (Val Schmidt) Date: Mon, 19 May 2008 12:54:19 +0000 Subject: [issue2914] Logging TimedRotatingFileHandler Feature Request In-Reply-To: <1211201651.81.0.243384558767.issue2914@psf.upfronthosting.co.za> Message-ID: <1211201651.81.0.243384558767.issue2914@psf.upfronthosting.co.za> New submission from Val Schmidt : I would like the TimedRotatingFileHandler in the logging package to optionally rotate on UTC time rather than local time. In my world (oceanographic research ships) important things like log files must always use UTC time rather than relative local time because local time changes alot! Also it would be helpful to be able to configure the end-of-line termination explicitly for logging. For example, if one echos log entries out a serial port using the StreamHandler, one might want to specify \r, \n or some other such thing because of the funny gear on the other side of the serial line. The formatter method seems to default to \n (which I generally like) but there's no way to change it. ---------- messages: 67061 nosy: vschmidt severity: normal status: open title: Logging TimedRotatingFileHandler Feature Request type: feature request versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 16:43:59 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 May 2008 14:43:59 +0000 Subject: [issue2897] include structmember.h in Python.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1211208237.87.0.982558004934.issue2897@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Note that structmember.h pollutes global namespace with macros that do not have conventional Py_ or PY_ prefix. READONLY and RESTRICTED macros seem to be most likely to conflict with other code. I would be -0 on including tructmember.h in Python.h if flags macros are not properly renamed. +0 otherwise. T_* macros are probably OK, but T prefix is reminiscent of popular (in some circles) Taligent naming conventions: http://pcroot.cern.ch/TaligentDocs/TaligentOnline/DocumentRoot/1.0/Docs/bo oks/WM/WM_63.html#HEADING77 ---------- nosy: +belopolsky __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 17:09:40 2008 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 19 May 2008 15:09:40 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1211209780.18.0.531576336933.issue2898@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'm torn about the extra slot; I'd rather not add one, but I can't see how to make this flexible enough without one. It should definitely not be a built-in; the sys module is fine though (e.g. sys.getrefcount() lives there too). __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 17:38:20 2008 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 19 May 2008 15:38:20 +0000 Subject: [issue1447222] tkinter Dialog fails when more than four buttons are used Message-ID: <1211211500.24.0.209384165264.issue1447222@psf.upfronthosting.co.za> Guilherme Polo added the comment: The workaround is actually setting wantobjects to 0, which I doubt everyone will like. I've talked with a tcl developer and some interesting points were raised from the talk: 1) Looking at typePtr in _tkinter isn't actually good (this is used to convert the tcl object to a proper python object), because it may not work always, like in this case. But the person also mentioned he didnt't know of any good solutions to that problem. 2) Cause of the problem -- most likely: something else in the code that creates the message box is using the literal string "5" as a -borderwidth or a -padding or as something else that's passed to a widget. And the compiler uses the same Tcl_Obj * for that "5" and the "5" that you pass to [tk_dialog]. Apparently trying to fix this in Python would case some (major?) changes in _tkinter. _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 19 17:44:52 2008 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 19 May 2008 15:44:52 +0000 Subject: [issue2915] PyObject_IsInstance() doesn't find bases named in type(name, bases, dict) In-Reply-To: <1211211891.23.0.800845105801.issue2915@psf.upfronthosting.co.za> Message-ID: <1211211891.23.0.800845105801.issue2915@psf.upfronthosting.co.za> New submission from Stefan Behnel : While porting the code that Cython generates to Py3a5 (almost completed, BTW), I noticed a problem with class creation. We are currently using this call to create a new class in Py3: PyObject_CallFunctionObjArgs((PyObject *)&PyType_Type, name, bases, dict, NULL); As an example, I subtype the built-in "list" type like this (Cython code!): class B(list): def append(self, *args): for arg in args: list.append(self, arg) which calls type() as shown above with name="B" and bases=(PyList_Type,). Surprisingly to me, the call to .append() then fails in the method descriptor code with a type error on "self". I tried calling super(...) instead, and it gives a similar error. I read through the descriptor code and the thing that fails here is PyObject_IsInstance(self, (PyObject *)(descr->d_type)) in line 229 of descrobject.c, which internally calls PyObject_TypeCheck(inst, (PyTypeObject *)cls) in line 2543 of abstract.c. The problem here is that this checks the ob_type, which holds a "type" and not a "B", so it doesn't find the base type "list" of the "B" type and instead looks through the base types of "type". The result is that PyObject_IsInstance() does not consider the result of the above call to type(name, bases, dict) an instance of the types that were named in "bases". As this works in Python 2.5.1 and also for equivalent Python code in the interpreter of Python 3.0a5, I assume that this is a bug in the alpha version. ---------- components: Interpreter Core messages: 67065 nosy: scoder severity: normal status: open title: PyObject_IsInstance() doesn't find bases named in type(name, bases, dict) type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 17:52:12 2008 From: report at bugs.python.org (Mads Kiilerich) Date: Mon, 19 May 2008 15:52:12 +0000 Subject: [issue2916] urlgrabber.grabber calls setdefaulttimeout In-Reply-To: <1211212331.88.0.0515887247336.issue2916@psf.upfronthosting.co.za> Message-ID: <1211212331.88.0.0515887247336.issue2916@psf.upfronthosting.co.za> New submission from Mads Kiilerich : Module docstring says """Setting this option causes urlgrabber to call the settimeout method on the Socket object used for the request.""" But actually it temporarily changes the global default timeout. If other threads are creating sockets in this short timespan they might fail in unexpected ways. There might not be any other easy way to set a timeout. The long term solution should be to provide a way to do it right. A short term workaround it to update the documentation to describe current behaviour. ---------- components: Library (Lib) messages: 67066 nosy: kiilerix severity: normal status: open title: urlgrabber.grabber calls setdefaulttimeout versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 17:52:43 2008 From: report at bugs.python.org (Mads Kiilerich) Date: Mon, 19 May 2008 15:52:43 +0000 Subject: [issue2916] urlgrabber.grabber calls setdefaulttimeout In-Reply-To: <1211212331.88.0.0515887247336.issue2916@psf.upfronthosting.co.za> Message-ID: <1211212363.65.0.432941149198.issue2916@psf.upfronthosting.co.za> Changes by Mads Kiilerich : ---------- type: -> behavior __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 19:57:21 2008 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 19 May 2008 17:57:21 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211219840.86.0.0199962295967.issue2819@psf.upfronthosting.co.za> Mark Dickinson added the comment: The latest mathmodule patch (file 10371) looks pretty good to me. I haven't looked at the complex version yet. A few comments: - for setting _do_sum_pow_2 I think you should use ldexp instead of pow; there's a much greater chance of pow giving inexact results. - trying to support FLT_RADIX != 2 seems futile; for a start, the whole algorithm and its proof would need to be reexamined. Any code specific to FLT_RADIX != 2 would be very difficult to test---all of the Python buildbots are IEEE 754, for example. I'm not sure what the best solution is: perhaps math.sum should only be included when FLT_RADIX = 2, or (even better) when IEEE 754 is in use. It shouldn't be too hard to add autoconf tests to detect the float format. - there are long lines in _do_sum, in violation of PEP 7; maybe factoring out the memory-management code for the partials array would help? - it would be nice to have some brief comments before each of the _do_sum functions indicating its purpose. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 20:08:26 2008 From: report at bugs.python.org (Rafael Zanella) Date: Mon, 19 May 2008 18:08:26 +0000 Subject: [issue2791] subprocess.py leaks fd in communicate In-Reply-To: <1210249364.92.0.977353677692.issue2791@psf.upfronthosting.co.za> Message-ID: <1211220506.7.0.699251035327.issue2791@psf.upfronthosting.co.za> Rafael Zanella added the comment: I don't know a lot about the matter at hand, that's why I'm not gonna append a patch. On "_communicate()" after a pipe is read it's closed, doing the same on "communicate()" seems to solve the issue of the extra pipe: """ if [self.stdin, self.stdout, self.stderr].count(None) >= 2: stdout = None stderr = None if self.stdin: if input: self.stdin.write(input) self.stdin.close() elif self.stdout: stdout = self.stdout.read() + self.stdout.close() elif self.stderr: stderr = self.stderr.read() + self.stderr.close() self.wait() return (stdout, stderr) """ Tested on "Python 2.6a2+ (trunk:62767M, May 19 2008, 13:11:07)". ---------- nosy: +zanella __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 20:14:55 2008 From: report at bugs.python.org (Mark Veldhuis) Date: Mon, 19 May 2008 18:14:55 +0000 Subject: [issue2755] IDLE ignores module change before restart In-Reply-To: <1209909321.12.0.0383863642875.issue2755@psf.upfronthosting.co.za> Message-ID: <1211220895.52.0.355688460188.issue2755@psf.upfronthosting.co.za> Mark Veldhuis added the comment: Sure, and thank you for your efforts. It will be interesting to see if it really is the package. If there is anything I can do to test, just drop a note. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 21:07:27 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 19 May 2008 19:07:27 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211224047.13.0.104168580683.issue2775@psf.upfronthosting.co.za> Brett Cannon added the comment: OK, so it turns out the way renames have been handled breaks pre-existing pickles. That means that the stubs in 2.6 will actually have to be the new names and not the old ones. I will work with the stdlib-sig to try to come up with a reasonable way to rectify the situation, but until then do NOT check in any rename patches. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 21:59:22 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 19 May 2008 19:59:22 +0000 Subject: [issue2917] merge pickle and cPickle in 3.0 In-Reply-To: <1211227162.29.0.0642317760161.issue2917@psf.upfronthosting.co.za> Message-ID: <1211227162.29.0.0642317760161.issue2917@psf.upfronthosting.co.za> New submission from Brett Cannon : cPickle should be gone in 3.0 and pickle should have an accelerated version behind it, when available. Alexandre has been working on this (might even be checked in), so assigning to him to help track for PEP 3108 work. ---------- assignee: alexandre.vassalotti components: Library (Lib) messages: 67071 nosy: alexandre.vassalotti, brett.cannon priority: release blocker severity: normal status: open title: merge pickle and cPickle in 3.0 type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 22:01:02 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 19 May 2008 20:01:02 +0000 Subject: [issue2918] Merge StringIO/cStringIO in 3.0 In-Reply-To: <1211227262.27.0.176120683389.issue2918@psf.upfronthosting.co.za> Message-ID: <1211227262.27.0.176120683389.issue2918@psf.upfronthosting.co.za> New submission from Brett Cannon : PEP 3108 calls for StringIO (which is io.StringIO in 3.0) to have an accelerated version behind it when available. Alexandre has been working on this so assigning to him. ---------- assignee: alexandre.vassalotti components: Library (Lib) messages: 67072 nosy: alexandre.vassalotti, brett.cannon priority: release blocker severity: normal status: open title: Merge StringIO/cStringIO in 3.0 type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 22:02:14 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 19 May 2008 20:02:14 +0000 Subject: [issue2919] Merge profile/cProfile in 3.0 In-Reply-To: <1211227334.77.0.551300594218.issue2919@psf.upfronthosting.co.za> Message-ID: <1211227334.77.0.551300594218.issue2919@psf.upfronthosting.co.za> New submission from Brett Cannon : cProfile should go away in 3.0 (as a public module) and just be what profile uses when available. ---------- components: Library (Lib) messages: 67073 nosy: brett.cannon priority: release blocker severity: normal status: open title: Merge profile/cProfile in 3.0 type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 22:02:29 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 19 May 2008 20:02:29 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211227349.25.0.178213055385.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Merge StringIO/cStringIO in 3.0, Merge profile/cProfile in 3.0, merge pickle and cPickle in 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 22:14:39 2008 From: report at bugs.python.org (Yannick Gingras) Date: Mon, 19 May 2008 20:14:39 +0000 Subject: [issue2920] Patch to print symbolic value or errno in EnvironmentError.__str__() In-Reply-To: <1211228076.96.0.534347381118.issue2920@psf.upfronthosting.co.za> Message-ID: <1211228076.96.0.534347381118.issue2920@psf.upfronthosting.co.za> New submission from Yannick Gingras : EnvironmentError and its subclass OSError add the value of errno in their error message. This value is an integer but the specific value in an implementation detail and the C runtime recommends that programmers use the symbolic values instead. Ex: one should use ENODATA instead of 61. For the same reason, the Python interpreter should try to return the symbolic value or errno when possible. The attached patch replaces errno in EnvironmentError.__str__() by its symbolic value when possible. ---------- components: Interpreter Core files: python-26-sympolic-errno.diff keywords: patch messages: 67074 nosy: ygingras severity: normal status: open title: Patch to print symbolic value or errno in EnvironmentError.__str__() versions: Python 2.6 Added file: http://bugs.python.org/file10377/python-26-sympolic-errno.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 22:48:12 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 19 May 2008 20:48:12 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211209780.18.0.531576336933.issue2898@psf.upfronthosting.co.za> Message-ID: <4831E787.9040300@v.loewis.de> Martin v. L?wis added the comment: > I'm torn about the extra slot; I'd rather not add one, but I can't see > how to make this flexible enough without one. I think adding a default __sizeof__ implementation into object (__basicsize__ + len()*__itemsize__), plus overriding that in subclasses, should do the trick. Not adding the default into object would cause an exception to be raised whenever sys.sizeof checks for __sizeof__, which is fairly expensive. Having to look __sizeof__ up in the class dictionary, and creating an argument list, is still fairly expensive (given that the application we have in mind will apply sizeof to all objects, repeatedly), however, this being a debugging facility, this overhead is probably ok. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 23:03:41 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 19 May 2008 21:03:41 +0000 Subject: [issue2854] Add gestalt back into Python 3.0 In-Reply-To: <1210795778.91.0.672202960486.issue2854@psf.upfronthosting.co.za> Message-ID: <1211231021.54.0.584173965084.issue2854@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is just a reminder to myself that when this is checked in, I need to unblock and merge r63460 and r63464. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 23:14:07 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Mon, 19 May 2008 21:14:07 +0000 Subject: [issue2920] Patch to print symbolic value or errno in EnvironmentError.__str__() In-Reply-To: <1211228076.96.0.534347381118.issue2920@psf.upfronthosting.co.za> Message-ID: <1211231647.57.0.758971207921.issue2920@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Overall, the patch looks good. I made a couple of fixes to make the changes more robust. ---------- nosy: +alexandre.vassalotti priority: -> normal type: -> feature request Added file: http://bugs.python.org/file10378/symbolic-errno.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 23:29:23 2008 From: report at bugs.python.org (Hallvard B Furuseth) Date: Mon, 19 May 2008 21:29:23 +0000 Subject: [issue2921] enable embedding: declare/#define only py* symbols in #includes In-Reply-To: <1211232563.03.0.480695098403.issue2921@psf.upfronthosting.co.za> Message-ID: <1211232563.03.0.480695098403.issue2921@psf.upfronthosting.co.za> New submission from Hallvard B Furuseth : It can be cumbersome to embed Python in a program which also #includes a config.h from autoconf, because Python's and the program's autoconf macros may interfere with each other. Assuming it compiles at all, both could define the same features, sometimes the same way and sometimes differently. Or one could be compiled with a feature macro undefined and another with it defined, resulting in binary incompatibility with the library which was compiled with the macro undefined. So one has to do something like: put the Python calls in one set of files, the calls to the embedding program in another set, and make them communicate via some glue code. For this reason, please do not declare/#define symbols other than those starting with 'py' in the include files that an embedded program needs. Thus, do not #include at least pyconfig.h, pymath.h and pyport.h as they are today. Or to keep backwards compatibility, wrap such definitions in #ifndef PYTHON_NAMESPACE_ONLY which an application can #define before #including Python files. Instead, you can #define/declare symbols that match the current autoconf symbols but are prefixed with PY_, and make use of those in #ifdefs in the include files. The files defining this can hopefully be autogenerated, e.g. generate a .c file like #include "pyconfig.h" int main() { #ifdef HAVE_WHATEVER puts("PY_HAVE_WHATEVER"); #endif ... } Things like acosh() from pymath.h which you define if the system lacks it, could become something like this: #include /* get acosh etc */ ... extern double py_acosh(double); /* always present in python */ #if !defined(PYTHON_NAMESPACE_ONLY) && !defined(HAVE_ACOSH) /* an other package's autoconf might do the same, so hide this * if requested */ extern double acosh(double); #endif #if !defined(PYTHON_NAMESPACE_ONLY) || defined(HAVE_ACOSH) #define py_acosh acosh /* optimization - hide wrapper function */ #endif ---------- components: None messages: 67078 nosy: hfuru severity: normal status: open title: enable embedding: declare/#define only py* symbols in #includes type: feature request versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 23:29:59 2008 From: report at bugs.python.org (John Burnett) Date: Mon, 19 May 2008 21:29:59 +0000 Subject: [issue2922] "No windows home dir" doc error In-Reply-To: <1211232599.63.0.873438869576.issue2922@psf.upfronthosting.co.za> Message-ID: <1211232599.63.0.873438869576.issue2922@psf.upfronthosting.co.za> New submission from John Burnett : http://docs.python.org/inst/alt-install-windows.html The above says "Windows has no concept of a user's home directory, and since the standard Python installation under Windows is simpler than under Unix, the --prefix option has traditionally been used to install additional packages in separate locations on Windows." However, any modern Windows OS does have that concept (i.e. see the %USERPROFILE% env variable). Not sure how to best change the above, but... ---------- assignee: georg.brandl components: Documentation messages: 67079 nosy: georg.brandl, python at johnburnett.com severity: normal status: open title: "No windows home dir" doc error versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 19 23:32:04 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 19 May 2008 21:32:04 +0000 Subject: [issue2921] enable embedding: declare/#define only py* symbols in #includes In-Reply-To: <1211232563.03.0.480695098403.issue2921@psf.upfronthosting.co.za> Message-ID: <1211232724.63.0.782298927902.issue2921@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- components: +Interpreter Core -None __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 00:07:33 2008 From: report at bugs.python.org (John Burnett) Date: Mon, 19 May 2008 22:07:33 +0000 Subject: [issue2922] "No windows home dir" doc error In-Reply-To: <1211232599.63.0.873438869576.issue2922@psf.upfronthosting.co.za> Message-ID: <1211234853.63.0.542015943158.issue2922@psf.upfronthosting.co.za> Changes by John Burnett : ---------- type: -> behavior __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 00:18:26 2008 From: report at bugs.python.org (Jean Brouwers) Date: Mon, 19 May 2008 22:18:26 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211235506.39.0.0290985230767.issue2819@psf.upfronthosting.co.za> Jean Brouwers added the comment: Here is another patch for the mathmodule.c and cmathmodule.c files updated with the suggested and other modifications. Note, if FLT_RADIX is not 2, the sum functions still exist but will raise a NotImplementedError. An update of the test script is also attached. The tests all pass on the same 4 Python 2.6a3 builds mentioned before. /Jean Brouwers Added file: http://bugs.python.org/file10379/mathmodule5.c.2.6a3.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 00:18:49 2008 From: report at bugs.python.org (Jean Brouwers) Date: Mon, 19 May 2008 22:18:49 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211235529.31.0.107147718279.issue2819@psf.upfronthosting.co.za> Changes by Jean Brouwers : Added file: http://bugs.python.org/file10380/cmathmodule5.c.2.6a3.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 00:20:09 2008 From: report at bugs.python.org (Jean Brouwers) Date: Mon, 19 May 2008 22:20:09 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211235609.78.0.247410507365.issue2819@psf.upfronthosting.co.za> Changes by Jean Brouwers : Added file: http://bugs.python.org/file10381/test_math_sum5.py __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 00:58:45 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 19 May 2008 22:58:45 +0000 Subject: [issue1775025] zipfile: Allow reading duplicate filenames Message-ID: <1211237924.05.0.791736382545.issue1775025@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- type: -> feature request versions: +Python 2.6 _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 20 01:30:18 2008 From: report at bugs.python.org (Scott Dial) Date: Mon, 19 May 2008 23:30:18 +0000 Subject: [issue1775025] zipfile: Allow reading duplicate filenames Message-ID: <1211239810.62.0.798536854145.issue1775025@psf.upfronthosting.co.za> Scott Dial added the comment: In the patch you commented "why is 'filepos' computed next? It's never referenced." The answer is that back at r54152 (#1121142) the method was rewrote removing any reference to 'filepos', but the patch author failed to remove that line. Please remove it. ---------- nosy: +scottdial _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 20 01:50:25 2008 From: report at bugs.python.org (Graham Horler) Date: Mon, 19 May 2008 23:50:25 +0000 Subject: [issue1775025] zipfile: Allow reading duplicate filenames Message-ID: <1211241025.14.0.760999219939.issue1775025@psf.upfronthosting.co.za> Graham Horler added the comment: Updated to latest revision, and converted documentation part of the patch to reST. Removed the line that pointlessly computes 'filepos', as requested by Scott Dial. (Please excuse my reST, I'm new to it and it's getting late). Added file: http://bugs.python.org/file10382/zipfile_62920.diff _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 20 02:25:37 2008 From: report at bugs.python.org (Cameron Simpson) Date: Tue, 20 May 2008 00:25:37 +0000 Subject: [issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails Message-ID: <1211243136.97.0.529563784743.issue1424152@psf.upfronthosting.co.za> Changes by Cameron Simpson : ---------- nosy: +cameron _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 20 02:37:47 2008 From: report at bugs.python.org (Cameron Simpson) Date: Tue, 20 May 2008 00:37:47 +0000 Subject: [issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails Message-ID: <1211243867.69.0.427717563783.issue1424152@psf.upfronthosting.co.za> Cameron Simpson added the comment: Chris, I'm trying your patch out now. My quick reading of it looks ok. _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 20 06:06:01 2008 From: report at bugs.python.org (Neal Norwitz) Date: Tue, 20 May 2008 04:06:01 +0000 Subject: [issue1574217] isinstance swallows exceptions In-Reply-To: <1210977029.56.0.919152323323.issue1574217@psf.upfronthosting.co.za> Message-ID: Neal Norwitz added the comment: > I'd like to clarify the approach to fixing these types of problems. > ... > However, I like constricting it to AttributeError only as that would > make it much less confusing. This might be something to bring up on > python-dev. I suspect that it might be on a case by case basis whether we want to constrain more or less. Bringing these cases up on python-dev should lead to speedy decisions. _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 20 06:15:37 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 04:15:37 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211256936.84.0.0754715659069.issue2775@psf.upfronthosting.co.za> Brett Cannon added the comment: Because of pickle compatibility in 2.x, all renames in the trunk need to be reverted. Work in 3.0 is still fine and won't be touched. I have already updated the PEP with the new steps required for renames. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 06:16:03 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 04:16:03 +0000 Subject: [issue2621] rename test_support to support In-Reply-To: <1207960346.09.0.959941490384.issue2621@psf.upfronthosting.co.za> Message-ID: <1211256963.63.0.269086850307.issue2621@psf.upfronthosting.co.za> Brett Cannon added the comment: No renames will occur in 2.6, only in 3.0, which means this can happen whenever. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 06:16:45 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 04:16:45 +0000 Subject: [issue2861] Patch to rename markupbase to _markupbase In-Reply-To: <1210844561.67.0.674925614552.issue2861@psf.upfronthosting.co.za> Message-ID: <1211257005.6.0.332930944889.issue2861@psf.upfronthosting.co.za> Brett Cannon added the comment: This does not need to happen in 2.6; only 3.0. ---------- versions: +Python 3.0 -Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 06:17:21 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 04:17:21 +0000 Subject: [issue2875] Rename the thread module to _thread In-Reply-To: <1210913205.44.0.787741913156.issue2875@psf.upfronthosting.co.za> Message-ID: <1211257041.47.0.83979419275.issue2875@psf.upfronthosting.co.za> Brett Cannon added the comment: Renames are only occurring in 3.0, not 2.6. ---------- versions: -Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 06:18:51 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 04:18:51 +0000 Subject: [issue2876] Backport UserDict move in 3.0 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1211257130.93.0.0919152964959.issue2876@psf.upfronthosting.co.za> Brett Cannon added the comment: You only kept the UserDict class, right? Well, that means you need to deprecate DictMixin and any other classes in that module. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 06:19:17 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 04:19:17 +0000 Subject: [issue2876] Backport UserDict move in 3.0 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1211257157.34.0.214864744588.issue2876@psf.upfronthosting.co.za> Brett Cannon added the comment: And it is a release blocker as we are trying to get all deprecations into b1. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 06:22:24 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 04:22:24 +0000 Subject: [issue2877] Backport UserString move from 3.0 In-Reply-To: <1210913405.95.0.573859631329.issue2877@psf.upfronthosting.co.za> Message-ID: <1211257344.36.0.809341322736.issue2877@psf.upfronthosting.co.za> Brett Cannon added the comment: Is MutableString in the UserString module (and any other class) properly handled in 2.6 for transitioning to 3.0? And there is currently no fixer for UserString (same for UserDict). __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 06:22:44 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 04:22:44 +0000 Subject: [issue2879] Rename _winreg to winreg In-Reply-To: <1210913526.61.0.164470356579.issue2879@psf.upfronthosting.co.za> Message-ID: <1211257364.64.0.750998700985.issue2879@psf.upfronthosting.co.za> Brett Cannon added the comment: The rename is now mostly a 3.0 thing. ---------- versions: -Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 06:31:24 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 04:31:24 +0000 Subject: [issue2923] Revert ConfigParser rename in 2.6 In-Reply-To: <1211257882.61.0.790616237846.issue2923@psf.upfronthosting.co.za> Message-ID: <1211257882.61.0.790616237846.issue2923@psf.upfronthosting.co.za> New submission from Brett Cannon : The rename of ConfigParser in 2.6 needs to be reverted. Only a note in the docs should remain. ---------- components: Library (Lib) messages: 67093 nosy: brett.cannon priority: release blocker severity: normal status: open title: Revert ConfigParser rename in 2.6 type: behavior versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 06:32:56 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 04:32:56 +0000 Subject: [issue2924] Revert copy_reg rename in 2.6 In-Reply-To: <1211257975.76.0.263377086511.issue2924@psf.upfronthosting.co.za> Message-ID: <1211257975.76.0.263377086511.issue2924@psf.upfronthosting.co.za> New submission from Brett Cannon : The rename of copy_reg in 2.6 needs to reverted, leaving on a note in the docs. ---------- components: Library (Lib) messages: 67094 nosy: brett.cannon priority: release blocker severity: normal status: open title: Revert copy_reg rename in 2.6 type: behavior versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 06:34:09 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 04:34:09 +0000 Subject: [issue2925] Revert Queue rename in 2.6 In-Reply-To: <1211258049.35.0.372468669832.issue2925@psf.upfronthosting.co.za> Message-ID: <1211258049.35.0.372468669832.issue2925@psf.upfronthosting.co.za> New submission from Brett Cannon : The rename of Queue in 2.6 needs to be reverted with only a note in the docs to remain. ---------- components: Library (Lib) messages: 67095 nosy: brett.cannon priority: release blocker severity: normal status: open title: Revert Queue rename in 2.6 type: behavior versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 06:35:30 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 04:35:30 +0000 Subject: [issue2926] Revert SocketServer rename in 2.6 In-Reply-To: <1211258129.96.0.233519101848.issue2926@psf.upfronthosting.co.za> Message-ID: <1211258129.96.0.233519101848.issue2926@psf.upfronthosting.co.za> New submission from Brett Cannon : The rename of SocketServer in 2.6 needs to be reverted; only a note in the docs should remain. ---------- components: Library (Lib) messages: 67096 nosy: brett.cannon priority: release blocker severity: normal status: open title: Revert SocketServer rename in 2.6 type: behavior versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 06:36:55 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 04:36:55 +0000 Subject: [issue2880] Rename repr to reprlib In-Reply-To: <1210914200.71.0.373705833301.issue2880@psf.upfronthosting.co.za> Message-ID: <1211258215.1.0.0793851643031.issue2880@psf.upfronthosting.co.za> Brett Cannon added the comment: The rename of repr in 2.6 needs to be removed with only a note in the docs to remain. ---------- resolution: fixed -> status: closed -> open versions: -Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 06:37:51 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 04:37:51 +0000 Subject: [issue2882] Create the html package In-Reply-To: <1210914377.14.0.176353307506.issue2882@psf.upfronthosting.co.za> Message-ID: <1211258271.55.0.107284868976.issue2882@psf.upfronthosting.co.za> Brett Cannon added the comment: The changes in 2.6 need to be reverted, leaving only a note in the docs. ---------- resolution: fixed -> status: closed -> open versions: -Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 06:38:47 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 04:38:47 +0000 Subject: [issue2839] Moving lib-tk to tkinter package In-Reply-To: <1210615239.35.0.359819643531.issue2839@psf.upfronthosting.co.za> Message-ID: <1211258327.73.0.418023206065.issue2839@psf.upfronthosting.co.za> Brett Cannon added the comment: The changes in 2.6 need to be reverted, leaving only a note in the docs. ---------- nosy: +brett.cannon resolution: accepted -> status: closed -> open __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 06:39:04 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 04:39:04 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211258344.08.0.00439038209243.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Create the html package, Moving lib-tk to tkinter package, Rename repr to reprlib, Revert ConfigParser rename in 2.6, Revert Queue rename in 2.6, Revert SocketServer rename in 2.6, Revert copy_reg rename in 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 06:46:11 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 20 May 2008 04:46:11 +0000 Subject: [issue2876] Backport UserDict move in 3.0 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1211258771.45.0.0560353927275.issue2876@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The DictMixin class gets renamed to collections.MutableMapping. So, it is just another 2-to-3 converter job. ---------- status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 07:01:30 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 05:01:30 +0000 Subject: [issue2876] Write UserDict fixer for 2to3 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1211259690.52.0.505137856289.issue2876@psf.upfronthosting.co.za> Brett Cannon added the comment: The that needs to be added to 2to3. ---------- status: closed -> open title: Backport UserDict move in 3.0 -> Write UserDict fixer for 2to3 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 07:43:55 2008 From: report at bugs.python.org (Tom Pinckney) Date: Tue, 20 May 2008 05:43:55 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> New submission from Tom Pinckney : There is currently a private method inside of html.parser.HTMLParser to unescape HTML &...; style escapes. This would be useful to expose for other users who want to unescape a piece of HTML. Additionally, many websites don't use proper unicode or iso-8859-1 encodings and accidentally use Microsoft Code Page 1252 extensions. I added code to map these to their appropriate unicode values. The unescaping logic was slightly simplified too. This is my first Python patch submission, so please let me know if I've done anything wrong. A new test case was also added for this functionality. ---------- components: Library (Lib) files: unescape.diff keywords: patch messages: 67102 nosy: thomaspinckney3 severity: normal status: open title: expose html.parser.unescape type: feature request versions: Python 2.6 Added file: http://bugs.python.org/file10383/unescape.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 07:47:56 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 05:47:56 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <1211262476.0.0.177195141218.issue2927@psf.upfronthosting.co.za> Brett Cannon added the comment: The plan is to add html.escape(). Adding html.unescape() wouldn't hurt. ---------- nosy: +brett.cannon __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 08:01:40 2008 From: report at bugs.python.org (Adam Olsen) Date: Tue, 20 May 2008 06:01:40 +0000 Subject: [issue2928] Allow set/frozenset for __all__ In-Reply-To: <1211263300.31.0.206885021428.issue2928@psf.upfronthosting.co.za> Message-ID: <1211263300.31.0.206885021428.issue2928@psf.upfronthosting.co.za> New submission from Adam Olsen : Patch allows any iterable (such as set and frozenset) to be used for __all__. I also add some blank lines, making it more readable. ---------- files: python-importall.diff keywords: patch messages: 67104 nosy: Rhamphoryncus severity: normal status: open title: Allow set/frozenset for __all__ Added file: http://bugs.python.org/file10384/python-importall.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 08:11:42 2008 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Tue, 20 May 2008 06:11:42 +0000 Subject: [issue2882] Create the html package In-Reply-To: <1210914377.14.0.176353307506.issue2882@psf.upfronthosting.co.za> Message-ID: <1211263902.68.0.663881138015.issue2882@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: Python 2.6 changes reverted in revision 63481. Does anyone really want to pickle HTML parser state, or references to the helper functions in the htmlentitydefs module? I suspect head examinations may be in order. :-( ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 08:20:56 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 20 May 2008 06:20:56 +0000 Subject: [issue2922] "No windows home dir" doc error In-Reply-To: <1211232599.63.0.873438869576.issue2922@psf.upfronthosting.co.za> Message-ID: <1211264455.72.0.291902359438.issue2922@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The problem is that any modern Windows does not just have a single home directory for a user, but many of them. For example, there are the HOMEDRIVE, HOMESHARE, and HOMEPATH variables, which may or may not be set. In the light of these, I would argue that USERPROFILE is *not* the user's "home" directory - it is the user's "profile" directory. So I think that the text is practically correct as it stands. ---------- nosy: +loewis __________________________________ Tracker __________________________________ From brett at python.org Tue May 20 09:13:27 2008 From: brett at python.org (Brett Cannon) Date: Tue, 20 May 2008 00:13:27 -0700 Subject: [issue2882] Create the html package In-Reply-To: <1211263902.68.0.663881138015.issue2882@psf.upfronthosting.co.za> References: <1210914377.14.0.176353307506.issue2882@psf.upfronthosting.co.za> <1211263902.68.0.663881138015.issue2882@psf.upfronthosting.co.za> Message-ID: On Mon, May 19, 2008 at 11:11 PM, Fred L. Drake, Jr. wrote: > > Fred L. Drake, Jr. added the comment: > > Python 2.6 changes reverted in revision 63481. > > Does anyone really want to pickle HTML parser state, or references to > the helper functions in the htmlentitydefs module? I suspect head > examinations may be in order. :-( > I sincerely doubt it, but just to be safe, in the name of backwards-compatibility, it should just be done across the board. Thanks for doing the revert, Fred. From report at bugs.python.org Tue May 20 09:13:39 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 07:13:39 +0000 Subject: [issue2882] Create the html package In-Reply-To: <1211263902.68.0.663881138015.issue2882@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Mon, May 19, 2008 at 11:11 PM, Fred L. Drake, Jr. wrote: > > Fred L. Drake, Jr. added the comment: > > Python 2.6 changes reverted in revision 63481. > > Does anyone really want to pickle HTML parser state, or references to > the helper functions in the htmlentitydefs module? I suspect head > examinations may be in order. :-( > I sincerely doubt it, but just to be safe, in the name of backwards-compatibility, it should just be done across the board. Thanks for doing the revert, Fred. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 09:17:06 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Tue, 20 May 2008 07:17:06 +0000 Subject: [issue2861] Patch to rename markupbase to _markupbase In-Reply-To: <1210844561.67.0.674925614552.issue2861@psf.upfronthosting.co.za> Message-ID: <1211267826.31.0.538339313795.issue2861@psf.upfronthosting.co.za> Quentin Gallet-Gilles added the comment: I'll update the patches to reflect that. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 09:27:23 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 20 May 2008 07:27:23 +0000 Subject: [issue2839] Moving lib-tk to tkinter package In-Reply-To: <1210615239.35.0.359819643531.issue2839@psf.upfronthosting.co.za> Message-ID: <1211268443.13.0.209630591122.issue2839@psf.upfronthosting.co.za> Georg Brandl added the comment: Done in r63485-63491. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 09:33:51 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 20 May 2008 07:33:51 +0000 Subject: [issue2621] rename test_support to support In-Reply-To: <1207960346.09.0.959941490384.issue2621@psf.upfronthosting.co.za> Message-ID: <1211268828.83.0.546808825202.issue2621@psf.upfronthosting.co.za> Georg Brandl added the comment: Should be safe to apply now, Benjamin. ---------- assignee: brett.cannon -> benjamin.peterson resolution: -> accepted __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 09:50:51 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 20 May 2008 07:50:51 +0000 Subject: [issue2924] Revert copy_reg rename in 2.6 In-Reply-To: <1211257975.76.0.263377086511.issue2924@psf.upfronthosting.co.za> Message-ID: <1211269851.01.0.283105487043.issue2924@psf.upfronthosting.co.za> Georg Brandl added the comment: Done in r63493. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 10:07:08 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 20 May 2008 08:07:08 +0000 Subject: [issue2928] Allow set/frozenset for __all__ In-Reply-To: <1211263300.31.0.206885021428.issue2928@psf.upfronthosting.co.za> Message-ID: <1211270828.11.0.506529045442.issue2928@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Does this break code that adds to __all__ using append() and extend()? See the os module for an example. ---------- assignee: -> rhettinger nosy: +rhettinger type: -> feature request versions: +Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 10:11:51 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 20 May 2008 08:11:51 +0000 Subject: [issue2488] Backport sys.maxsize to Python 2.6 In-Reply-To: <1206488150.94.0.908333325517.issue2488@psf.upfronthosting.co.za> Message-ID: <1211271111.34.0.853053209504.issue2488@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the patch. Committed (with modifications) as r63498. ---------- nosy: +loewis resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 10:13:12 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 20 May 2008 08:13:12 +0000 Subject: [issue2928] Allow set/frozenset for __all__ In-Reply-To: <1211263300.31.0.206885021428.issue2928@psf.upfronthosting.co.za> Message-ID: <1211271191.79.0.601480194831.issue2928@psf.upfronthosting.co.za> Georg Brandl added the comment: You don't check for NULL return from PyObject_GetIter(). It will segfault for "__all__ = 1". That demonstrates that test cases are missing from the patch. :) Raymond: It shouldn't since __all__ is only inspected after the module code has been executed. ---------- nosy: +georg.brandl __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 10:25:32 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 20 May 2008 08:25:32 +0000 Subject: [issue2928] Allow set/frozenset for __all__ In-Reply-To: <1211263300.31.0.206885021428.issue2928@psf.upfronthosting.co.za> Message-ID: <1211271928.69.0.488543344472.issue2928@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The breakage isn't from the patch. The problem would come from using a non-list iterable for __all__ which then breaks any other code that assumes __all__ is a list (the code is os is an example of how __all__ can get modified). AFAICT, this proposal doesn't add value, but it does complicate life for those wanting to access/modify __all__ but can no longer make assumptions about its type (perhaps it is a generator that can be read just once and any accessor would kill it in the process of examining it). I don't see how this proposal adds value. It's just a random change that doesn't make life any better for coders. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 10:26:01 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 20 May 2008 08:26:01 +0000 Subject: [issue1775025] zipfile: Allow reading duplicate filenames Message-ID: <1211271961.24.0.667683081019.issue1775025@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, reviewed, added tests and committed as r63499. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 20 10:34:54 2008 From: report at bugs.python.org (Nashev) Date: Tue, 20 May 2008 08:34:54 +0000 Subject: [issue1794] Hot keys must work in any keyboard layout In-Reply-To: <1200070698.92.0.206138884505.issue1794@psf.upfronthosting.co.za> Message-ID: <1211272493.9.0.5320685736.issue1794@psf.upfronthosting.co.za> Nashev added the comment: https://bugzilla.mozilla.org/show_bug.cgi?id=69230 - it is the same bugreport for other program. It is contain many comments and explains :) __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 10:41:08 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 20 May 2008 08:41:08 +0000 Subject: [issue2592] weakref.proxy fails to delegate tp_index slot In-Reply-To: <1207671463.8.0.448450429291.issue2592@psf.upfronthosting.co.za> Message-ID: <1211272868.8.0.685010234248.issue2592@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r63500, together with the floor/truediv slots. ---------- assignee: -> georg.brandl nosy: +georg.brandl resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 10:45:33 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 20 May 2008 08:45:33 +0000 Subject: [issue2928] Allow set/frozenset for __all__ In-Reply-To: <1211263300.31.0.206885021428.issue2928@psf.upfronthosting.co.za> Message-ID: <1211273133.36.0.0197004562467.issue2928@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree. There seems to be no compelling use case. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 10:49:09 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 20 May 2008 08:49:09 +0000 Subject: [issue615772] Tkinter.Misc has no __contains__ method Message-ID: <1211273349.52.0.29722950056.issue615772@psf.upfronthosting.co.za> Georg Brandl added the comment: I'm closing this; YAGNI. However, I've added an explicit __contains__ method which raises a nice error message in r63501. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed ____________________________________ Tracker ____________________________________ From report at bugs.python.org Tue May 20 11:15:35 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 20 May 2008 09:15:35 +0000 Subject: [issue2928] Allow set/frozenset for __all__ In-Reply-To: <1211263300.31.0.206885021428.issue2928@psf.upfronthosting.co.za> Message-ID: <1211274935.13.0.43970647222.issue2928@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> rejected status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 12:21:18 2008 From: report at bugs.python.org (=?utf-8?q?Bj=C3=B6rn_Lindqvist?=) Date: Tue, 20 May 2008 10:21:18 +0000 Subject: [issue1732367] Document the constants in the socket module Message-ID: <1211278877.96.0.14502319265.issue1732367@psf.upfronthosting.co.za> Bj?rn Lindqvist added the comment: There is no progress on this. I had lots of documentation written in Latex on a laptop, but then I lost it. Sorry. ---------- nosy: +bjourne _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 20 13:36:03 2008 From: report at bugs.python.org (Eric Smith) Date: Tue, 20 May 2008 11:36:03 +0000 Subject: [issue2598] "{ +(}".format(**{' +(': 44}) should produce ValueError: invalid identifier, ' +(' in format In-Reply-To: <1207683524.11.0.610086195192.issue2598@psf.upfronthosting.co.za> Message-ID: <1211283362.4.0.566515763997.issue2598@psf.upfronthosting.co.za> Eric Smith added the comment: After discussing this with Talin, we've decided this is "works as designed". The problem, if any, is that **{' +(': 44} is allowed as a parameter. I think that perhaps that should be an error, but I haven't had time to research if this is already a known issue. ---------- resolution: -> rejected status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 13:41:59 2008 From: report at bugs.python.org (Eric Smith) Date: Tue, 20 May 2008 11:41:59 +0000 Subject: [issue2598] "{ +(}".format(**{' +(': 44}) should produce ValueError: invalid identifier, ' +(' in format In-Reply-To: <1207683524.11.0.610086195192.issue2598@psf.upfronthosting.co.za> Message-ID: <1211283719.62.0.416183723344.issue2598@psf.upfronthosting.co.za> Eric Smith added the comment: I should have been clearer. By "The problem, if any, is that **{' +(': 44} is allowed as a parameter", I meant in general, for all function/method calls. It's not an issue that's restricted to str.format(). __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 13:54:12 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 20 May 2008 11:54:12 +0000 Subject: [issue2621] rename test_support to support In-Reply-To: <1211268828.83.0.546808825202.issue2621@psf.upfronthosting.co.za> Message-ID: <1afaf6160805200454u37cdb595k6348b01e66d12d98@mail.gmail.com> Benjamin Peterson added the comment: On Tue, May 20, 2008 at 2:33 AM, Georg Brandl wrote: > > Georg Brandl added the comment: > > Should be safe to apply now, Benjamin. Will do today. -- Cheers, Benjamin Peterson "There's no place like 127.0.0.1." __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 14:34:12 2008 From: report at bugs.python.org (Stephan Blietz) Date: Tue, 20 May 2008 12:34:12 +0000 Subject: [issue2929] TimedRotatingFileHandler crashes on backup file deletion attempt In-Reply-To: <1211286852.1.0.356571953075.issue2929@psf.upfronthosting.co.za> Message-ID: <1211286852.1.0.356571953075.issue2929@psf.upfronthosting.co.za> New submission from Stephan Blietz : Hello, when the maximum number of backup files is reached TimedRotatingFileHandler can't delete the oldest existing file. I got the following error message: Traceback (most recent call last): File "D:\Python25\lib\logging\handlers.py", line 75, in emit self.doRollover() File "D:\Python25\lib\logging\handlers.py", line 319, in doRollover os.remove(s) WindowsError: [Error 2] The system cannot find the file specified: 'assyst.log.2008-05-20_12-49' The reason for this error is located in the getFilesToDelete method of the TimedRotatingFileHandler class. The result sequence of this method contains filenames but a complete filepath is needed. After replacing result.append(fileName) with result.append(os.path.join(dirName, fileName)) the problem seems to be solved Regards Stephan ---------- components: Library (Lib) messages: 67125 nosy: blocki severity: normal status: open title: TimedRotatingFileHandler crashes on backup file deletion attempt type: crash versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 15:15:47 2008 From: report at bugs.python.org (Mark Blakeney) Date: Tue, 20 May 2008 13:15:47 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1211289347.47.0.947405392982.issue1641@psf.upfronthosting.co.za> Changes by Mark Blakeney : ---------- nosy: +markb __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 15:26:00 2008 From: report at bugs.python.org (Hallvard B Furuseth) Date: Tue, 20 May 2008 13:26:00 +0000 Subject: [issue2921] enable embedding: declare/#define only py* symbols in #includes In-Reply-To: <1211232563.03.0.480695098403.issue2921@psf.upfronthosting.co.za> Message-ID: <1211289960.53.0.0773590204102.issue2921@psf.upfronthosting.co.za> Hallvard B Furuseth added the comment: Duh, I should of course have said defined(PY_HAVE_ACOSH) and not defined(HAVE_ACOSH), that was the whole point:-) And the puts() should print "#define PY_HAVE_WHATEVER 1". Hopefully there are not too many #defines which would need to get corresponding PY_* variants. For that matter, PYTHON_NAMESPACE_ONLY could offer a reduced Python C API - omitting parts it would be cumbersome to get right with only py* symbols. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 16:16:05 2008 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 20 May 2008 14:16:05 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211292964.84.0.286373415282.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: I've attached a sample ProxyBase class that delegates all of the special methods handled by weakref.proxy (as well as the tp_oct and tp_hex slots, which weakref.proxy ignores). While there are other special methods in CPython (e.g. __enter__ and __exit__), those don't bypass the normal lookup mechanism, so the __getattribute__ override should handle them. For lack of a better name, I called the module typetools (by analogy to functools). Note that correctly implementing a proxy class as a new-style class definitely turns out to be a fairly non-trivial exercise (and since this one is still sans-tests, I don't make any promises that even it is 100% correct at this point) Added file: http://bugs.python.org/file10385/typetools.py ____________________________________ Tracker ____________________________________ From report at bugs.python.org Tue May 20 16:42:57 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 20 May 2008 14:42:57 +0000 Subject: [issue2929] TimedRotatingFileHandler crashes on backup file deletion attempt In-Reply-To: <1211286852.1.0.356571953075.issue2929@psf.upfronthosting.co.za> Message-ID: <1211294577.05.0.447666568916.issue2929@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> vsajip nosy: +vsajip __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 16:42:55 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 20 May 2008 14:42:55 +0000 Subject: [issue2914] Logging TimedRotatingFileHandler Feature Request In-Reply-To: <1211201651.81.0.243384558767.issue2914@psf.upfronthosting.co.za> Message-ID: <1211294574.99.0.916985640454.issue2914@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> vsajip nosy: +vsajip __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 17:16:38 2008 From: report at bugs.python.org (=?utf-8?q?J=C3=B6rg_Rebenstorf?=) Date: Tue, 20 May 2008 15:16:38 +0000 Subject: [issue2930] Cannot change variable definied in __init_.py after importing In-Reply-To: <1211296598.61.0.428174810235.issue2930@psf.upfronthosting.co.za> Message-ID: <1211296598.61.0.428174810235.issue2930@psf.upfronthosting.co.za> New submission from J?rg Rebenstorf : How can I change a variable that I defined in "__init__.py" of a package called "common" from inside the .py file that imported the package? I think there is no way to do this, in contrast to when the variable is defined any other module of the same package but not in the specific "__init__.py" module. Example: If there is a variable named let's say "fileList" in the module "var.py" of the package "common" then I could modify the variable "fileList" from within the importing file like this: from common.var import * var.fileList = [ "bla", "blub" ] So that the change of the value of "fileList" is seen when reading it inside a function of "var.py" after this modification. But when the variable is defined inside "__init_.py" then the importing script cannot access it by writing: from common import * fileList = [ "bla", "blub" ] And it cannot access it by writing: from common import * common.fileList = [ "bla", "blub" ] Why are variables of "__init__.py" module non-modifyable this way and all others of submodules of the same package are modifyable? Maybe there is this conceptional problem of the python language here or did I miss something? ---------- components: Interpreter Core messages: 67128 nosy: crayor severity: normal status: open title: Cannot change variable definied in __init_.py after importing type: behavior versions: Python 2.3 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 17:24:27 2008 From: report at bugs.python.org (=?utf-8?q?J=C3=B6rg_Rebenstorf?=) Date: Tue, 20 May 2008 15:24:27 +0000 Subject: [issue2930] Cannot change variable defined in __init_.py after importing In-Reply-To: <1211296598.61.0.428174810235.issue2930@psf.upfronthosting.co.za> Message-ID: <1211297067.96.0.973852991908.issue2930@psf.upfronthosting.co.za> Changes by J?rg Rebenstorf : ---------- title: Cannot change variable definied in __init_.py after importing -> Cannot change variable defined in __init_.py after importing __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 17:24:58 2008 From: report at bugs.python.org (=?utf-8?q?J=C3=B6rg_Rebenstorf?=) Date: Tue, 20 May 2008 15:24:58 +0000 Subject: [issue2930] Cannot change variable defined in "__init__.py" after importing In-Reply-To: <1211296598.61.0.428174810235.issue2930@psf.upfronthosting.co.za> Message-ID: <1211297098.87.0.546125974817.issue2930@psf.upfronthosting.co.za> Changes by J?rg Rebenstorf : ---------- title: Cannot change variable defined in __init_.py after importing -> Cannot change variable defined in "__init__.py" after importing __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 17:31:19 2008 From: report at bugs.python.org (Alexey Shamrin) Date: Tue, 20 May 2008 15:31:19 +0000 Subject: [issue2931] optparse: various problems with unicode and gettext In-Reply-To: <1211297479.44.0.970954846769.issue2931@psf.upfronthosting.co.za> Message-ID: <1211297479.44.0.970954846769.issue2931@psf.upfronthosting.co.za> New submission from Alexey Shamrin : In the process of trying to use optparse with russian messages, I found several problems with gettext and unicode handling: 1. optparse.OptionParser.error function doesn't work with unicode argument 2. optparse doesn't work when its error messages are gettext-translated 3. optparse fails running 'prog.py --help > out.txt' with unicode help (at least on my system: Windows XP, Russian) I have attached a file demonstrating these problems: test_optparse.py. You can run it either using nose[1] or directly, manually uncommenting test_* functions one-by-one. [1]: http://www.somethingaboutorange.com/mrl/projects/nose/ Here's the result of running `nosetests test_optparse.py`: EEF ====================================================================== ERROR: OptionParser.error function doesn't work with unicode argument ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\python25\lib\site-packages\nose-0.10.2-py2.5.egg\nose\case.py", line 182, in runTest self.test(*self.arg) File "C:\work\test_optparse.py", line 10, in test_unicode_error optparse.OptionParser().error(russian_text) File "C:\Python25\lib\optparse.py", line 1562, in error self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg)) File "C:\Python25\lib\optparse.py", line 1551, in exit sys.stderr.write(msg) UnicodeEncodeError: 'ascii' codec can't encode characters in position 28-34: ordinal not in range(128) ====================================================================== ERROR: optparse doesn't work when its error messages are gettext-translated ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\python25\lib\site-packages\nose-0.10.2-py2.5.egg\nose\case.py", line 182, in runTest self.test(*self.arg) File "C:\work\test_optparse.py", line 25, in test_translated_unicode_error_message optparse.OptionParser().parse_args(["--unknown"]) File "C:\Python25\lib\optparse.py", line 1380, in parse_args self.error(str(err)) UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-6: ordinal not in range(128) ====================================================================== FAIL: optparse fails running 'prog.py --help > out.txt' with unicode help ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\python25\lib\site-packages\nose-0.10.2-py2.5.egg\nose\case.py", line 182, in runTest self.test(*self.arg) File "C:\work\test_optparse.py", line 42, in test_redirected_unicode_help assert '?????' not in dummy_stdout.getvalue() AssertionError ---------------------------------------------------------------------- Ran 3 tests in 0.000s FAILED (errors=2, failures=1) ---------- components: Library (Lib) files: test_optparse.py messages: 67129 nosy: ash, gward severity: normal status: open title: optparse: various problems with unicode and gettext Added file: http://bugs.python.org/file10386/test_optparse.py __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 17:42:28 2008 From: report at bugs.python.org (Alexey Shamrin) Date: Tue, 20 May 2008 15:42:28 +0000 Subject: [issue2931] optparse: various problems with unicode and gettext In-Reply-To: <1211297479.44.0.970954846769.issue2931@psf.upfronthosting.co.za> Message-ID: <1211298148.33.0.388750856283.issue2931@psf.upfronthosting.co.za> Alexey Shamrin added the comment: I've also attached a patch that fixes all these issues and also allows the word "error" to be translated with gettext. Regarding the use of `locale.getpreferredencoding` instead of `sys.getdefaultencoding`. On my system (Windows XP, Russian) I get: Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys, locale >>> sys.getdefaultencoding() 'ascii' >>> locale.getpreferredencoding() 'cp1251' Using cp1251 on my system makes much more sense. It's used as a default encoding everywhere in the system. For example, in Notepad. ---------- keywords: +patch Added file: http://bugs.python.org/file10387/optparse.py.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 17:43:09 2008 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 20 May 2008 15:43:09 +0000 Subject: [issue2929] TimedRotatingFileHandler crashes on backup file deletion attempt In-Reply-To: <1211286852.1.0.356571953075.issue2929@psf.upfronthosting.co.za> Message-ID: <1211298189.56.0.264104146853.issue2929@psf.upfronthosting.co.za> Vinay Sajip added the comment: Fix checked into trunk (r63507). Thanks for the report! ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 17:46:47 2008 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 20 May 2008 15:46:47 +0000 Subject: [issue2914] Logging TimedRotatingFileHandler Feature Request In-Reply-To: <1211201651.81.0.243384558767.issue2914@psf.upfronthosting.co.za> Message-ID: <1211298407.41.0.245149298569.issue2914@psf.upfronthosting.co.za> Vinay Sajip added the comment: Fix checked into trunk (r63507). TimedRotatingFileHandler now takes an optional "utc" parameter - defaults to 0 (localtime); set it to 1 to enable UTC. (Note: True/False not used since we're still supposed to work under 1.5.2 - this will be fixed during a later, more comprehensive reworking of the module). ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 17:47:22 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 20 May 2008 15:47:22 +0000 Subject: [issue2930] Cannot change variable defined in "__init__.py" after importing In-Reply-To: <1211296598.61.0.428174810235.issue2930@psf.upfronthosting.co.za> Message-ID: <1211298442.49.0.315535384343.issue2930@psf.upfronthosting.co.za> Georg Brandl added the comment: Use import common common.fileList = ... Please ask further question on python-list (comp.lang.python) -- this is not a bug. ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 18:28:14 2008 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 20 May 2008 16:28:14 +0000 Subject: [issue2860] re module fails to handle byte strings In-Reply-To: <1210838903.44.0.718972367839.issue2860@psf.upfronthosting.co.za> Message-ID: <1211300893.5.0.23905445605.issue2860@psf.upfronthosting.co.za> Stefan Behnel added the comment: Ah, I now see what the actual problem is. Byte strings return the byte value on indexing. Changing the title accordingly. ---------- title: re module fails to handle digits in byte strings -> re module fails to handle byte strings __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 20:18:54 2008 From: report at bugs.python.org (Adam Olsen) Date: Tue, 20 May 2008 18:18:54 +0000 Subject: [issue2928] Allow set/frozenset for __all__ In-Reply-To: <1211263300.31.0.206885021428.issue2928@psf.upfronthosting.co.za> Message-ID: <1211307533.36.0.283984432798.issue2928@psf.upfronthosting.co.za> Adam Olsen added the comment: tuples are already allowed for __all__, which breaks attempts to monkey-patch it. I did forget to check the return from PyObject_GetIter. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 20:33:09 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 20 May 2008 18:33:09 +0000 Subject: [issue2808] asynchat forgets packets when push is called from a thread In-Reply-To: <1210417225.64.0.883655852515.issue2808@psf.upfronthosting.co.za> Message-ID: <1211308389.85.0.552650630058.issue2808@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola, josiah.carlson, josiahcarlson __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 20:47:49 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 18:47:49 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211309269.45.0.401395596177.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: -Create the html package, Moving lib-tk to tkinter package, Revert copy_reg rename in 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 20 20:49:04 2008 From: report at bugs.python.org (Adam Olsen) Date: Tue, 20 May 2008 18:49:04 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211309344.12.0.31068781633.issue643841@psf.upfronthosting.co.za> Adam Olsen added the comment: Is there any reason not to name it ProxyMixin, ala DictMixin? ---------- nosy: +Rhamphoryncus ____________________________________ Tracker ____________________________________ From report at bugs.python.org Tue May 20 23:38:33 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 20 May 2008 21:38:33 +0000 Subject: [issue2621] rename test_support to support In-Reply-To: <1207960346.09.0.959941490384.issue2621@psf.upfronthosting.co.za> Message-ID: <1211319508.9.0.219194964104.issue2621@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Done in r63512. ---------- status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 00:09:38 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 22:09:38 +0000 Subject: [issue2621] rename test_support to support In-Reply-To: <1207960346.09.0.959941490384.issue2621@psf.upfronthosting.co.za> Message-ID: <1211321378.04.0.0366825705647.issue2621@psf.upfronthosting.co.za> Brett Cannon added the comment: I just added the note to the docs in 2.6. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 00:09:56 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 20 May 2008 22:09:56 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211321396.34.0.638626792152.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: -rename test_support to support __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 01:45:22 2008 From: report at bugs.python.org (Facundo Batista) Date: Tue, 20 May 2008 23:45:22 +0000 Subject: [issue2844] int() lies about base parameter In-Reply-To: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za> Message-ID: <1211327122.48.0.851441248999.issue2844@psf.upfronthosting.co.za> Changes by Facundo Batista : __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 02:04:57 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 21 May 2008 00:04:57 +0000 Subject: [issue2844] int() lies about base parameter In-Reply-To: <1210673035.74.0.555246822521.issue2844@psf.upfronthosting.co.za> Message-ID: <1211328296.27.0.352575268878.issue2844@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Agreed. Totally a non-issue. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 02:05:29 2008 From: report at bugs.python.org (Facundo Batista) Date: Wed, 21 May 2008 00:05:29 +0000 Subject: [issue1333] merge urllib and urlparse functionality In-Reply-To: <1193400988.05.0.68480909797.issue1333@psf.upfronthosting.co.za> Message-ID: <1211328328.95.0.833140732453.issue1333@psf.upfronthosting.co.za> Facundo Batista added the comment: Brett, in consideration of PEP 3108... shouldn't we close this issue? The urilib module in the sandbox wasn't updated in the last seven months. Or we just keep this open as a reminder? (of what?) Thanks! ---------- nosy: +facundobatista __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 02:25:40 2008 From: report at bugs.python.org (Facundo Batista) Date: Wed, 21 May 2008 00:25:40 +0000 Subject: [issue2583] urlparse normalize URL path In-Reply-To: <1207663018.75.0.231530474022.issue2583@psf.upfronthosting.co.za> Message-ID: <1211329538.09.0.326146021456.issue2583@psf.upfronthosting.co.za> Facundo Batista added the comment: Not a bug... ---------- nosy: +facundobatista resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 03:12:08 2008 From: report at bugs.python.org (Wallace Owen) Date: Wed, 21 May 2008 01:12:08 +0000 Subject: [issue2932] Documenting Python: Syntax" In-Reply-To: <1211332326.77.0.550241856436.issue2932@psf.upfronthosting.co.za> Message-ID: <1211332326.77.0.550241856436.issue2932@psf.upfronthosting.co.za> New submission from Wallace Owen : http://docs.python.org/doc/latex-syntax.html ---------- messages: 67142 nosy: owen severity: normal status: open title: Documenting Python: Syntax" __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 03:21:22 2008 From: report at bugs.python.org (Wallace Owen) Date: Wed, 21 May 2008 01:21:22 +0000 Subject: [issue2933] "Documenting Python: Syntax" bug In-Reply-To: <1211332877.88.0.94252582936.issue2933@psf.upfronthosting.co.za> Message-ID: <1211332877.88.0.94252582936.issue2933@psf.upfronthosting.co.za> New submission from Wallace Owen : The 'documenting Python' document, section 4.1, at this url: http://docs.python.org/doc/latex-syntax.html has an incorrect (but correctly spelled) word in one of it's sentences: ---- Macros which take no parameters but which should not be followed by a word space do not need special treatment if the following character in the document source if not a name character (such as punctuation). ---- The phrase "source if not a name" should be "source is not a name". By the way, in attempting to classify this bug within the parameters allowed, I observe that there is no correct 'Type' for this bug: none of the allowed choices seem to apply. It's not a "crash", "compile error", "resource usage", "security", "behavior", "performance" or "feature request". I figured "feature request" would ring the fewest alarm bells, so I used that. ---------- assignee: georg.brandl components: Documentation messages: 67143 nosy: georg.brandl, owen severity: normal status: open title: "Documenting Python: Syntax" bug type: feature request versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 03:48:07 2008 From: report at bugs.python.org (Facundo Batista) Date: Wed, 21 May 2008 01:48:07 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1211334487.24.0.93910818283.issue2898@psf.upfronthosting.co.za> Changes by Facundo Batista : ---------- nosy: +facundobatista __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 05:03:34 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 21 May 2008 03:03:34 +0000 Subject: [issue2932] Documenting Python: Syntax" In-Reply-To: <1211332326.77.0.550241856436.issue2932@psf.upfronthosting.co.za> Message-ID: <1211339013.96.0.955079234976.issue2932@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> duplicate status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 05:07:13 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 21 May 2008 03:07:13 +0000 Subject: [issue2933] "Documenting Python: Syntax" bug In-Reply-To: <1211332877.88.0.94252582936.issue2933@psf.upfronthosting.co.za> Message-ID: <1211339233.1.0.864449749143.issue2933@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for the report. However, since we have moved to a new doc format (reST), we are not maintaining the 2.5 docs. ---------- nosy: +benjamin.peterson resolution: -> wont fix status: open -> closed versions: +Python 2.5 -Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 05:34:21 2008 From: report at bugs.python.org (Wallace Owen) Date: Wed, 21 May 2008 03:34:21 +0000 Subject: [issue2933] "Documenting Python: Syntax" bug In-Reply-To: <1211339233.1.0.864449749143.issue2933@psf.upfronthosting.co.za> Message-ID: <1211340847.3509.32.camel@mail.metamachine.com> Wallace Owen added the comment: Thanks for the fast attention. One question: How do I access and use these docs? I went looking for the instructions on documenting, so when I contribute, the docs I do are in the right format. The url I was reading didn't have a '2.5' in it's path, it was: http://docs.python.org/doc/latex-syntax.html I navigated there by selecting "Browse Current Documentation" at "http://www.python.org/doc/ which took me directly to the 2.5.2 documentation page. If the 2.5 stuff isn't current, this link would appear to be bad. Should I submit a bug, or have I jammed my head too far up my ass to be useful? :^) // Wally On Wed, 2008-05-21 at 03:07 +0000, Benjamin Peterson wrote: > Benjamin Peterson added the comment: > > Thanks for the report. However, since we have moved to a new doc format > (reST), we are not maintaining the 2.5 docs. > > ---------- > nosy: +benjamin.peterson > resolution: -> wont fix > status: open -> closed > versions: +Python 2.5 -Python 3.0 > > __________________________________ > Tracker > > __________________________________ __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 06:40:19 2008 From: report at bugs.python.org (Cameron Simpson) Date: Wed, 21 May 2008 04:40:19 +0000 Subject: [issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails Message-ID: <1211344817.45.0.648051559089.issue1424152@psf.upfronthosting.co.za> Cameron Simpson added the comment: Well I've happily done lots of SOAP transations, admittedly all to the same webservice, via HTTPS-over-proxy-CONNECT using ChrisL's patch. It seems to work just fine. Whom do we petition to get this into the mainline python sources? - Cameron _____________________________________ Tracker _____________________________________ From report at bugs.python.org Wed May 21 07:56:06 2008 From: report at bugs.python.org (Adam Olsen) Date: Wed, 21 May 2008 05:56:06 +0000 Subject: [issue1720705] thread + import => crashes? Message-ID: <1211349365.76.0.867795814934.issue1720705@psf.upfronthosting.co.za> Adam Olsen added the comment: The patch for issue 1856 should fix the potential crash, so we could eliminate that scary blurb from the docs. ---------- nosy: +Rhamphoryncus _____________________________________ Tracker _____________________________________ From report at bugs.python.org Wed May 21 09:30:13 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 21 May 2008 07:30:13 +0000 Subject: [issue814689] sendmsg operation for unix sockets Message-ID: <1211355013.87.0.126703533608.issue814689@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> duplicate status: open -> closed superseder: -> sendmsg() and recvmsg() for C socket module ____________________________________ Tracker ____________________________________ From report at bugs.python.org Wed May 21 09:32:46 2008 From: report at bugs.python.org (=?utf-8?q?J=C3=B6rg_Rebenstorf?=) Date: Wed, 21 May 2008 07:32:46 +0000 Subject: [issue2930] Cannot change variable defined in "__init__.py" after importing In-Reply-To: <1211296598.61.0.428174810235.issue2930@psf.upfronthosting.co.za> Message-ID: <1211355165.99.0.186120227903.issue2930@psf.upfronthosting.co.za> J?rg Rebenstorf added the comment: Oh yes, I am sorry, I forgot to tell you that I *cannot* change the import statement as it is part of a framwork by a third-party which I cannot influence. This is a prerequisite of my task. Of course you are right that I am not strictly speaking about a bug but rather about a feature request if no appropriate solution exists. One solution in my situation could be that I could re-import the package again using a plain import statement (not a from- import one as the framework does). Is this the recommended solution or shouldn't there be a way to modify the variable even if it is imported by a from-import statement? Maybe you can give me a reason for your opinion? ---------- type: behavior -> feature request __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 09:35:24 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 21 May 2008 07:35:24 +0000 Subject: [issue2930] Cannot change variable defined in "__init__.py" after importing In-Reply-To: <1211296598.61.0.428174810235.issue2930@psf.upfronthosting.co.za> Message-ID: <1211355324.25.0.262550745039.issue2930@psf.upfronthosting.co.za> Georg Brandl added the comment: As I said, please consult the newsgroup/mailing list for these questions, it's much better suited for them. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 09:47:03 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 21 May 2008 07:47:03 +0000 Subject: [issue2933] "Documenting Python: Syntax" bug In-Reply-To: <1211332877.88.0.94252582936.issue2933@psf.upfronthosting.co.za> Message-ID: <1211356022.98.0.189686682934.issue2933@psf.upfronthosting.co.za> Georg Brandl added the comment: The 2.5.2 stuff *is* the current docs for 2.5. However, the docs that are actively maintained are the docs for 2.6 and 3.0, the former of which can be found at http://www.python.org/doc/dev/. With the release of 2.6, these will become the most "current" docs. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 11:03:47 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Wed, 21 May 2008 09:03:47 +0000 Subject: [issue2861] Patch to rename markupbase to _markupbase In-Reply-To: <1210844561.67.0.674925614552.issue2861@psf.upfronthosting.co.za> Message-ID: <1211360627.98.0.301469510123.issue2861@psf.upfronthosting.co.za> Changes by Quentin Gallet-Gilles : Removed file: http://bugs.python.org/file10330/markupbase_renaming_2.6.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 11:03:38 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Wed, 21 May 2008 09:03:38 +0000 Subject: [issue2861] Patch to rename markupbase to _markupbase In-Reply-To: <1210844561.67.0.674925614552.issue2861@psf.upfronthosting.co.za> Message-ID: <1211360618.63.0.784370136817.issue2861@psf.upfronthosting.co.za> Changes by Quentin Gallet-Gilles : Removed file: http://bugs.python.org/file10328/markupbase_import_fixer.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 11:07:29 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Wed, 21 May 2008 09:07:29 +0000 Subject: [issue2861] 2to3 fixer to rename markupbase to _markupbase In-Reply-To: <1210844561.67.0.674925614552.issue2861@psf.upfronthosting.co.za> Message-ID: <1211360849.67.0.539880317063.issue2861@psf.upfronthosting.co.za> Quentin Gallet-Gilles added the comment: Well, there's only the fixer to apply. ---------- components: -Library (Lib) title: Patch to rename markupbase to _markupbase -> 2to3 fixer to rename markupbase to _markupbase Added file: http://bugs.python.org/file10388/markupbase_import_fixer.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 15:05:15 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 21 May 2008 13:05:15 +0000 Subject: [issue1057417] New BaseSMTPServer module Message-ID: <1211375115.15.0.194661145103.issue1057417@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _____________________________________ Tracker _____________________________________ From report at bugs.python.org Wed May 21 15:19:22 2008 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 21 May 2008 13:19:22 +0000 Subject: [issue2934] set() comparisons do not play well with others In-Reply-To: <1211375962.7.0.591442558325.issue2934@psf.upfronthosting.co.za> Message-ID: <1211375962.7.0.591442558325.issue2934@psf.upfronthosting.co.za> New submission from Nick Coghlan : The rich compare implementation for set objects raises TypeError directly instead of returning NotImplemented to allow the other type involved in the comparison a chance at handling the operation. ---------- messages: 67152 nosy: ncoghlan severity: normal status: open title: set() comparisons do not play well with others __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 15:23:46 2008 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 21 May 2008 13:23:46 +0000 Subject: [issue2934] set() comparisons do not play well with others In-Reply-To: <1211375962.7.0.591442558325.issue2934@psf.upfronthosting.co.za> Message-ID: <1211376226.0.0.823140923514.issue2934@psf.upfronthosting.co.za> Nick Coghlan added the comment: Eh, never mind, raising the TypeError explicitly is necessary due to the misbehaviour of the default comparisons in 2.x. I'll work around the problem in my test case. ---------- resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 15:59:15 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Wed, 21 May 2008 13:59:15 +0000 Subject: [issue2872] Remove commands for PEP 3108 In-Reply-To: <1210912647.86.0.565995912638.issue2872@psf.upfronthosting.co.za> Message-ID: <1211378354.78.0.806508648775.issue2872@psf.upfronthosting.co.za> Quentin Gallet-Gilles added the comment: I'm working on it. ---------- nosy: +quentin.gallet-gilles __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 16:14:46 2008 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 21 May 2008 14:14:46 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211379286.13.0.904244562603.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: Attached a new version of the module, along with a unit test file. The unit tests caught a bug in the __gt__ implementation. I've also changed the name to ProxyMixin as suggested by Adam and switched to using a normal __init__ method (there was no real gain from using __new__ instead). Added file: http://bugs.python.org/file10389/typetools.py ____________________________________ Tracker ____________________________________ From report at bugs.python.org Wed May 21 16:14:56 2008 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 21 May 2008 14:14:56 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211379296.88.0.336663912032.issue643841@psf.upfronthosting.co.za> Changes by Nick Coghlan : Removed file: http://bugs.python.org/file10385/typetools.py ____________________________________ Tracker ____________________________________ From report at bugs.python.org Wed May 21 16:15:46 2008 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 21 May 2008 14:15:46 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211379346.56.0.316305389009.issue643841@psf.upfronthosting.co.za> Changes by Nick Coghlan : Added file: http://bugs.python.org/file10390/test_typetools.py ____________________________________ Tracker ____________________________________ From report at bugs.python.org Wed May 21 16:16:27 2008 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 21 May 2008 14:16:27 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211379387.28.0.125308523763.issue2775@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'm working on issue 2873 (remove htmllib dependency from pydoc). ---------- nosy: +marketdickinson __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 16:44:47 2008 From: report at bugs.python.org (Erez Bibi) Date: Wed, 21 May 2008 14:44:47 +0000 Subject: [issue2935] rfc822.py line 395 strings connection In-Reply-To: <1211381079.94.0.309829253424.issue2935@psf.upfronthosting.co.za> Message-ID: <1211381079.94.0.309829253424.issue2935@psf.upfronthosting.co.za> New submission from Erez Bibi : Python 2.5 on Windows rfc822.py line 395 text = name + ": " + value if 'value' is not a string python will generate an exception. It might be due to a broken website, but it is not a reason to crash. I'm using ClientCookie with a Request object (but I don't know the faulty URL) >>> req = urllib2.Request (url) >>> page = ClientCookie.urlopen (req) Traceback (most recent call last): ... File "build\bdist.win32\egg\ClientCookie\_urllib2_support.py", line 824, in urlopen return _opener.open(url, data) File "C:\Python25\lib\urllib2.py", line 380, in open response = meth(req, response) File "build\bdist.win32\egg\ClientCookie\_urllib2_support.py", line 412, in http_response headers[hdr] = val File "C:\Python25\lib\rfc822.py", line 395, in __setitem__ text = name + ": " + value TypeError: cannot concatenate 'str' and 'NoneType' objects A simple fix is to replace text = name + ": " + value with text = ("%s: %s" % (name, value)) In rfc822.py line 395 ---------- components: Library (Lib) files: rfc822.py messages: 67157 nosy: erezbibi severity: normal status: open title: rfc822.py line 395 strings connection type: crash versions: Python 2.5 Added file: http://bugs.python.org/file10391/rfc822.py __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 17:05:28 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Wed, 21 May 2008 15:05:28 +0000 Subject: [issue2663] shutil.copytree glob-style filtering [patch] In-Reply-To: <1208726903.81.0.936252523277.issue2663@psf.upfronthosting.co.za> Message-ID: <1211382327.65.0.809305380527.issue2663@psf.upfronthosting.co.za> Tarek Ziad? added the comment: patch with the new trunk Added file: http://bugs.python.org/file10392/copytree2.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 17:05:45 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Wed, 21 May 2008 15:05:45 +0000 Subject: [issue2663] shutil.copytree glob-style filtering [patch] In-Reply-To: <1208726903.81.0.936252523277.issue2663@psf.upfronthosting.co.za> Message-ID: <1211382345.67.0.482924818406.issue2663@psf.upfronthosting.co.za> Changes by Tarek Ziad? : Removed file: http://bugs.python.org/file10179/copytree.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 17:08:59 2008 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 21 May 2008 15:08:59 +0000 Subject: [issue2873] Remove htmllib use in the stdlib In-Reply-To: <1210913045.12.0.944933316665.issue2873@psf.upfronthosting.co.za> Message-ID: <1211382539.31.0.114196722804.issue2873@psf.upfronthosting.co.za> Mark Dickinson added the comment: This issue is at least partially dependent on issue #1883 (adapting pydoc to new doc system), in that it's a little awkward to test pydoc before #1883 is complete. ---------- dependencies: +Adapt pydoc to new doc system nosy: +marketdickinson __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 17:43:03 2008 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Wed, 21 May 2008 15:43:03 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1211379387.28.0.125308523763.issue2775@psf.upfronthosting.co.za> Message-ID: Fred L. Drake, Jr. added the comment: On May 21, 2008, at 10:16 AM, Mark Dickinson wrote: > I'm working on issue 2873 (remove htmllib dependency from pydoc). Thanks, Mark! I was dreading the thought of looking at that. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 18:41:53 2008 From: report at bugs.python.org (Viennet) Date: Wed, 21 May 2008 16:41:53 +0000 Subject: [issue2754] Mac version of IDLE doesn't scroll as expected In-Reply-To: <1209903976.71.0.763172048838.issue2754@psf.upfronthosting.co.za> Message-ID: <1211388113.38.0.980012350026.issue2754@psf.upfronthosting.co.za> Viennet added the comment: I confirm this bug. The mouve wheel does not scroll the windows. ---------- nosy: +emmanuelito __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 19:30:04 2008 From: report at bugs.python.org (Thomas Heller) Date: Wed, 21 May 2008 17:30:04 +0000 Subject: [issue2783] ctypes.util.find_library() doesn't find OS X .bundle or .so libraries In-Reply-To: <1210178835.82.0.184035684731.issue2783@psf.upfronthosting.co.za> Message-ID: <1211391003.77.0.908842170575.issue2783@psf.upfronthosting.co.za> Thomas Heller added the comment: The OS X find_library code was not written by me, the code was ripped from Bob Ippolitos macholib. Can some OS X expert please look into this? Shamelessly assigning to Ronald - feel free to unassign if you have no time. ---------- assignee: theller -> ronaldoussoren nosy: +ronaldoussoren __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 19:53:09 2008 From: report at bugs.python.org (Vaclav Slavik) Date: Wed, 21 May 2008 17:53:09 +0000 Subject: [issue1758146] Crash in PyObject_Malloc Message-ID: <1211392389.5.0.201734115949.issue1758146@psf.upfronthosting.co.za> Vaclav Slavik added the comment: I'm able to reliably reproduce this bug (using Apache 2.2.8, otherwise same as above), although not with mod_python's simple tests, but only with Trac (apparently, Trac creates some threads while processing the request). How to reproduce: configure two Trac/mod_python locations in Apache config and set them to use different Python interpreters: SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnv /srv/bakefile/trac PythonOption TracUriRoot / PythonInterpreter trac1 SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnv /srv/bakefile/trac PythonOption TracUriRoot / PythonInterpreter trac2 (As far as this bug is concerted, this is the same as having two virtual hosts that both run Trac -- mod_python's default interpreter has the same name as the (virtual) host.) Then run Apache as "apache2 -X" to ensure that requests are handled by single handler serially and do $ curl http://your-server/trac1/wiki $ curl http://your-server/trac2/wiki The second command crashes Apache. If you change mod_python configuration to use the same interpreter names for both Trac instances, the crash doesn't happen (but of course, that prevents you from using different versions of Python modules in both vhosts). I'm attaching Valgrind log, but it's not very useful -- it's not deep enough and my server doesn't have enough memory for high enough value of --num-callers. ---------- nosy: +vslavik Added file: http://bugs.python.org/file10393/valgrind.log.gz _____________________________________ Tracker _____________________________________ From report at bugs.python.org Wed May 21 19:56:03 2008 From: report at bugs.python.org (Brett Cannon) Date: Wed, 21 May 2008 17:56:03 +0000 Subject: [issue1333] merge urllib and urlparse functionality In-Reply-To: <1193400988.05.0.68480909797.issue1333@psf.upfronthosting.co.za> Message-ID: <1211392563.28.0.782861878676.issue1333@psf.upfronthosting.co.za> Brett Cannon added the comment: While the work is appreciated, PEP 3108 is taking this in a different direction. ---------- resolution: -> out of date status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 20:15:43 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 21 May 2008 18:15:43 +0000 Subject: [issue2783] ctypes.util.find_library() doesn't find OS X .bundle or .so libraries In-Reply-To: <1210178835.82.0.184035684731.issue2783@psf.upfronthosting.co.za> Message-ID: <1211393743.3.0.859695997524.issue2783@psf.upfronthosting.co.za> Ronald Oussoren added the comment: At first glance the current behaviour is correct: 1) Bundles aren't shared libraries, but plugin code. It should be possible to load bundles, but I don't agree that find_library should try to locate them, specially given this bit in the documentation: [quote] The purpose of the find_library function is to locate a library in a way similar to what the compiler does (on platforms with several versions of a shared library the most recent should be loaded), while the ctypes library loaders act like when a program is run, and call the runtime loader directly. [/quote] 2) There is no prescribed suffix for bundles. Python uses .so and some other packages use .bundle, but that's just a convention that a specific software product chooses. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 20:38:59 2008 From: report at bugs.python.org (Thomas Heller) Date: Wed, 21 May 2008 18:38:59 +0000 Subject: [issue2783] ctypes.util.find_library() doesn't find OS X .bundle or .so libraries In-Reply-To: <1211393743.3.0.859695997524.issue2783@psf.upfronthosting.co.za> Message-ID: <48346C15.5010004@ctypes.org> Thomas Heller added the comment: Thanks, Ronald. Sounds like this bug could be closed then. Bill, if you want a library search function with different semantics, I suggest you open a feature request, describe the sematics that should be used and (ideally) provide a patch. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 21:00:47 2008 From: report at bugs.python.org (Josiah Carlson) Date: Wed, 21 May 2008 19:00:47 +0000 Subject: [issue2808] asynchat forgets packets when push is called from a thread In-Reply-To: <1210417225.64.0.883655852515.issue2808@psf.upfronthosting.co.za> Message-ID: <1211396447.58.0.201041599882.issue2808@psf.upfronthosting.co.za> Josiah Carlson added the comment: My suggestion: don't do that. Asynchronous sockets, and asyncore/related libraries are not designed for, nor intended to be used as part of a threaded IO application. Why? Because most protocols are very concerned with data ordering, and sending from multiple threads can cause *serious* issues. I do not believe that this should change. Note that you can work around this limitation by using something like the following, but again, this is not suggested (you should instead work asyncore.poll() calls into some sort of main loop within your application). from Queue import Queue check_threads = 0 class my_async(asyncore.dispatcher): def __init__(self, *args, **kwargs): self.q = Queue() asyncore.dispatcher.__init__(self, *args, **kwargs) def push_t(self, data): global check_threads self.q.put(data) check_threads = 1 def handle_threaded_push(self): while not self.q.empty(): self.push(self.q.get()) def loop(timeout=.1, map=None): global check_threads if map is None: map = asyncore.socket_map while 1: asyncore.poll(timeout, map) if check_threads: check_threads = 0 for v in map.values(): try: v.handle_threaded_push() except: #handle exceptions better here pass ---------- assignee: -> josiahcarlson resolution: -> wont fix status: open -> pending __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 21:09:54 2008 From: report at bugs.python.org (svncodereview) Date: Wed, 21 May 2008 19:09:54 +0000 Subject: [issue1736190] asyncore/asynchat patches Message-ID: <00163600cb36e56e28044dc256b0@google.com> svncodereview added the comment: Dear GvR, report, New code review comments by josiah.carlson have been published. Please go to http://codereview.appspot.com/744 to read them. Message: Details: http://codereview.appspot.com/744/diff/1/22 File Doc/library/asyncore.rst (right): http://codereview.appspot.com/744/diff/1/22#newcode226 Line 226: A file_dispatcher takes a file descriptor or file object along with an optional On 2008/05/05 22:02:22, GvR wrote: > Mind keeping the line length under 80 chars? No problem. Any other comments? Issue Description: http://bugs.python.org/issue1736190 Sincerely, Your friendly code review daemon (http://codereview.appspot.com/). _____________________________________ Tracker _____________________________________ From report at bugs.python.org Wed May 21 21:34:57 2008 From: report at bugs.python.org (Maciek Fijalkowski) Date: Wed, 21 May 2008 19:34:57 +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: <1211398497.32.0.350532198285.issue1798@psf.upfronthosting.co.za> Maciek Fijalkowski added the comment: thread local storage sounds also a bit weird to me. Errcheck sounds way better, I would also like to have errcheck as a possible default on library, when calling CDLL constructor. This would be a convinient way of specifying errno handling for all functions from that library. Cheers, fijal ---------- nosy: +fijal __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 21:35:20 2008 From: report at bugs.python.org (Bill Janssen) Date: Wed, 21 May 2008 19:35:20 +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: <1211398520.2.0.251558881651.issue2936@psf.upfronthosting.co.za> New submission from Bill Janssen : The "find_library()" function in ctypes.util doesn't look in LD_LIBRARY_PATH on Solaris or Linux or most other UNIX variants that use that convention. This means that find_library() doesn't find libraries that dlopen() would, and makes development with ctypes much harder than it should be. ---------- components: Library (Lib) messages: 67170 nosy: janssen priority: normal severity: normal status: open title: ctypes.util.find_library() doesn't consult LD_LIBRARY_PATH type: behavior versions: Python 2.5, Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 21:41:10 2008 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 21 May 2008 19:41:10 +0000 Subject: [issue2915] PyObject_IsInstance() doesn't find bases named in type(name, bases, dict) In-Reply-To: <1211211891.23.0.800845105801.issue2915@psf.upfronthosting.co.za> Message-ID: <1211398870.79.0.21783674501.issue2915@psf.upfronthosting.co.za> Stefan Behnel added the comment: Sorry, the bug was in Cython, which didn't call InstanceMethod(). Please ignore. __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 22:04:06 2008 From: report at bugs.python.org (Bill Janssen) Date: Wed, 21 May 2008 20:04:06 +0000 Subject: [issue2783] ctypes.util.find_library() doesn't find OS X .bundle or .so libraries In-Reply-To: <48346C15.5010004@ctypes.org> Message-ID: <4b3e516a0805211300w75d8afa3ha157247f345c864c@mail.gmail.com> Bill Janssen added the comment: I thought you might say that :-). No, I'm good with this resolution. If I provide a patch, it will be for the LD_LIBRARY_PATH problem. Though -- I think there's an interesting question about what the purpose of "find_library()" actually is, as opposed to what it's current implementation is. I disagree with Ronald's strict reading of the documentation. I think it should emulate the behavior of the dynamic linker, not the C compiler. That is, it should look for the libraries as "ld.so" (or its platform equivalent) would, because the purpose of finding them is to load them with CDLL. This behavior is different from what the compiler does. I also think find_library() should just be moved into the ctypes library, not dangling off by itself in the otherwise unused util sub-module. Bill On Wed, May 21, 2008 at 11:39 AM, Thomas Heller wrote: > > Thomas Heller added the comment: > > Thanks, Ronald. Sounds like this bug could be closed then. > > Bill, if you want a library search function with different semantics, > I suggest you open a feature request, describe the sematics that > should be used and (ideally) provide a patch. > > __________________________________ > Tracker > > __________________________________ > Added file: http://bugs.python.org/file10394/unnamed __________________________________ Tracker __________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Wed May 21 22:13:30 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 21 May 2008 20:13:30 +0000 Subject: [issue2783] ctypes.util.find_library() doesn't find OS X .bundle or .so libraries In-Reply-To: <1210178835.82.0.184035684731.issue2783@psf.upfronthosting.co.za> Message-ID: <1211400810.2.0.781162837033.issue2783@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Bill, even if find_library were to emulate the runtime linker it shouldn't find objects of type MH_BUNDLE. Those are not shared libraries, but explicitly meant to be used as code resources for plugins. find_library should not return bz2.so when your working directory happens to be ${sys.prefix}/lib/python*/lib-dynload and you call find_library('bz2'). BTW. What is your usecase? ---------- resolution: -> invalid __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 22:36:59 2008 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 21 May 2008 20:36:59 +0000 Subject: [issue2937] Incorrect rounding in floating-point operations with gcc/x87 In-Reply-To: <1211402217.78.0.330998218554.issue2937@psf.upfronthosting.co.za> Message-ID: <1211402217.78.0.330998218554.issue2937@psf.upfronthosting.co.za> New submission from Mark Dickinson : On some older Intel 32-bit hardware, under Linux, floating-point operations don't always give correctly rounded results. Here's an example involving addition, on SuSE Linux 10.2/Xeon. Python 2.6a3+ (trunk:63521, May 21 2008, 15:40:39) [GCC 4.1.2 20061115 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 1e16 + 2.999 10000000000000002.0 >>> 1e16 + 2.9999 10000000000000004.0 The second result should really be 1e16+2., not 1e16+4. This appears to be related to this GCC issue: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323 Various fixes are possible. One possible fix is to add the -ffloat- store flag to the gcc options. Another is to use the information in fpu_control.h, if available, to set the precision control. Yet another is to sprinkle some 'volatile' modifiers throughout floatobject.c. It's not clear to me that this *should* be fixed, but I think the problem should at least be documented. Hence this bug report. ---------- components: Interpreter Core messages: 67174 nosy: marketdickinson priority: normal severity: normal status: open title: Incorrect rounding in floating-point operations with gcc/x87 type: behavior versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 22:38:15 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 21 May 2008 20:38:15 +0000 Subject: [issue2783] ctypes.util.find_library() doesn't find OS X .bundle or .so libraries In-Reply-To: <1210178835.82.0.184035684731.issue2783@psf.upfronthosting.co.za> Message-ID: <1211402295.04.0.1542819252.issue2783@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 21 22:44:48 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 21 May 2008 20:44:48 +0000 Subject: [issue2915] PyObject_IsInstance() doesn't find bases named in type(name, bases, dict) In-Reply-To: <1211211891.23.0.800845105801.issue2915@psf.upfronthosting.co.za> Message-ID: <1211402688.11.0.0901266520427.issue2915@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 00:04:03 2008 From: report at bugs.python.org (xix xeaon) Date: Wed, 21 May 2008 22:04:03 +0000 Subject: [issue2808] asynchat forgets packets when push is called from a thread In-Reply-To: <1210417225.64.0.883655852515.issue2808@psf.upfronthosting.co.za> Message-ID: <1211407443.05.0.448409016202.issue2808@psf.upfronthosting.co.za> xix xeaon added the comment: I have good reason to use this combination of asynchat and threads (in a way which doesn't cause any of these serious issues you speak of), but if you don't want it fixed then that's fine with me since I know how to work around it, I just reported it =P __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 04:40:43 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 22 May 2008 02:40:43 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1211424042.88.0.306214217882.issue2848@psf.upfronthosting.co.za> Brett Cannon added the comment: I don't know how compatible it is. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 04:51:24 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 22 May 2008 02:51:24 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211424684.56.0.369346970989.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: +Backport UserList move in 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 05:10:35 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 22 May 2008 03:10:35 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1211425830.41.0.30556097898.issue2848@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The APIs are bit different, but it should be possible to migrate from the old to the new. All the key functionality is there. Barry, any thoughts on transitioning away from the deprecated modules? ---------- assignee: -> barry nosy: +rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 05:19:03 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 22 May 2008 03:19:03 +0000 Subject: [issue2861] 2to3 fixer to rename markupbase to _markupbase In-Reply-To: <1210844561.67.0.674925614552.issue2861@psf.upfronthosting.co.za> Message-ID: <1211426343.76.0.7471122066.issue2861@psf.upfronthosting.co.za> Brett Cannon added the comment: Applied in r63533 to 2to3 in the fixer. I also added you, Quentin to Misc/ACKS in the trunk. ---------- resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 05:19:24 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 22 May 2008 03:19:24 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211426364.63.0.362834812956.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: -2to3 fixer to rename markupbase to _markupbase __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 06:59:37 2008 From: report at bugs.python.org (Fan Decheng) Date: Thu, 22 May 2008 04:59:37 +0000 Subject: [issue2938] Interactive help writes to the python install destination directory In-Reply-To: <1211432376.31.0.60210310996.issue2938@psf.upfronthosting.co.za> Message-ID: <1211432376.31.0.60210310996.issue2938@psf.upfronthosting.co.za> New submission from Fan Decheng : Python 3.0a5 on Windows Vista SP1 I installed it to C:\Python30, and used NTFS permissions to protect the files in the directory from being changed, also making the whole directory read-only. Thus, new files can't be created inside the directory. Then: 1. Type help() in python. Python goes into interactive help mode. 2. Type "modules fnmatch" in python. Result: Help quits with the following error: IOError: [Errno 13] Permission denied: 'C:\\Python30\\lib\\lib2to3\\tests\\..\\G rammar3.0.0.alpha.5.pickle' For detailed error info please see the attached text file. ---------- components: Library (Lib) files: py3help_error.txt messages: 67179 nosy: r_mosaic severity: normal status: open title: Interactive help writes to the python install destination directory type: crash versions: Python 3.0 Added file: http://bugs.python.org/file10395/py3help_error.txt __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 07:04:27 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 22 May 2008 05:04:27 +0000 Subject: [issue2937] Incorrect rounding in floating-point operations with gcc/x87 In-Reply-To: <1211402217.78.0.330998218554.issue2937@psf.upfronthosting.co.za> Message-ID: <1211432667.77.0.342763538564.issue2937@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Python (the language) makes no guarantee itself on what the precise semantics of floating-point operations is. This is documented in http://docs.python.org/ref/types.html "These represent machine-level double precision floating point numbers. You are at the mercy of the underlying machine architecture (and C or Java implementation) for the accepted range and handling of overflow." If you want to, one could add ", precision" in the sentence; I think it is fine as it stands. ---------- nosy: +loewis __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 08:50:29 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Thu, 22 May 2008 06:50:29 +0000 Subject: [issue2861] 2to3 fixer to rename markupbase to _markupbase In-Reply-To: <1211426343.76.0.7471122066.issue2861@psf.upfronthosting.co.za> Message-ID: <8b943f2b0805212350p58c910a5r314fdfbb8d1f2798@mail.gmail.com> Quentin Gallet-Gilles added the comment: Thanks Brett. About the Misc/ACKS file I promise I'll contribute more than just an import fixer ! On Thu, May 22, 2008 at 5:19 AM, Brett Cannon wrote: > > Brett Cannon added the comment: > > Applied in r63533 to 2to3 in the fixer. I also added you, Quentin to > Misc/ACKS in the trunk. > > ---------- > resolution: -> accepted > status: open -> closed > > __________________________________ > Tracker > > __________________________________ > _______________________________________________ > Python-bugs-list mailing list > Unsubscribe: > http://mail.python.org/mailman/options/python-bugs-list/qgallet%40gmail.com > > Added file: http://bugs.python.org/file10396/unnamed __________________________________ Tracker __________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Thu May 22 08:51:05 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Thu, 22 May 2008 06:51:05 +0000 Subject: [issue2861] 2to3 fixer to rename markupbase to _markupbase In-Reply-To: <1210844561.67.0.674925614552.issue2861@psf.upfronthosting.co.za> Message-ID: <1211439065.1.0.162256152236.issue2861@psf.upfronthosting.co.za> Changes by Quentin Gallet-Gilles : Removed file: http://bugs.python.org/file10396/unnamed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 09:45:06 2008 From: report at bugs.python.org (Sabine Nitsch) Date: Thu, 22 May 2008 07:45:06 +0000 Subject: [issue2939] Apache mod_python python-func strftime In-Reply-To: <1211442305.92.0.687824708378.issue2939@psf.upfronthosting.co.za> Message-ID: <1211442305.92.0.687824708378.issue2939@psf.upfronthosting.co.za> New submission from Sabine Nitsch : If you use the python-function strftime unter apache within mod_python the function delivers as date the last startdate of apache and not the current date. ---------- assignee: theller components: ctypes messages: 67182 nosy: raisachrisgun, theller severity: normal status: open title: Apache mod_python python-func strftime type: behavior versions: Python 2.4 __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 11:16:54 2008 From: report at bugs.python.org (Adrian M) Date: Thu, 22 May 2008 09:16:54 +0000 Subject: [issue2940] Building Python fails on SunOS In-Reply-To: <1211447814.19.0.559318035687.issue2940@psf.upfronthosting.co.za> Message-ID: <1211447814.19.0.559318035687.issue2940@psf.upfronthosting.co.za> New submission from Adrian M : $ uname -a SunOS ro1estw 5.9 Generic_117171-12 sun4u sparc SUNW,Sun-Fire-880 gcc 2.6.3 When running ./configure I'm getting warnings like: configure: WARNING: curses.h: present but cannot be compiled configure: WARNING: curses.h: check for missing prerequisite headers? configure: WARNING: curses.h: see the Autoconf documentation configure: WARNING: curses.h: section "Present But Cannot Be Compiled" configure: WARNING: curses.h: proceeding with the preprocessor's result configure: WARNING: curses.h: in the future, the compiler will take precedence This happens for many other headers as well (dlfcn.h, fcntl.h, and many others - i'll attach the whole list of messages). Then, the ./configure step ends with the following message : checking size of int... configure: error: cannot compute sizeof (int) ---------- components: Build files: config_logs.zip messages: 67183 nosy: syraxes severity: normal status: open title: Building Python fails on SunOS type: compile error versions: Python 2.5 Added file: http://bugs.python.org/file10397/config_logs.zip __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 12:18:29 2008 From: report at bugs.python.org (Alexandr Zamaraev) Date: Thu, 22 May 2008 10:18:29 +0000 Subject: [issue2941] Propagate define to resurce mingw32 compile In-Reply-To: <1211451506.25.0.765395098834.issue2941@psf.upfronthosting.co.za> Message-ID: <1211451506.25.0.765395098834.issue2941@psf.upfronthosting.co.za> New submission from Alexandr Zamaraev : If resource source file depend from macros definition passing from define_macros parametr setup crash. ---------- components: Distutils files: cygwinccompiler.diff keywords: patch messages: 67184 nosy: shura_zam severity: normal status: open title: Propagate define to resurce mingw32 compile versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file10398/cygwinccompiler.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 12:24:41 2008 From: report at bugs.python.org (Alexandr Zamaraev) Date: Thu, 22 May 2008 10:24:41 +0000 Subject: [issue2942] mingw/cygwin do not accept asm file as extension source In-Reply-To: <1211451880.92.0.894703588073.issue2942@psf.upfronthosting.co.za> Message-ID: <1211451880.92.0.894703588073.issue2942@psf.upfronthosting.co.za> New submission from Alexandr Zamaraev : mingw/cygwin do not accept asm file as extension source ---------- components: Distutils files: cygwinccompiler.diff keywords: patch messages: 67185 nosy: shura_zam severity: normal status: open title: mingw/cygwin do not accept asm file as extension source versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file10399/cygwinccompiler.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 13:02:23 2008 From: report at bugs.python.org (Thomas Heller) Date: Thu, 22 May 2008 11:02:23 +0000 Subject: [issue2939] Apache mod_python python-func strftime In-Reply-To: <1211442305.92.0.687824708378.issue2939@psf.upfronthosting.co.za> Message-ID: <1211454143.24.0.132524775828.issue2939@psf.upfronthosting.co.za> Thomas Heller added the comment: Has nothing to do with ctypes. ---------- assignee: theller -> __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 13:33:02 2008 From: report at bugs.python.org (Cournapeau David) Date: Thu, 22 May 2008 11:33:02 +0000 Subject: [issue2943] Distutils should generate a better error message when the SDK is not installed In-Reply-To: <1211455981.94.0.404413935613.issue2943@psf.upfronthosting.co.za> Message-ID: <1211455981.94.0.404413935613.issue2943@psf.upfronthosting.co.za> New submission from Cournapeau David : I tried to build some extensions with python 2.6 (built from sources with VS 2008 express), and got some errors in the function query_vcvarsall. The offending lines are: if len(result) != len(interesting): raise ValueError(str(list(result.keys()))) I got a value error here. After some investigation, I realized that it was because I did not install the SDK. I think the error message could be isgnificantly improved if installing the SDK was suggested in the exception message. ---------- components: Distutils messages: 67187 nosy: cdavid severity: normal status: open title: Distutils should generate a better error message when the SDK is not installed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 15:24:02 2008 From: report at bugs.python.org (Alexander Shigin) Date: Thu, 22 May 2008 13:24:02 +0000 Subject: [issue2944] asyncore doesn't handle connection refused correctly In-Reply-To: <1211462641.02.0.497686644895.issue2944@psf.upfronthosting.co.za> Message-ID: <1211462641.02.0.497686644895.issue2944@psf.upfronthosting.co.za> New submission from Alexander Shigin : Unix select returns socket in read fd set and write fd set if nonblocking socket attempts to connect to unaviable address. asyncore should check this case by calling getsockopt with SO_ERROR optname. If return value is 0 it should call handle_connect_event, otherwise if should call handle_expt_event. Attached file prints "get exception" if asyncore can't connect to remote side, not "uncaptured python exception" Patches from Issue1736190 do not fix this case. ---------- components: Library (Lib) files: test_async_connect.py messages: 67188 nosy: shigin severity: normal status: open title: asyncore doesn't handle connection refused correctly type: behavior versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file10400/test_async_connect.py __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 15:26:08 2008 From: report at bugs.python.org (Alexander Shigin) Date: Thu, 22 May 2008 13:26:08 +0000 Subject: [issue2944] asyncore doesn't handle connection refused correctly In-Reply-To: <1211462641.02.0.497686644895.issue2944@psf.upfronthosting.co.za> Message-ID: <1211462768.54.0.467013705203.issue2944@psf.upfronthosting.co.za> Alexander Shigin added the comment: Patch against r63534 fix the issue. ---------- keywords: +patch Added file: http://bugs.python.org/file10401/asyncore-connect-patch.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 15:36:58 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Thu, 22 May 2008 13:36:58 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211463418.61.0.363873049805.issue643841@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea ____________________________________ Tracker ____________________________________ From report at bugs.python.org Thu May 22 15:44:58 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 22 May 2008 13:44:58 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211463898.11.0.756686539622.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: Added documentation, and assigned to Barry as release manager for 2.6/3.0. Also bumped to 'release blocker' status because I think the loss of classic classes transparent proxying capabilities is a fairly substantial issue that needs to be addressed explicitly before the first 3.0 beta. If I get the go-ahead from Barry or Guido, I'll add the new module to 2.6 (from whence it will be migrated to 3.0 as part of the normal merge process). ---------- assignee: georg.brandl -> barry nosy: +barry -jcea priority: normal -> release blocker Added file: http://bugs.python.org/file10402/typetools.rst ____________________________________ Tracker ____________________________________ From report at bugs.python.org Thu May 22 15:48:33 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 22 May 2008 13:48:33 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211464113.07.0.584426214095.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: Also changed to a library issue instead of a docs issue. ---------- components: +Library (Lib) -Documentation ____________________________________ Tracker ____________________________________ From report at bugs.python.org Thu May 22 16:34:32 2008 From: report at bugs.python.org (Hartmut Goebel) Date: Thu, 22 May 2008 14:34:32 +0000 Subject: [issue2945] bdist_rpm does not list dist files (should effect upload) In-Reply-To: <1211466871.95.0.658180804984.issue2945@psf.upfronthosting.co.za> Message-ID: <1211466871.95.0.658180804984.issue2945@psf.upfronthosting.co.za> New submission from Hartmut Goebel : In Python 2.5 distutils has a bug in bdist_rpm: Generated distribution files are not listed in ``distribution.dist_files``. Thus .rpms can not be handled by other tools, eg. ``upload``. I need this bug fixed for automated upload of files using . Enclosed please find a simple package to show the bug. Just run python setup.py bdist_rpm and watch the (missing) output. In contrast see the output of python setup.py sdist Additionally: While untested, this should effect distutils ``upload`` command. RPMs are not in the dist_files list and when looking at the source, there seams to be no 'trick' to add them later. ---------- components: Distutils files: simple-0.0.0.0.1.tar.gz messages: 67192 nosy: htgoebel severity: normal status: open title: bdist_rpm does not list dist files (should effect upload) versions: Python 2.5 Added file: http://bugs.python.org/file10403/simple-0.0.0.0.1.tar.gz __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 16:34:59 2008 From: report at bugs.python.org (Hartmut Goebel) Date: Thu, 22 May 2008 14:34:59 +0000 Subject: [issue2945] bdist_rpm does not list dist files (should effect upload) In-Reply-To: <1211466871.95.0.658180804984.issue2945@psf.upfronthosting.co.za> Message-ID: <1211466899.65.0.454606472016.issue2945@psf.upfronthosting.co.za> Changes by Hartmut Goebel : ---------- type: -> behavior __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 17:00:59 2008 From: report at bugs.python.org (Hartmut Goebel) Date: Thu, 22 May 2008 15:00:59 +0000 Subject: [issue2946] setuptools: bdist_wininst adds duplicate entry to dist_files In-Reply-To: <1211468458.47.0.0516095652943.issue2946@psf.upfronthosting.co.za> Message-ID: <1211468458.47.0.0516095652943.issue2946@psf.upfronthosting.co.za> New submission from Hartmut Goebel : In setuptools 0.6c8 has a bug in bdist_wininst: Distribution files are listed twice ``distribution.dist_files``. This hinders developing tools which use this data. In addition ``upload`` will upload the file twice to pypi. I need this bug fixed for automated upload of files using ;. Enclosed please find a simple package to show the bug. Just run python setup.py bdist_wininst this shows one entry. Now run python setup-setuptools.py bdist_wininst this shows two entires. The only difference between both setup files is wherefrom setup() is imported. ---------- components: Distutils files: simple-0.0.0.0.1.tar.gz messages: 67193 nosy: htgoebel severity: normal status: open title: setuptools: bdist_wininst adds duplicate entry to dist_files type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10404/simple-0.0.0.0.1.tar.gz __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 17:02:00 2008 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 22 May 2008 15:02:00 +0000 Subject: [issue2937] Incorrect rounding in floating-point operations with gcc/x87 In-Reply-To: <1211402217.78.0.330998218554.issue2937@psf.upfronthosting.co.za> Message-ID: <1211468520.37.0.530631894493.issue2937@psf.upfronthosting.co.za> Mark Dickinson added the comment: Okay; so this is definitely not a Python bug---it's a well-known and well-documented problem with IA32 floating-point. And I accept that it's really not Python's responsibility to document this, either. Nevertheless, it was a surprise to me when my (supposedly IEEE 754 compliant) Pentium 4 box produced this. I probably shouldn't have been surprised. I'm aware of issues with 80-bit extended precision when programming in C, but naively expected that Python would be largely immune from these, since it's always going to force intermediate results from (80-bit) floating-point registers into (64-bit) memory slots. There's an excellent recent article by David Monniaux, "The pitfalls of verifying floating-point computations.", that's available online at http://hal.archives-ouvertes.fr/hal-00128124 that explains exactly what's going on here (it's a case of double- rounding, as described in section 3.1.2 of that paper). Do you think a documentation patch that added this reference, along with the oft-quoted "What Every Computer Scientist Should Know About Floating-Point Arithmetic" by David Goldberg, to Appendix B of the tutorial would be acceptable? One other thing that's worth mentioning: on Pentium 4 and later, the gcc flags "-mfpmath=sse -msse2" appear to fix the problem, by forcing gcc to use the SSE floating-point unit instead of the x87-derived one. In any case, I guess this report should be closed as 'invalid', but I hope that at least others who encounter this problem manage to find this bug report. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 17:18:09 2008 From: report at bugs.python.org (Helmut Jarausch) Date: Thu, 22 May 2008 15:18:09 +0000 Subject: [issue2947] subprocess (Replacing popen) - add a warning / hint In-Reply-To: <1211469479.53.0.83820029984.issue2947@psf.upfronthosting.co.za> Message-ID: <1211469479.53.0.83820029984.issue2947@psf.upfronthosting.co.za> New submission from Helmut Jarausch : Background: I (as many others, too) have used the following code in the past ARC='MyDumpFile' tar_inp= os.popen('/bin/tar cjf '+ARC+' -T -','w') .... tar_exit_code= tar_inp.close() if tar_exit_code != None and tar_exit_code % 256 : print "some error messages" When replacing this - as suggested - by TAR= Popen(('/bin/tar','cjf',ARC,'-T','-'),stdin=PIPE) tar_inp= TAR.stdin .... tar_inp.close() always returns None which was an indication of NO ERROR when used together with popen. So this has proabaly to be replaced by tar_inp.close() tar_exit_code= TAR.wait() if tar_exit_code != 0 : print "some error messages" I suggest a warning / hint to change checking for errors when upgrading to subprocess.Popen ---------- assignee: georg.brandl components: Documentation messages: 67195 nosy: HWJ, georg.brandl severity: normal status: open title: subprocess (Replacing popen) - add a warning / hint versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 17:52:17 2008 From: report at bugs.python.org (Alexander Shigin) Date: Thu, 22 May 2008 15:52:17 +0000 Subject: [issue2944] asyncore doesn't handle connection refused correctly In-Reply-To: <1211462641.02.0.497686644895.issue2944@psf.upfronthosting.co.za> Message-ID: <1211471536.29.0.739061290318.issue2944@psf.upfronthosting.co.za> Alexander Shigin added the comment: Oh, I've just realised that FreeBSD is too fast. test_async_connect.py works fine on linux box, but on FreeBSD i need to change localhost to another host :( I haven't got any idea how to make a test case which work on any machine. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 18:05:08 2008 From: report at bugs.python.org (Jean Brouwers) Date: Thu, 22 May 2008 16:05:08 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211472307.76.0.356612282759.issue2819@psf.upfronthosting.co.za> Jean Brouwers added the comment: Attached is revision 11 of the mathmodule.c patch for Python 2.6a3. This one includes Raymond's full precision summation, Mark's rounding partials addition and correct non-finites and error handling. However, intermediate overflow will raise an OverflowError and a FLT_RADIX not equal 2 cause a NotImplementedError. An updated test_math_sum11.py script is also attached. All test cases pass on 5 different builds of Python 2.6a3: - 32-bit MacOS X 10.4.11 (Intel) with gcc 4.0.1 - 32-bit MacOS X 10.3.9 (PPC) with gcc 3.3 - 64-bit RHEL 3 update 7 (Opteron) using gcc 4.1.2 - 32- and 64-bit Solaris 10 (Opteron) with Sun C 5.8. /Jean Brouwers Added file: http://bugs.python.org/file10405/mathmodule11.c.2.6a3.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 18:06:07 2008 From: report at bugs.python.org (Jean Brouwers) Date: Thu, 22 May 2008 16:06:07 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211472367.63.0.977994301273.issue2819@psf.upfronthosting.co.za> Changes by Jean Brouwers : Added file: http://bugs.python.org/file10406/test_math_sum11.py __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 18:11:50 2008 From: report at bugs.python.org (Jean Brouwers) Date: Thu, 22 May 2008 16:11:50 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211472710.55.0.790546926629.issue2819@psf.upfronthosting.co.za> Jean Brouwers added the comment: Here is rev 12 of the mathmodule.c patch. It is the same as rev 11 but with additional code removed as requested: - no FLT_RADIX 2 check - no errno illustration in _do_sum_add2() - no _do_sum() callback function argument - no option 'start' argument for math.sum. The test_math.sum12.py script and results are the same as rev 11. /Jean Brouwers Added file: http://bugs.python.org/file10407/mathmodule12.c.2.6a3.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 18:12:22 2008 From: report at bugs.python.org (Jean Brouwers) Date: Thu, 22 May 2008 16:12:22 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211472742.99.0.514511768319.issue2819@psf.upfronthosting.co.za> Changes by Jean Brouwers : Added file: http://bugs.python.org/file10408/test_math_sum12.py __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 18:14:50 2008 From: report at bugs.python.org (Kurt B. Kaiser) Date: Thu, 22 May 2008 16:14:50 +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: <1211472890.44.0.280377269486.issue2704@psf.upfronthosting.co.za> Changes by Kurt B. Kaiser : ---------- keywords: +patch __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 18:33:38 2008 From: report at bugs.python.org (Kurt B. Kaiser) Date: Thu, 22 May 2008 16:33:38 +0000 Subject: [issue1948] Cant open python gui using VISTA In-Reply-To: <1201462739.88.0.734539859059.issue1948@psf.upfronthosting.co.za> Message-ID: <1211474016.91.0.877876049776.issue1948@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: No response from OP, closing. ---------- resolution: -> works for me status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 19:07:10 2008 From: report at bugs.python.org (Kurt B. Kaiser) Date: Thu, 22 May 2008 17:07:10 +0000 Subject: [issue2584] numeric overflow in IDLE In-Reply-To: <1207667953.02.0.926823971175.issue2584@psf.upfronthosting.co.za> Message-ID: <1211476030.63.0.786773629809.issue2584@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: When this is running, what happens if you hit Control-c a few times, especially in the first few seconds? Does it abort with a KeyboardInterrupt? Does it stop responding to Control-c after the window fills up? Note that IDLE slows down when very large quantities of text are printed to the shell window. This is an issue with the Tk library. The subprocess is supposed to exit when it notices that the socket has closed. This doesn't work well on Windows, unfortunately. We are thinking about it ;-) It doesn't seem that what you are attempting to fix has any realistic application. I don't run Vista. Check your resources right after you start your code. Is your system unresponsive because you are running out of memory or because you are using CPU 100%? Patient: My head hurts when I bang it against a wall. Doctor: So, don't do that! __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 19:09:05 2008 From: report at bugs.python.org (Adam Olsen) Date: Thu, 22 May 2008 17:09:05 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211476145.78.0.739365631677.issue643841@psf.upfronthosting.co.za> Adam Olsen added the comment: _deref won't work for remote objects, will it? Nor _unwrap, although that starts to get "fun". ____________________________________ Tracker ____________________________________ From report at bugs.python.org Thu May 22 19:33:10 2008 From: report at bugs.python.org (Kurt B. Kaiser) Date: Thu, 22 May 2008 17:33:10 +0000 Subject: [issue2913] idlelib/EditorWindow.py uses xrange() In-Reply-To: <1211197785.96.0.212094869578.issue2913@psf.upfronthosting.co.za> Message-ID: <1211477589.9.0.85066311564.issue2913@psf.upfronthosting.co.za> Changes by Kurt B. Kaiser : ---------- assignee: -> kbk nosy: +kbk __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 19:38:14 2008 From: report at bugs.python.org (Haoyu Bai) Date: Thu, 22 May 2008 17:38:14 +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: <1211477894.1.0.939675506288.issue2799@psf.upfronthosting.co.za> Changes by Haoyu Bai : ---------- nosy: +bhy __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 20:35:05 2008 From: report at bugs.python.org (Kurt B. Kaiser) Date: Thu, 22 May 2008 18:35:05 +0000 Subject: [issue2584] numeric overflow in IDLE In-Reply-To: <1207667953.02.0.926823971175.issue2584@psf.upfronthosting.co.za> Message-ID: <1211481305.31.0.0530948589372.issue2584@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: BTW, instead of a reboot, use Task Manager (or whatever they needlessly renamed it to on Vista :) to kill all python processes. That should free up your machine. __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 21:21:15 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 22 May 2008 19:21:15 +0000 Subject: [issue2940] Building Python fails on SunOS In-Reply-To: <1211447814.19.0.559318035687.issue2940@psf.upfronthosting.co.za> Message-ID: <1211484075.08.0.253565484745.issue2940@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Why do you think this is a bug in Python? ---------- nosy: +loewis __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 21:56:06 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 22 May 2008 19:56:06 +0000 Subject: [issue2946] setuptools: bdist_wininst adds duplicate entry to dist_files In-Reply-To: <1211468458.47.0.0516095652943.issue2946@psf.upfronthosting.co.za> Message-ID: <1211486166.67.0.643465263704.issue2946@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Is that a bug in setuptools? If so, don't report it here - setuptools is a separate project, not part of the core Python (bdist_wininst is part of distutils). ---------- nosy: +loewis __________________________________ Tracker __________________________________ From report at bugs.python.org Thu May 22 21:57:04 2008 From: report at bugs.python.org (Armin Rigo) Date: Thu, 22 May 2008 19:57:04 +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: <1211486224.45.0.854183029981.issue1798@psf.upfronthosting.co.za> Armin Rigo added the comment: Alternatively, we can try to make ctypes "feel like" C itself: ctypes.set_errno(0) while True: dirent = linux_c_lib.readdir(byref(dir)) if not dirent: if ctypes.get_errno() == 0: break else: raise IOError("oups!") We are doing this kind of thing in PyPy with the "rffi" foreign function interface. To achieve this result, ctypes would have to maintain internally an internal, global (but thread-local) variable representing the current errno value. Just before doing a C library function call, ctypes would copy this variable into the real C-level errno; and immediately after the call it would read the C-level errno back into its internal variable. In this way, other calls to C functions unrelated to ctypes don't interfere. The get_errno() and set_errno() functions merely access the thread-local variable (not the real C-level errno). ---------- nosy: +arigo __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 00:16:59 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 22 May 2008 22:16:59 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211494619.55.0.820164143084.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: Correct, this isn't intended to be an all-singing, all-dancing proxy implementation - it's meant to be a simple solution for local proxies that want to change the behaviour of a few operations while leaving other operations unaffected. The proposed documentation I uploaded covers some of its limitations. However, even for those cases, ProxyMixin and/or test_typetools.TestProxyMixin can be used as a reference to make sure a custom proxy implementation correctly handles all the special method invocations that can bypass __getattribute__. ____________________________________ Tracker ____________________________________ From report at bugs.python.org Fri May 23 00:46:27 2008 From: report at bugs.python.org (Tim Wilcoxson) Date: Thu, 22 May 2008 22:46:27 +0000 Subject: [issue2584] numeric overflow in IDLE In-Reply-To: <1211476030.63.0.786773629809.issue2584@psf.upfronthosting.co.za> Message-ID: Tim Wilcoxson added the comment: I guess my only reply is....fair enough. heh. On Thu, May 22, 2008 at 1:07 PM, Kurt B. Kaiser wrote: > > Kurt B. Kaiser added the comment: > > When this is running, what happens if you hit Control-c a few times, > especially in the first few seconds? Does it abort with a > KeyboardInterrupt? Does it stop responding to Control-c after the window > fills up? > > Note that IDLE slows down when very large quantities of text are printed > to the shell window. This is an issue with the Tk library. > > The subprocess is supposed to exit when it notices that the socket has > closed. This doesn't work well on Windows, unfortunately. We are > thinking about it ;-) > > It doesn't seem that what you are attempting to fix has any realistic > application. > > I don't run Vista. Check your resources right after you start your > code. Is your system unresponsive because you are running out of memory > or because you are using CPU 100%? > > > Patient: My head hurts when I bang it against a wall. > Doctor: So, don't do that! > > __________________________________ > Tracker > > __________________________________ > Added file: http://bugs.python.org/file10409/unnamed __________________________________ Tracker __________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Fri May 23 00:48:27 2008 From: report at bugs.python.org (Adam Olsen) Date: Thu, 22 May 2008 22:48:27 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211496506.89.0.692395067445.issue643841@psf.upfronthosting.co.za> Adam Olsen added the comment: If it's so specialized then I'm not sure it should be in the stdlib - maybe as a private API, if there was a user. Having a reference implementation is noble, but this isn't the right way to do it. Maybe as an example in Doc or in the cookbook. Better yet, add the unit test and define the ProxyMixin directly in that file. ____________________________________ Tracker ____________________________________ From report at bugs.python.org Fri May 23 01:14:27 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Thu, 22 May 2008 23:14:27 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211498067.46.0.0959850776658.issue643841@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea ____________________________________ Tracker ____________________________________ From report at bugs.python.org Fri May 23 02:12:25 2008 From: report at bugs.python.org (Jean Brouwers) Date: Fri, 23 May 2008 00:12:25 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211501544.42.0.689070686549.issue2819@psf.upfronthosting.co.za> Jean Brouwers added the comment: Here is another, cleaner revision 19 of the same mathmodule.c patch and the corresponding test_math_sum19.py script. /Jean Brouwers Added file: http://bugs.python.org/file10410/mathmodule19.c.2.6a3.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 02:13:37 2008 From: report at bugs.python.org (Jean Brouwers) Date: Fri, 23 May 2008 00:13:37 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211501617.65.0.884879194098.issue2819@psf.upfronthosting.co.za> Changes by Jean Brouwers : Added file: http://bugs.python.org/file10411/test_math_sum19.py __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 02:23:03 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 23 May 2008 00:23:03 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211502183.13.0.166467242963.issue2819@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Nice work Jean. Marking the patch accepted. Mark please go ahead with commit. Once the commit has settled for a couple of days, go ahead with a separate patch to cover the rest of 754R logic for special values. After that one settles, close this issue and open a new one for a comparable patch in cmath. ---------- assignee: rhettinger -> marketdickinson resolution: -> accepted __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 03:37:21 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 May 2008 01:37:21 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211506641.23.0.436677872132.issue2819@psf.upfronthosting.co.za> Mark Dickinson added the comment: math module patch committed, r63542. I'm still working on converting the tests to the unittest framework. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 04:37:35 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 May 2008 02:37:35 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1211510253.86.0.23400436732.issue2819@psf.upfronthosting.co.za> Mark Dickinson added the comment: Tests committed in r63543 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 05:22:51 2008 From: report at bugs.python.org (Vasco Rodrigues) Date: Fri, 23 May 2008 03:22:51 +0000 Subject: [issue2948] Unicode support for hashing algorithms In-Reply-To: <1211512970.98.0.439490076144.issue2948@psf.upfronthosting.co.za> Message-ID: <1211512970.98.0.439490076144.issue2948@psf.upfronthosting.co.za> New submission from Vasco Rodrigues : The hashing algorithms don't support Unicode. Any Unicode text given to them is first tried to convert ascii and then hashed. Not all strings are convertible to ascii. Now that Unicode is becoming the default encoding, specially for the web side of python, where a lot of this hashing algorithms are used. There should be some kind of Unicode support in them. Example: from hashlib import md5 md5(u'jo?o') UnicodeEncodeError: 'ascii' codec can't encode character u'\xe3' in position 2: ordinal not in range(128) ---------- components: Unicode messages: 67214 nosy: vvro severity: normal status: open title: Unicode support for hashing algorithms versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 05:38:29 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 23 May 2008 03:38:29 +0000 Subject: [issue2948] Unicode support for hashing algorithms In-Reply-To: <1211512970.98.0.439490076144.issue2948@psf.upfronthosting.co.za> Message-ID: <1211513909.49.0.869721572381.issue2948@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't think this is the right thing to do. The hash algorithms are defined in terms of bytes, but Unicode is an abstracted from a byte level encoding. It doesn't make sense to convert using an arbitrary encoding (such as UTF-8) because someone else might hash the same text using a different encoding. Mark, do you concur? ---------- assignee: -> lemburg nosy: +lemburg, rhettinger type: -> feature request versions: +Python 2.6 -Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 06:19:47 2008 From: report at bugs.python.org (Vasco Rodrigues) Date: Fri, 23 May 2008 04:19:47 +0000 Subject: [issue2948] Unicode support for hashing algorithms In-Reply-To: <1211512970.98.0.439490076144.issue2948@psf.upfronthosting.co.za> Message-ID: <1211516387.32.0.42669801003.issue2948@psf.upfronthosting.co.za> Vasco Rodrigues added the comment: You could just make a check for unicode strings and issue the encode in the hash function. I understand the byte abstraction, but if you issue an encode on a unicode string with only ascii chars it gets converted to the same in ascii, result will be the same. So i got to do md5(u'jo?o'.encode("utf-8"))? Wasn't unicode becoming the default? If I do md5(u'john'), it works. And that's a unicode string. It should have told me, no unicode then... __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 06:45:23 2008 From: report at bugs.python.org (Vasco Rodrigues) Date: Fri, 23 May 2008 04:45:23 +0000 Subject: [issue2948] Unicode support for hashing algorithms In-Reply-To: <1211512970.98.0.439490076144.issue2948@psf.upfronthosting.co.za> Message-ID: <1211517922.86.0.1015231271.issue2948@psf.upfronthosting.co.za> Changes by Vasco Rodrigues : ---------- versions: +Python 2.4, Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 07:07:40 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 May 2008 05:07:40 +0000 Subject: [issue2880] Rename repr to reprlib In-Reply-To: <1210914200.71.0.373705833301.issue2880@psf.upfronthosting.co.za> Message-ID: <1211519254.8.0.51029000374.issue2880@psf.upfronthosting.co.za> Brett Cannon added the comment: r635647 and r635649 reverted the module in 3.0. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 07:08:04 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 May 2008 05:08:04 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211519284.53.0.226096782236.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: -Rename repr to reprlib __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 07:50:36 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 23 May 2008 05:50:36 +0000 Subject: [issue2948] Unicode support for hashing algorithms In-Reply-To: <1211512970.98.0.439490076144.issue2948@psf.upfronthosting.co.za> Message-ID: <1211521836.41.0.269726244381.issue2948@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Only 2.6 should be marked. This is a feature request for an implicit conversion with a default encoding; it is not a bugfix. FWIW, here's a reference to an earlier discussion: http://mail.python.org/pipermail/python-list/2004-April/258630.html Also, it is unpersuasive that md5() works with u'john'. That is just an artifact of the 2.x series. In 3.0, there is a more clear distinction between bytes and text. Recommending that this be rejected and closed. Without a universally accepted (not just with Python) implicit coding, there's no way to check MD5 checksums match for the same unicode text. ---------- priority: -> low versions: -Python 2.4, Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 07:59:16 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 05:59:16 +0000 Subject: [issue2948] Unicode support for hashing algorithms In-Reply-To: <1211512970.98.0.439490076144.issue2948@psf.upfronthosting.co.za> Message-ID: <1211522356.54.0.826601200436.issue2948@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'm rejecting this idea, for the reasons already given by others: the same string might have different hash values, depending on which encoding is chosen. Users will have to be explicit when hashing, just as they need to be explicit when they chose a hash algorithm (i.e. md5, sha1, or sha256 - they all do the same thing, but still produce different output). If you want a hash algorithm that abstracts from these details, use the builtin hash function: py> hash(u'jo?o') 679553179 ---------- nosy: +loewis resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 09:33:29 2008 From: report at bugs.python.org (Adrian M) Date: Fri, 23 May 2008 07:33:29 +0000 Subject: [issue2940] Building Python fails on SunOS In-Reply-To: <1211447814.19.0.559318035687.issue2940@psf.upfronthosting.co.za> Message-ID: <1211528009.59.0.267759029275.issue2940@psf.upfronthosting.co.za> Adrian M added the comment: Also, please check: http://bugs.python.org/issue1544306 (exactly the same issue that has just been closed because of the lack of feedback from the original reporter) Here is another (old) report referring to the very same issue happening on Solaris: http://bugs.python.org/issue1234473 (an issue that doesn't seem to be solved) I have no idea whether this is a real "Python bug" or not. I'm just reporting a build "issue" that I'm experiencing when trying to compile python on this particular (non-typical) platform. So, I have the access to this SunOS machine and the you (the Python developers) have the knowledge. Let's just work together and try to discover why the building process is not working out-of-the-box on SunOS, rather that imply that it's not a real python bug. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 09:44:36 2008 From: report at bugs.python.org (daggett) Date: Fri, 23 May 2008 07:44:36 +0000 Subject: [issue2891] urllib not handling ftp servers that do not support REST In-Reply-To: <1210933128.84.0.447091600093.issue2891@psf.upfronthosting.co.za> Message-ID: <1211528676.63.0.783604701638.issue2891@psf.upfronthosting.co.za> daggett added the comment: ok, I've chatted IRC with some Python devs on #python and it seems that it's a python-urlgrabber (yum package manager) issue so I'll reassign my redhat bug report. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 10:32:52 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 23 May 2008 08:32:52 +0000 Subject: [issue2948] Unicode support for hashing algorithms In-Reply-To: <1211513909.49.0.869721572381.issue2948@psf.upfronthosting.co.za> Message-ID: <4836810C.5020905@egenix.com> Marc-Andre Lemburg added the comment: On 2008-05-23 05:38, Raymond Hettinger wrote: > Raymond Hettinger added the comment: > > I don't think this is the right thing to do. The hash algorithms are > defined in terms of bytes, but Unicode is an abstracted from a byte > level encoding. It doesn't make sense to convert using an arbitrary > encoding (such as UTF-8) because someone else might hash the same text > using a different encoding. > > Marc, do you concur? Yes. While we could fix an encoding to use for converting Unicode to bytes, e.g. UTF-8, you clearly want hash functions to be portable across platforms, programming languages and implementations. Other languages or implementations might choose UTF-16 or some other encoding, so it's not clear which encoding to choose and there doesn't seem to be a standard for this either. -1 on the idea. Martin already closed and rejected the idea for me. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 23 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/ ________________________________________________________________________ :::: 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 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 10:34:18 2008 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 23 May 2008 08:34:18 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211531652.61.0.570273289928.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: Specialised? What's specialised about it? It's designed to serve as a replacement for the simple delegation use cases that are currently met quite adequately by classic classes, since those are no longer available in 3.0. ____________________________________ Tracker ____________________________________ From report at bugs.python.org Fri May 23 10:49:52 2008 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 23 May 2008 08:49:52 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211532591.94.0.0223784695885.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: As to the rationale for having it in the standard library: it's because of the coupling with the implementation of the type() builtin. If a new slot is added to type() that the interpreter may access without consulting __getattribute__, then ProxyMixin can be updated to correctly delegate that slot. If alternate implementations such as Jython or IronPython have additional such slots, they can also provide their own version of ProxyMixin. If ProxyMixin doesn't become the development responsibility of the same group that is responsible for the implementation of the type object then it may as well not exist (since it can't be trusted to be kept up to date with the development process). ____________________________________ Tracker ____________________________________ From report at bugs.python.org Fri May 23 12:03:16 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 23 May 2008 10:03:16 +0000 Subject: [issue2663] shutil.copytree glob-style filtering [patch] In-Reply-To: <1208726903.81.0.936252523277.issue2663@psf.upfronthosting.co.za> Message-ID: <1211536993.81.0.0506196814327.issue2663@psf.upfronthosting.co.za> Georg Brandl added the comment: Hi Tarek, here's a review: * The new docs are not very clear about ignore_patterns being a function factory. E.g.: """The callable must return a list of folder and file names relative to the path, that will be ignored in the copy process. :func:`ignore_patterns` is an example of such callable.""" Rather, the *return value* of ignore_patterns is an example of such a callable. * The new docs should also note that copytree is called recursively, and therefore the ignore callable will be called once for each directory that is copied. * Instead of "path and its elements" the terminology should be "directory" and "the list of its contents, as returned by os.listdir()". Likewise, "folder" should be "directory". * The second new example makes me wonder if *ignore* is the correct name for the parameter. Is *filter* better? * A nit; the signature should be "copytree(src, dst[, symlinks[, ignore]])". * The patch adds a space in the definition of rmtree(). ---------- nosy: +georg.brandl __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 12:11:53 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 23 May 2008 10:11:53 +0000 Subject: [issue2904] Cross-referencing to a method using an alternate title don't work with add_function_parentheses=True In-Reply-To: <1211086991.24.0.536909381187.issue2904@psf.upfronthosting.co.za> Message-ID: <1211537512.8.0.0965934420889.issue2904@psf.upfronthosting.co.za> Georg Brandl added the comment: You're right; I'll fix this ASAP. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 13:15:52 2008 From: report at bugs.python.org (Thomas Heller) Date: Fri, 23 May 2008 11:15:52 +0000 Subject: [issue1798] Add ctypes calling convention that allows safe access of errno In-Reply-To: <1211486224.45.0.854183029981.issue1798@psf.upfronthosting.co.za> Message-ID: <4836A75B.60403@ctypes.org> Thomas Heller added the comment: That's a great idea. > Just before doing a C library function call, > ctypes would copy this variable into the real C-level errno; and Is the ctypes.set_errno(...) function really needed? Wouldn't it be sufficient if errno is simply set to zero before each function call? __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 13:22:49 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 23 May 2008 11:22:49 +0000 Subject: [issue2949] Windows installer doesn't include OpenSSL license and notice In-Reply-To: <1211541769.18.0.393592583867.issue2949@psf.upfronthosting.co.za> Message-ID: <1211541769.18.0.393592583867.issue2949@psf.upfronthosting.co.za> New submission from Marc-Andre Lemburg : The _ssl module is built against OpenSSL. Since I couldn't find any OpenSSL DLLs in my Python install dir and due to the size of the _ssl.pyd, I assume that it is statically linked against OpenSSL. That's all fine, but then I'm missing the OpenSSL license and attribution notice somewhere in the installer, the README of the installation or elsewhere. The download page should also include a hint that the Windows installer does include crypto software, since in some countries it is illegal to download and/or use crypto software, see e.g. http://rechten.uvt.nl/koops/cryptolaw/cls-sum.htm ---------- components: Build, Installation, Windows messages: 67228 nosy: lemburg severity: normal status: open title: Windows installer doesn't include OpenSSL license and notice versions: Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 14:26:10 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Fri, 23 May 2008 12:26:10 +0000 Subject: [issue2872] Remove commands for PEP 3108 In-Reply-To: <1210912647.86.0.565995912638.issue2872@psf.upfronthosting.co.za> Message-ID: <1211545570.54.0.309789188326.issue2872@psf.upfronthosting.co.za> Quentin Gallet-Gilles added the comment: Ok, here are the patches. Since it's a combination of renaming and removing, I had to improvize a little, particularly in the 2.6 documentation. Hope it's done correctly. I still have doubts about the following issue, as commented in test_commands.py : # The module says: # "NB This only works (and is only relevant) for UNIX." # # Actually, getoutput should work on any platform with an os.popen, but # I'll take the comment as given, and skip this suite. I played it safe as well and didn't change the platform test (both in trunk/test_py3kwarn and py3k/test_subprocess). Should this restriction remain ? ---------- keywords: +patch Added file: http://bugs.python.org/file10412/remove_commands.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 14:29:35 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Fri, 23 May 2008 12:29:35 +0000 Subject: [issue2872] Remove commands for PEP 3108 In-Reply-To: <1210912647.86.0.565995912638.issue2872@psf.upfronthosting.co.za> Message-ID: <1211545774.93.0.689438588561.issue2872@psf.upfronthosting.co.za> Quentin Gallet-Gilles added the comment: Ok, here are the patches. Since it's a combination of renaming and removing, I had to improvise a little (particularly in the 2.6 documentation). Hope it's done correctly. I still have doubts about the following issue. As commented in test_commands.py: # The module says: # "NB This only works (and is only relevant) for UNIX." # # Actually, getoutput should work on any platform with an os.popen, but # I'll take the comment as given, and skip this suite. I also decided to play it safe and didn't change the test (both in trunk/test_py3kwarn and py3k/test_subprocess). Should this restriction remain? Added file: http://bugs.python.org/file10413/remove_commands.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 14:29:51 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Fri, 23 May 2008 12:29:51 +0000 Subject: [issue2872] Remove commands for PEP 3108 In-Reply-To: <1210912647.86.0.565995912638.issue2872@psf.upfronthosting.co.za> Message-ID: <1211545791.16.0.443003979358.issue2872@psf.upfronthosting.co.za> Changes by Quentin Gallet-Gilles : Removed file: http://bugs.python.org/file10412/remove_commands.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 14:31:01 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Fri, 23 May 2008 12:31:01 +0000 Subject: [issue2872] Remove commands for PEP 3108 In-Reply-To: <1210912647.86.0.565995912638.issue2872@psf.upfronthosting.co.za> Message-ID: <1211545861.39.0.916038369401.issue2872@psf.upfronthosting.co.za> Quentin Gallet-Gilles added the comment: Sorry for the double post Added file: http://bugs.python.org/file10414/commands_2.6.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 14:31:27 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Fri, 23 May 2008 12:31:27 +0000 Subject: [issue2872] Remove commands for PEP 3108 In-Reply-To: <1210912647.86.0.565995912638.issue2872@psf.upfronthosting.co.za> Message-ID: <1211545887.5.0.23616093546.issue2872@psf.upfronthosting.co.za> Changes by Quentin Gallet-Gilles : Added file: http://bugs.python.org/file10415/commands_import_fixer.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 14:32:54 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 12:32:54 +0000 Subject: [issue2949] Windows installer doesn't include OpenSSL license and notice In-Reply-To: <1211541769.18.0.393592583867.issue2949@psf.upfronthosting.co.za> Message-ID: <1211545974.08.0.907614304599.issue2949@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Would you like to work on a patch? ---------- nosy: +loewis __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 14:42:17 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 12:42:17 +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: <1211546536.76.0.29325537863.issue1798@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I also think that there should be explicit set_errno/get_errno calls. If you are interfacing to C, things should be as they are in C, i.e. you have to explicitly set errno to zero if you want to read it afterwards in a reliable manner (unless you can find out whether an error occurred by different means, e.g. a -1 return value - which is fairly common). ---------- nosy: +loewis __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 14:49:34 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Fri, 23 May 2008 12:49:34 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211546974.19.0.250860192914.issue2775@psf.upfronthosting.co.za> Quentin Gallet-Gilles added the comment: While working on the commands module removal, I found two missed import renaming in the py3k branch that made regrtest skip some tests. The attached patch corrects them. Added file: http://bugs.python.org/file10416/import_renames_py3k.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 15:01:46 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 23 May 2008 13:01:46 +0000 Subject: =?utf-8?q?[issue2949]_Windows_installer_doesn't_include_OpenSSL_license_and=09notice?= In-Reply-To: <1211545974.08.0.907614304599.issue2949@psf.upfronthosting.co.za> Message-ID: <4836C010.2000307@egenix.com> Marc-Andre Lemburg added the comment: On 2008-05-23 14:32, Martin v. L?wis wrote: > Martin v. L?wis added the comment: > > Would you like to work on a patch? No - I don't know anything about the Windows MSI installer for Python. Just wanted to bring the obvious breach of the OpenSSL license to your attention. ---------- title: Windows installer doesn't include OpenSSL license and notice -> Windows installer doesn't include OpenSSL license and notice __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 15:39:28 2008 From: report at bugs.python.org (Andy Novocin) Date: Fri, 23 May 2008 13:39:28 +0000 Subject: [issue2950] silly readline module problem In-Reply-To: <1211549968.03.0.808725881847.issue2950@psf.upfronthosting.co.za> Message-ID: <1211549968.03.0.808725881847.issue2950@psf.upfronthosting.co.za> New submission from Andy Novocin : I installed python 2.5.2 on my SUSE 10.3 system which came with 2.4.4 and when you type import readline it returns No module named readline. When installing I just unzipped, ./configure, make, sudo make install. Im brand new to Linux and Python (probably clearly). ---------- components: Extension Modules messages: 67236 nosy: AndyNovo severity: normal status: open title: silly readline module problem versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 15:42:31 2008 From: report at bugs.python.org (Thomas Heller) Date: Fri, 23 May 2008 13:42:31 +0000 Subject: [issue1798] Add ctypes calling convention that allows safe access of errno In-Reply-To: <1211546536.76.0.29325537863.issue1798@psf.upfronthosting.co.za> Message-ID: <4836C9CB.2080309@ctypes.org> Thomas Heller added the comment: But would it hurt to set errno to zero before *any* function call? My experiments show that it is faster to clear errno always instead of trying to get a previously set value from tls storage in a ctypes-global object created by calling "threading.local()". __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 16:01:08 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 14:01:08 +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: <1211551268.31.0.580132082.issue1798@psf.upfronthosting.co.za> Martin v. L?wis added the comment: People might get confused that errno is modified "without reason". I don't understand the need for the TLS, either - can't you just read and write the "true" errno (which will also be thread-local)? __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 16:14:13 2008 From: report at bugs.python.org (Thomas Heller) Date: Fri, 23 May 2008 14:14:13 +0000 Subject: [issue1798] Add ctypes calling convention that allows safe access of errno In-Reply-To: <1211551268.31.0.580132082.issue1798@psf.upfronthosting.co.za> Message-ID: <4836D131.7090601@ctypes.org> Thomas Heller added the comment: This does not work because Python can run arbitrary code, even in the same thread, between the call to a function in a shared library and the call to get_errno(). __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 16:14:48 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 14:14:48 +0000 Subject: [issue2940] Building Python fails on SunOS In-Reply-To: <1211447814.19.0.559318035687.issue2940@psf.upfronthosting.co.za> Message-ID: <1211552088.0.0.0659659930609.issue2940@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Please take a look at the config.log, and locate the lines In file included from /usr/GNU/lib/gcc-lib/sparc-sun-solaris2.4/2.6.3/include/time.h:90, from /usr/include/sys/time.h:418, from /usr/include/sys/termios.h:23, from /usr/include/sys/termio.h:13, from /usr/include/termio.h:13, from /usr/GNU/lib/gcc-lib/sparc-sun-solaris2.4/2.6.3/include/curses.h:48, from conftest.c:47: /usr/include/sys/siginfo.h:74: parse error before `pthread_attr_t' Then please take a look at line 90 of /usr/GNU/lib/gcc-lib/sparc-sun-solaris2.4/2.6.3/include/time.h and confirm that it indeed includes siginfo.h at that line. Then please compare /usr/include/time.h with /usr/GNU/lib/gcc-lib/sparc-sun-solaris2.4/2.6.3/include/time.h and report any differences that you see. To me, it seems that your compiler's header files don't match your system's header files. This is not surprising, as gcc 2.6.3 was released in 1994, years before Solaris 9 was released; your gcc was build for Solaris 2.4. You probably need to run fixincludes again (i.e. rebuild gcc for your system), or install a newer version of gcc entirely. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 16:20:35 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 14:20:35 +0000 Subject: [issue1513695] new turtle module Message-ID: <1211552435.18.0.522333841132.issue1513695@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you please file a contributor agreement? This would be a prerequisite for including the module. Also, is there any progress on the open issues? I really would like to see a single zip file that unpacks on top of the Python tree, replaces the turtle module, and works just fine in all respects out of the box. _____________________________________ Tracker _____________________________________ From report at bugs.python.org Fri May 23 16:31:53 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 14:31:53 +0000 Subject: [issue2111] mmap segfaults when trying to write a block opened with PROT_READ In-Reply-To: <1203000004.58.0.354729016159.issue2111@psf.upfronthosting.co.za> Message-ID: <1211553112.36.0.440135781263.issue2111@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Committed to 2.5 as r63561 ---------- status: pending -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 16:52:50 2008 From: report at bugs.python.org (Maciek Fijalkowski) Date: Fri, 23 May 2008 14:52:50 +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: <1211554370.31.0.0577085616372.issue1798@psf.upfronthosting.co.za> Maciek Fijalkowski added the comment: On the one hand, no it does not hurt when we're resetting errno before any call. On the other hand if we try hard "to be like C", it's a bit strange that we always reset errno (which is on the other hand very good practice anyway). IMO it's fine to reset errno before any call, until someone can find example where it's not good. Cheers, fijal __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 16:58:15 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 14:58:15 +0000 Subject: [issue1622] zipfile hangs on certain zip files In-Reply-To: <1197595878.01.0.706002731675.issue1622@psf.upfronthosting.co.za> Message-ID: <1211554694.77.0.239585535427.issue1622@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Alan, it appears that the patch doesn't apply anymore, in r63553. Can you please update it? __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 17:00:23 2008 From: report at bugs.python.org (Alan McIntyre) Date: Fri, 23 May 2008 15:00:23 +0000 Subject: [issue1622] zipfile hangs on certain zip files In-Reply-To: <1197595878.01.0.706002731675.issue1622@psf.upfronthosting.co.za> Message-ID: <1211554823.61.0.302977157997.issue1622@psf.upfronthosting.co.za> Alan McIntyre added the comment: Sure, I'll look at it later today or over the weekend. I should probably break out the parts that apply to other issues and update those patches as well. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 17:07:09 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 15:07:09 +0000 Subject: [issue1722225] Build on QNX 6 Message-ID: <1211555229.65.0.393750186534.issue1722225@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the patch. Committed as r63562. _____________________________________ Tracker _____________________________________ From report at bugs.python.org Fri May 23 17:07:52 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 15:07:52 +0000 Subject: [issue1722225] Build on QNX 6 Message-ID: <1211555272.65.0.502775979337.issue1722225@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> accepted status: open -> closed _____________________________________ Tracker _____________________________________ From report at bugs.python.org Fri May 23 17:19:09 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 15:19:09 +0000 Subject: [issue1390] toxml generates output that is not well formed In-Reply-To: <1194224464.02.0.498094570041.issue1390@psf.upfronthosting.co.za> Message-ID: <1211555949.07.0.769732976426.issue1390@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the patch. Committed as r63563. Because of the new exception, I won't backport the change to 2.5. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 17:29:44 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 23 May 2008 15:29:44 +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: <1211556584.89.0.0957294830892.issue2871@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Currently, when creating a new Thread object, there is no good way of > getting that thread's get_ident() value. Well, how about doing it at the beginning of its run() method, e.g. in a Thread subclass: class MyThread(threading.Thread): def run(self): self.thread_ident = thread.get_ident() threading.Thread.run(self) # or any other stuff Also, I don't think get_ident() is often useful when using the Threading module, since you can just use the id() of the current Thread object instead. ---------- nosy: +pitrou __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 17:32:16 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 15:32:16 +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: <1211556736.84.0.901383414355.issue1798@psf.upfronthosting.co.za> Martin v. L?wis added the comment: How can Python run arbitrary code between the return from a ctypes method and the next Python instruction? None of the code should have any effect on errno. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 17:37:59 2008 From: report at bugs.python.org (Thomas Heller) Date: Fri, 23 May 2008 15:37:59 +0000 Subject: [issue1798] Add ctypes calling convention that allows safe access of errno In-Reply-To: <1211556736.84.0.901383414355.issue1798@psf.upfronthosting.co.za> Message-ID: <4836E4BD.6070306@ctypes.org> Thomas Heller added the comment: > How can Python run arbitrary code between the return from a ctypes > method and the next Python instruction? None of the code should have any > effect on errno. By freeing objects because their refcount has reached zero? __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 17:47:37 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 15:47:37 +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: <1211557657.36.0.320365120438.issue2799@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't agree that PyUnicode_AsString is useless. There are many cases where you don't need the length of the string, e.g. when relying on NULL termination when passing stuff to some C library. I suggest to close this report as "works for me". As for the unrelated issue of PyUnicode_AsStringAndSize: AFAICT, PyString_AsStringAndSize doesn't support Unicode objects (and IMO shouldn't, either). Making PyUnicode_AsStringAndSize and PyString_AsStringAndSize similar is probably a good idea. ---------- nosy: +loewis __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 17:57:21 2008 From: report at bugs.python.org (Armin Rigo) Date: Fri, 23 May 2008 15:57:21 +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: <1211558241.9.0.166872314709.issue1798@psf.upfronthosting.co.za> Armin Rigo added the comment: I'm in favor of keeping set_errno(). Not only is it more like C, but it's also future-proof against a user that will end up really needing the feature. If we go for always setting errno to zero, we cannot change that later any more, because everybody's code will rely on it. (An example of possible usage of set_errno(): the user might need to save and restore the value around a subfunction call that may call more C function via ctypes.) I personally don't care if this means a few percents of performance loss; I don't see how ctypes can be performance-critical in the first place given its huge overhead compared to e.g. rewriting the code in C. I imagine that the same approach could work with GetLastError() on Windows. (But is there a SetLastError() on Windows?) Using the native errno instead of a custom TLS value is bad because a lot of things can occur; for example, adding debugging prints or a pdb breakpoint between the function return and the call to get_errno() is very likely to end up overwriting the C-level errno value. For all I know, on some platforms errno could even be overwritten by the calls to the unlock/lock operation that CPython does at regular intervals in order to let other threads run. (For example I can easily imagine that GetLastError() is overridden by the lock/unlock operations on Windows.) __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 19:22:38 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 23 May 2008 17:22:38 +0000 Subject: [issue2909] struct.Struct.unpack to return a namedtuple for easier attribute access In-Reply-To: <1211141600.93.0.483393592548.issue2909@psf.upfronthosting.co.za> Message-ID: <1211563358.16.0.558122248577.issue2909@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Added example to docs. See r63564. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 19:31:11 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 17:31:11 +0000 Subject: [issue1798] Add ctypes calling convention that allows safe access of errno In-Reply-To: <4836E4BD.6070306@ctypes.org> Message-ID: <4836FF58.7080609@v.loewis.de> Martin v. L?wis added the comment: >> How can Python run arbitrary code between the return from a ctypes >> method and the next Python instruction? None of the code should have any >> effect on errno. > > By freeing objects because their refcount has reached zero? No, that should not set errno. Free cannot fail, and will not modify errno. Try running #include int main() { errno = 117; free(malloc(100)); printf("%d\n", errno); } malloc might set errno, but only if it fails (in which case you'll get a Python exception, anyway). __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 19:34:23 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 17:34:23 +0000 Subject: [issue1798] Add ctypes calling convention that allows safe access of errno In-Reply-To: <1211558241.9.0.166872314709.issue1798@psf.upfronthosting.co.za> Message-ID: <4837001B.5010908@v.loewis.de> Martin v. L?wis added the comment: [...] > > Using the native errno instead of a custom TLS value is bad because a > lot of things can occur So what's the semantics of set_errno then? Set the real errno? If so, what if it gets changed between the call to set_errno, and the actual invocation of API function? Set the TLS errno? If so, when does it get copied into the real errno? __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 19:47:23 2008 From: report at bugs.python.org (Thomas Heller) Date: Fri, 23 May 2008 17:47:23 +0000 Subject: [issue1798] Add ctypes calling convention that allows safe access of errno In-Reply-To: <4837001B.5010908@v.loewis.de> Message-ID: <48370324.6060705@ctypes.org> Thomas Heller added the comment: >> Using the native errno instead of a custom TLS value is bad because a >> lot of things can occur > > So what's the semantics of set_errno then? Set the real errno? If so, > what if it gets changed between the call to set_errno, and the actual > invocation of API function? Set the TLS errno? If so, when does it get > copied into the real errno? AFAIU, set_errno/get_errno should provide a ctypes-private copy of the real errno. The copy is copied into the 'real' errno just before ffi_call (in Modules/_ctypes/callproc.c), and the real errno is copied in to ctypes copy right after the call. Probably the real errno from before this action should be restored at the end. Code that I have in mind: __thread int _ctypes_errno; /* ctypes-private global error number in thread local storage */ static int _call_function_pointer(...) { int old_errno; . . old_errno = errno; errno = _ctypes_errno; ffi_call(....); _ctypes_errno = errno; errno = old_errno; . . } static PyObject * _ctypes_set_errno(PyObject *self, Pyobject *args) { . _ctypes_errno = parsed_argument; . } static PyObject * _ctypes_get_errno(PyObject *self, Pyobject *args) { return PyInt_FromLong(_ctypes_errno); } __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 19:51:13 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 23 May 2008 17:51:13 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211565073.71.0.486751665021.issue643841@psf.upfronthosting.co.za> Adam Olsen added the comment: Surely remote proxies fall under what would be expected for a "proxy mixin"? If it's in the stdlib it should be a canonical implementation, NOT a reference implementation. At the moment I can think up 3 use cases: * weakref proxies * lazy load proxy * distributed object The first two could be done if _deref were made overridable. The third needs to turn everything into a message, which would could either do directly, or we could do by turning everything into normal method lookups which then get handled through __getattribute__. ____________________________________ Tracker ____________________________________ From report at bugs.python.org Fri May 23 19:51:33 2008 From: report at bugs.python.org (Hartmut Goebel) Date: Fri, 23 May 2008 17:51:33 +0000 Subject: [issue2946] setuptools: bdist_wininst adds duplicate entry to dist_files In-Reply-To: <1211468458.47.0.0516095652943.issue2946@psf.upfronthosting.co.za> Message-ID: <1211565093.4.0.264247994906.issue2946@psf.upfronthosting.co.za> Hartmut Goebel added the comment: Yes. I've coincidently found the setptools bugtracker today and filed a bug-report there. Please Close. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 19:59:41 2008 From: report at bugs.python.org (Kathy Van Stone) Date: Fri, 23 May 2008 17:59:41 +0000 Subject: [issue2951] ElementTree parsing bus error (but only from mod_python) In-Reply-To: <1211565579.45.0.763330988931.issue2951@psf.upfronthosting.co.za> Message-ID: <1211565579.45.0.763330988931.issue2951@psf.upfronthosting.co.za> New submission from Kathy Van Stone : The follow code works fine when run directly. It crashes (with a bus error) if used as a mod_python handler. It doesn't crash if ElementTree is replaced with cElementTree. from xml.etree import ElementTree as eltree def handler(req): body = """ Service_offerings query at 2008-05-23 12:47:28.038233 """ response_elem = eltree.XML(body) return 0 I don't know if this a mod_python or ElementTree issue, but it looks more like an ElementTree problem. ---------- components: Library (Lib), Macintosh messages: 67259 nosy: kathyvs severity: normal status: open title: ElementTree parsing bus error (but only from mod_python) type: crash versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 20:53:33 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 18:53:33 +0000 Subject: [issue1798] Add ctypes calling convention that allows safe access of errno In-Reply-To: <48370324.6060705@ctypes.org> Message-ID: <4837129C.60002@v.loewis.de> Martin v. L?wis added the comment: > AFAIU, set_errno/get_errno should provide a ctypes-private copy of the real errno. > The copy is copied into the 'real' errno just before ffi_call (in Modules/_ctypes/callproc.c), > and the real errno is copied in to ctypes copy right after the call. If you clear errno, anyway, you can also drop the set_errno call, and zero-initialize errno before each call. The point of set_errno would be that you have the choice of *not* calling it, i.e. passing into the function the errno value that was there before you made the API call. If you fill something else into errno always, the application has no way of not modifying errno before the API call. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 20:54:09 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 18:54:09 +0000 Subject: [issue2946] setuptools: bdist_wininst adds duplicate entry to dist_files In-Reply-To: <1211468458.47.0.0516095652943.issue2946@psf.upfronthosting.co.za> Message-ID: <1211568849.63.0.565801271702.issue2946@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> invalid status: open -> closed versions: +3rd party -Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 21:09:31 2008 From: report at bugs.python.org (Ismail Donmez) Date: Fri, 23 May 2008 19:09:31 +0000 Subject: [issue2952] List comprehensions are leaking variables In-Reply-To: <1211569769.38.0.125136210909.issue2952@psf.upfronthosting.co.za> Message-ID: <1211569769.38.0.125136210909.issue2952@psf.upfronthosting.co.za> New submission from Ismail Donmez : Originally found at http://www.randombit.net/weblog/programming/variable_leak_in_list_compre hensions.html First example : [~]> python Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> x=1 >>> [x for x in [1,2,3]] [1, 2, 3] >>> x 3 whoops x changed. Another example from original post: $ python Python 2.4.4 (#1, Mar 7 2008, 14:54:19) [GCC 4.1.2 (Gentoo 4.1.2 p1.0.2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> x = { 1:2, 3:4 } >>> nothere Traceback (most recent call last): File "", line 1, in ? NameError: name 'nothere' is not defined >>> [nothere for nothere in x.keys()] [1, 3] >>> nothere 3 This bug doesn't seem to affect py3k but it does python 2.4/2.5. Either this should be fixed or documented as a caveat. ---------- components: Library (Lib) messages: 67261 nosy: cartman severity: normal status: open title: List comprehensions are leaking variables versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 21:09:45 2008 From: report at bugs.python.org (Ismail Donmez) Date: Fri, 23 May 2008 19:09:45 +0000 Subject: [issue2952] List comprehensions are leaking variables In-Reply-To: <1211569769.38.0.125136210909.issue2952@psf.upfronthosting.co.za> Message-ID: <1211569785.56.0.559171962185.issue2952@psf.upfronthosting.co.za> Changes by Ismail Donmez : ---------- components: +Interpreter Core -Library (Lib) type: -> behavior __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 21:21:34 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 19:21:34 +0000 Subject: [issue2952] List comprehensions are leaking variables In-Reply-To: <1211569769.38.0.125136210909.issue2952@psf.upfronthosting.co.za> Message-ID: <1211570493.6.0.542829576835.issue2952@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The behaviour is documented, e.g. in footnote 5.1 of http://docs.python.org/ref/lists.html It is fixed in Python 3. ---------- nosy: +loewis resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 21:23:01 2008 From: report at bugs.python.org (Ismail Donmez) Date: Fri, 23 May 2008 19:23:01 +0000 Subject: [issue2952] List comprehensions are leaking variables In-Reply-To: <1211569769.38.0.125136210909.issue2952@psf.upfronthosting.co.za> Message-ID: <1211570580.95.0.525819210844.issue2952@psf.upfronthosting.co.za> Ismail Donmez added the comment: But it only mentions python 2.3, time to update the footnote. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 21:33:51 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 19:33:51 +0000 Subject: [issue2952] List comprehensions are leaking variables In-Reply-To: <1211569769.38.0.125136210909.issue2952@psf.upfronthosting.co.za> Message-ID: <1211571231.64.0.247534726714.issue2952@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is now fixed in r63569 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 21:34:29 2008 From: report at bugs.python.org (Thomas Heller) Date: Fri, 23 May 2008 19:34:29 +0000 Subject: [issue1798] Add ctypes calling convention that allows safe access of errno In-Reply-To: <4837129C.60002@v.loewis.de> Message-ID: <48371C37.4070701@ctypes.org> Thomas Heller added the comment: >> AFAIU, set_errno/get_errno should provide a ctypes-private copy of the real errno. >> The copy is copied into the 'real' errno just before ffi_call (in Modules/_ctypes/callproc.c), >> and the real errno is copied in to ctypes copy right after the call. > > If you clear errno, anyway, you can also drop the set_errno call, and My code sample did not intend to clear errno, it was intended to set errno to the last value that the ctypes-copy had before the call. > zero-initialize errno before each call. The point of set_errno would > be that you have the choice of *not* calling it, i.e. passing into > the function the errno value that was there before you made the API > call. If you fill something else into errno always, the application has > no way of not modifying errno before the API call. To make my point clear (in case is isn't already): In the code sample that Armin posted, it is impossible to guarantee that no stdlib function is called between the readdir() and the get_errno() call: dirent = linux_c_lib.readdir(byref(dir)) if not dirent: if ctypes.get_errno() == 0: Consider the garbage collector free some objects that release resources they have, in other words call functions different from free(3). Similarly for calling set_errno() or not calling it; other stdlib function calls in the meantime may have changed errno and that might not be what the Python programmer expects. Anyway, how can we proceed? Do you have a suggestion? Should set_errno() set a flag that is examined and consumed before call_function_pointer() is called? __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 21:54:15 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 23 May 2008 19:54:15 +0000 Subject: [issue1798] Add ctypes calling convention that allows safe access of errno In-Reply-To: <48371C37.4070701@ctypes.org> Message-ID: <483720D1.30508@v.loewis.de> Martin v. L?wis added the comment: > My code sample did not intend to clear errno, it was intended to set errno > to the last value that the ctypes-copy had before the call. It's the same thing (to me): you change errno. > To make my point clear (in case is isn't already): In the code > sample that Armin posted, it is impossible to guarantee that no > stdlib function is called between the readdir() and the get_errno() call: > > dirent = linux_c_lib.readdir(byref(dir)) > if not dirent: > if ctypes.get_errno() == 0: > > Consider the garbage collector free some objects that release resources > they have, in other words call functions different from free(3). However, even the TLS copy of errno may change because of this, if the finalizer of some object invokes ctypes, right? > Anyway, how can we proceed? Do you have a suggestion? I'll leave it up to you to decide - you'll take both blame and praise, anyway, so I don't want to talk you into coming up with an API that you don't like. __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 22:26:05 2008 From: report at bugs.python.org (Maciek Fijalkowski) Date: Fri, 23 May 2008 20:26:05 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> New submission from Maciek Fijalkowski : _zip_directory_cache has no single test nor piece of documentation. The only place where it's mentioned is a call to method .clear() on it in tests. Besides, it can be whatever. Despite _ prefix, which I would consider to be private, distutils crash obscurely if it's not there or does not contain sequences as keys. ---------- assignee: georg.brandl components: Distutils, Documentation, Extension Modules messages: 67267 nosy: fijal, georg.brandl severity: normal status: open title: _zip_directory_cache untested and undocumented type: behavior versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 22:34:14 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 23 May 2008 20:34:14 +0000 Subject: [issue2222] Memory leak in os.rename? In-Reply-To: <1204549533.94.0.102574866059.issue2222@psf.upfronthosting.co.za> Message-ID: <1211574854.04.0.191325396507.issue2222@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- components: +Windows -Extension Modules __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 22:53:53 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 23 May 2008 20:53:53 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1211546974.19.0.250860192914.issue2775@psf.upfronthosting.co.za> Message-ID: <1afaf6160805231353w4442d73eu5913a8489531c8d0@mail.gmail.com> Benjamin Peterson added the comment: On Fri, May 23, 2008 at 7:49 AM, Quentin Gallet-Gilles wrote: > > Quentin Gallet-Gilles added the comment: > > While working on the commands module removal, I found two missed import > renaming in the py3k branch that made regrtest skip some tests. The > attached patch corrects them. The test_tcl one was fixed in 2.6 (when we were renaming) and will be merged into Py3k. I will catch the test_1413192.py. Thanks! > > Added file: http://bugs.python.org/file10416/import_renames_py3k.patch > > __________________________________ > Tracker > > __________________________________ > __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 23:30:08 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 23 May 2008 21:30:08 +0000 Subject: [issue2663] shutil.copytree glob-style filtering [patch] In-Reply-To: <1208726903.81.0.936252523277.issue2663@psf.upfronthosting.co.za> Message-ID: <1211578208.17.0.613174873751.issue2663@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Thanks Georg, I have changed the patch accordingly. There's one issue left: the name of the parameter (ignore) I have renamed it like this on Alexander suggestion, for consistency with filecmp.dircmp which uses ignore. By the way, I was wondering: do we need to used reStructuredText as well in function doctstrings ? Added file: http://bugs.python.org/file10417/copytree.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 23:30:40 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 23 May 2008 21:30:40 +0000 Subject: [issue2663] shutil.copytree glob-style filtering [patch] In-Reply-To: <1208726903.81.0.936252523277.issue2663@psf.upfronthosting.co.za> Message-ID: <1211578240.98.0.912022240876.issue2663@psf.upfronthosting.co.za> Changes by Tarek Ziad? : Removed file: http://bugs.python.org/file10392/copytree2.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 23:33:34 2008 From: report at bugs.python.org (Steve Baker) Date: Fri, 23 May 2008 21:33: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: <1211578414.47.0.427052419652.issue1974@psf.upfronthosting.co.za> Steve Baker added the comment: I'm also hitting this problem. I'm including a demo script. The minimal condition for me to reproduce this bug is that the subject contain at least 76 characters of any kind, followed by a space, followed by at least 3 characters of any kind. ---------- nosy: +splorgdar Added file: http://bugs.python.org/file10418/test __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 23:49:02 2008 From: report at bugs.python.org (Steve Baker) Date: Fri, 23 May 2008 21:49: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: <1211579342.16.0.998642147374.issue1974@psf.upfronthosting.co.za> Changes by Steve Baker : Added file: http://bugs.python.org/file10419/test.py __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 23:49:11 2008 From: report at bugs.python.org (Steve Baker) Date: Fri, 23 May 2008 21:49:11 +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: <1211579351.98.0.218995146955.issue1974@psf.upfronthosting.co.za> Changes by Steve Baker : Removed file: http://bugs.python.org/file10418/test __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 23:53:09 2008 From: report at bugs.python.org (Leandro Lucarella) Date: Fri, 23 May 2008 21:53:09 +0000 Subject: [issue2954] [PATCH] Make bisect module functions accept an optional comparison callable In-Reply-To: <1211579587.7.0.195890795343.issue2954@psf.upfronthosting.co.za> Message-ID: <1211579587.7.0.195890795343.issue2954@psf.upfronthosting.co.za> New submission from Leandro Lucarella : bisect module functions should accept a comparison callable to customize the way items are compared to do the binary search. Attached is a patch to the Python implementation of bisect module. ---------- components: Library (Lib) files: bisect.py.cmp.patch keywords: patch messages: 67271 nosy: llucax severity: normal status: open title: [PATCH] Make bisect module functions accept an optional comparison callable type: feature request versions: Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5, Python 2.6 Added file: http://bugs.python.org/file10420/bisect.py.cmp.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Fri May 23 23:57:59 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 23 May 2008 21:57:59 +0000 Subject: [issue2954] [PATCH] Make bisect module functions accept an optional comparison callable In-Reply-To: <1211579587.7.0.195890795343.issue2954@psf.upfronthosting.co.za> Message-ID: <1211579879.65.0.725672015199.issue2954@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger versions: +Python 3.0 -Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 00:47:01 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 23 May 2008 22:47:01 +0000 Subject: [issue2538] memoryview of bytes is not readonly In-Reply-To: <1207182382.72.0.866250850169.issue2538@psf.upfronthosting.co.za> Message-ID: <1211582821.57.0.704877844537.issue2538@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: -> critical type: -> behavior __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 00:51:54 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 23 May 2008 22:51:54 +0000 Subject: [issue2538] memoryview of bytes is not readonly In-Reply-To: <1207182382.72.0.866250850169.issue2538@psf.upfronthosting.co.za> Message-ID: <1211583114.04.0.724671498522.issue2538@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 00:55:47 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 23 May 2008 22:55:47 +0000 Subject: [issue2619] Document PEP 3118 In-Reply-To: <1207946818.06.0.901333881861.issue2619@psf.upfronthosting.co.za> Message-ID: <1211583346.66.0.12499544925.issue2619@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Upon further inspection, it seems none of the new buffer protocol is documented. (The old functions are still present in the 3.0 docs.) ---------- title: Document memoryview -> Document PEP 3118 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 01:19:37 2008 From: report at bugs.python.org (Leandro Lucarella) Date: Fri, 23 May 2008 23:19:37 +0000 Subject: [issue2954] [PATCH] Make bisect module functions accept an optional comparison callable In-Reply-To: <1211579587.7.0.195890795343.issue2954@psf.upfronthosting.co.za> Message-ID: <1211584777.23.0.270622505856.issue2954@psf.upfronthosting.co.za> Leandro Lucarella added the comment: A key argument (like list.sort) can be useful too (I can make a patch if you like). __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 01:26:46 2008 From: report at bugs.python.org (Irmen de Jong) Date: Fri, 23 May 2008 23:26:46 +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: <1211585206.7.0.268636037522.issue2871@psf.upfronthosting.co.za> Irmen de Jong added the comment: Adding it in the run method would only work for threads that I create in my own code. The thing is: I need to be able to get the tread identification from threads created by third party code. So I cannot rely on that code putting it in the thread object themselves like that. Hence my wish of letting the standard library module take care of it. And using the id() of the current thread object has a rather obscure problem. I was using it as a matter of fact, until people reported problems in my code when used with certain atexit handling. (Sometimes the wrong id() is returned). Because of that I wanted to switch to the more low-level thread.get_ident() identification of different threads, because that is supposed to return a stable os-level thread identification, right? __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 02:19:30 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 24 May 2008 00:19:30 +0000 Subject: [issue2926] Revert SocketServer rename in 2.6 In-Reply-To: <1211258129.96.0.233519101848.issue2926@psf.upfronthosting.co.za> Message-ID: <1211588369.76.0.234486116445.issue2926@psf.upfronthosting.co.za> Brett Cannon added the comment: I am attaching a patch that (should) revert all references to socketserver back to SocketServer. Because I am on OS X I can't do the actual ``svn rename`` on Lib/socketserver.py to Lib/SocketServer.py so someone else (PLEASE!) will need to do the ``svn rename`` apply the patch, run the test suite, and then commit. ---------- keywords: +patch Added file: http://bugs.python.org/file10421/revert_socketserver.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 02:26:13 2008 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 24 May 2008 00:26:13 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211588773.48.0.0611931204896.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: The way to override _deref/_unwrap is to make _target a property on a ProxyMixin subclass (which reminds me, I want to put in an explicit test case to make sure that works as intended - I'll use the weakref-proxy-in-Python as the example, so I'll also need to fix the docs to indicate that such a thing doesn't actually require rewriting the whole class). And there are a lot more use cases than just the ones you listed, primarily in the area of interface adaptation (i.e. the programmer just wants to fiddle with the visible API of the object a bit, rather than doing anything clever with the way the proxy's target is referenced). The reason I'm wary of attempting to provide direct support for the distributed communications use case, is that distributed computing needs to deal with all sorts of issues in relation to serialisation and transport of arguments and return values, that a local proxy of any kind simply doesn't have to deal with (since it can just pass direct references around). Note that merely diverting everything through __getattribute__ isn't even close to enough, due to the argument and return value transport problem - the RPC mechanism needs to understand the methods that are being invoked as well. So I'm quite happy leaving all those issues to tools that are actually designed to handle them (CORBA, XML-RPC, etc). ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sat May 24 02:38:23 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 24 May 2008 00:38:23 +0000 Subject: [issue2925] Revert Queue rename in 2.6 In-Reply-To: <1211258049.35.0.372468669832.issue2925@psf.upfronthosting.co.za> Message-ID: <1211589503.25.0.950450706892.issue2925@psf.upfronthosting.co.za> Brett Cannon added the comment: r63248 contains various import and docs changes done in the name of configparser. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 02:38:29 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 24 May 2008 00:38:29 +0000 Subject: [issue2923] Revert ConfigParser rename in 2.6 In-Reply-To: <1211257882.61.0.790616237846.issue2923@psf.upfronthosting.co.za> Message-ID: <1211589509.22.0.253654115589.issue2923@psf.upfronthosting.co.za> Brett Cannon added the comment: r63248 contains various import and doc changes in the name of configparser. r63242 contains the rename, but ``svn rename`` should be used in order to not lose the history on the file. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 02:44:34 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 24 May 2008 00:44:34 +0000 Subject: [issue2923] Revert ConfigParser rename in 2.6 In-Reply-To: <1211257882.61.0.790616237846.issue2923@psf.upfronthosting.co.za> Message-ID: <1211589872.58.0.0310969865325.issue2923@psf.upfronthosting.co.za> Brett Cannon added the comment: r63247 has some doc changes. r63249 added the old name stub. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 04:05:27 2008 From: report at bugs.python.org (Manuel Kaufmann) Date: Sat, 24 May 2008 02:05:27 +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: <1211594727.15.0.324996337898.issue2888@psf.upfronthosting.co.za> Manuel Kaufmann added the comment: If the correct way is the first option, we can use this patch to solve that error. I attached diff file. I use Lib/test/test_pprint.py to ensure that's works. ---------- keywords: +patch nosy: +humitos Added file: http://bugs.python.org/file10422/pprint.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 05:08:22 2008 From: report at bugs.python.org (Daniel Crowley-Wilson) Date: Sat, 24 May 2008 03:08:22 +0000 Subject: [issue2955] Python 2.5 Documentation error in Tutorial section 8.3 In-Reply-To: <1211598495.79.0.572068175443.issue2955@psf.upfronthosting.co.za> Message-ID: <1211598495.79.0.572068175443.issue2955@psf.upfronthosting.co.za> New submission from Daniel Crowley-Wilson : The code sample in Tutorial section 8.3 (Handling Exceptions) doesn't match the description. Removing the "break" line from the code sample would make the sample perform according to the description. Found in the windows doc\python25.chm file. Original text is below: *** It is possible to write programs that handle selected exceptions. Look at the following example, which asks the user for input until a valid integer has been entered, but allows the user to interrupt the program (using Control-C or whatever the operating system supports); note that a user-generated interruption is signalled by raising the KeyboardInterrupt exception. >>> while True: ... try: ... x = int(raw_input("Please enter a number: ")) ... break ... except ValueError: ... print "Oops! That was no valid number. Try again..." ... ---------- assignee: georg.brandl components: Documentation messages: 67281 nosy: dcw303, georg.brandl severity: normal status: open title: Python 2.5 Documentation error in Tutorial section 8.3 versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 05:59:55 2008 From: report at bugs.python.org (Buck Golemon) Date: Sat, 24 May 2008 03:59:55 +0000 Subject: [issue2950] silly readline module problem In-Reply-To: <1211549968.03.0.808725881847.issue2950@psf.upfronthosting.co.za> Message-ID: <1211601594.63.0.926719339449.issue2950@psf.upfronthosting.co.za> Buck Golemon added the comment: I'm not sure what your problem is, but comp.lang.python might be a better place to ask. It's not clear that this is a bug yet. http://groups.google.com/group/comp.lang.python/topics ---------- nosy: +bgolemon __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 07:29:16 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 24 May 2008 05:29:16 +0000 Subject: [issue1858] Make .pypirc handle multiple servers In-Reply-To: <1200573233.93.0.822400680572.issue1858@psf.upfronthosting.co.za> Message-ID: <1211606956.12.0.428520833124.issue1858@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This patch has broken test_distutils, which now reports test_distutils test test_distutils produced unexpected output: ********************************************************************** Using PyPI login from /home/martin/work/py2.6/Lib/distutils/tests/.pypirc Using PyPI login from /home/martin/work/py2.6/Lib/distutils/tests/.pypirc Using PyPI login from /home/martin/work/py2.6/Lib/distutils/tests/.pypirc Using PyPI login from /home/martin/work/py2.6/Lib/distutils/tests/.pypirc Using PyPI login from /home/martin/work/py2.6/Lib/distutils/tests/.pypirc ********************************************************************** ---------- nosy: +loewis __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 09:01:29 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 24 May 2008 07:01:29 +0000 Subject: [issue1858] Make .pypirc handle multiple servers In-Reply-To: <1200573233.93.0.822400680572.issue1858@psf.upfronthosting.co.za> Message-ID: <1211612488.1.0.788112139911.issue1858@psf.upfronthosting.co.za> Tarek Ziad? added the comment: This is because the code uses a print statement when opening the .pypirc file. This was already the case before this patch, but the code was not covered by tests. (see in previous revision) The test is not broken, it just ouputs to stdin. I would suggest closing this issue and opening a new one entitled: "distutils should used the logging module to produce output" maybe ? __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 09:58:56 2008 From: report at bugs.python.org (Armin Rigo) Date: Sat, 24 May 2008 07:58:56 +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: <1211615936.19.0.658697602591.issue1798@psf.upfronthosting.co.za> Armin Rigo added the comment: > However, even the TLS copy of errno may change because of this, > if the finalizer of some object invokes ctypes, right? Yes, it's annoying, but at least the Python programmer has a way to fix this problem: he can save and restore the TLS copy of errno around the call to ctypes done in the finalizer, using get_errno()/set_errno(). This matches what a C programmer would have to do if he wanted to write, say, a debugging function that can be called from anywhere including between an OS call and the following check for errno. (Another note: the C-level errno and the TLS copy should also be synchronized when the C code invokes a Python callback.) In PyPy, when creating and using our own internal FFI, we started by having a pair of functions that could directly read or change the C-level errno. Then we ran into various troubles (e.g. just stepping through the Python code in a debugger messes things up because of the debugger's own input/output) and finally reached the design I propose here. (Admittedly PyPy's internal FFI is a bit more low-level than ctypes, so maybe it's more appropriate for ctypes to use a higher-level approach that a return value checker.) (A related issue that we may or may not care about: it's more than likely that various people have already come up with various workarounds to handle errno, and these workarounds will probably stop working after ctypes is changed...) __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 11:02:30 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 24 May 2008 09:02:30 +0000 Subject: [issue1858] Make .pypirc handle multiple servers In-Reply-To: <1211612488.1.0.788112139911.issue1858@psf.upfronthosting.co.za> Message-ID: <4837D994.3030903@v.loewis.de> Martin v. L?wis added the comment: > This is because the code uses a print statement when opening the .pypirc > file. This was already the case before this patch, but the code was not > covered by tests. (see in previous revision) > > The test is not broken, it just ouputs to stdin. > > I would suggest closing this issue and opening a new one entitled: > "distutils should used the logging module to produce output" maybe ? The test *is* (or was) broken - regrtest reported it as a failure. It effectively, actually, caused a failure of the buildbot slaves. In any case, I have now replaced the print with self.announce, in r63575. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 11:08:31 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 24 May 2008 09:08:31 +0000 Subject: [issue1858] Make .pypirc handle multiple servers In-Reply-To: <1200573233.93.0.822400680572.issue1858@psf.upfronthosting.co.za> Message-ID: <1211620111.35.0.0918923987487.issue1858@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Right, Thanks! __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 11:51:48 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 24 May 2008 09:51:48 +0000 Subject: [issue2889] curses for windows (alternative patch) In-Reply-To: <1210919907.42.0.842256015219.issue2889@psf.upfronthosting.co.za> Message-ID: <1211622701.1.0.930541641631.issue2889@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch, in its current form, is incomplete. Can you please provide: a) a VS 2008 project file, which builds both the curses module and the pdcurses library, fetching the sources for that from ../../pdcurses (or some such); the project file should be structured similar to all the other project files in PCbuild b) a patch to PCbuild/readme.txt, with instructions on how to build the extension ---------- nosy: +loewis __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 12:28:47 2008 From: report at bugs.python.org (Haoyu Bai) Date: Sat, 24 May 2008 10:28:47 +0000 Subject: [issue2956] 2to3 should have a way to disable some fixers In-Reply-To: <1211624926.75.0.230496362406.issue2956@psf.upfronthosting.co.za> Message-ID: <1211624926.75.0.230496362406.issue2956@psf.upfronthosting.co.za> New submission from Haoyu Bai : Sometime we need to enable all fixers but one or two, eg. the 'import' fixer. So it would be fine if there's a way to do that. ---------- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) messages: 67289 nosy: bhy, collinwinter severity: normal status: open title: 2to3 should have a way to disable some fixers type: feature request versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 12:50:11 2008 From: report at bugs.python.org (Haoyu Bai) Date: Sat, 24 May 2008 10:50:11 +0000 Subject: [issue2957] recursion limit exceeded when importing .pyc module In-Reply-To: <1211626208.53.0.435870200974.issue2957@psf.upfronthosting.co.za> Message-ID: <1211626208.53.0.435870200974.issue2957@psf.upfronthosting.co.za> New submission from Haoyu Bai : To reproduce the bug, save the uploaded huge.py, then import the module twice: $ python3 -c 'import huge' $ python3 -c 'import huge' Traceback (most recent call last): File "", line 1, in ValueError: recursion limit exceeded But there's no such problem in Python 2.5.2. ---------- components: Interpreter Core files: huge.py messages: 67290 nosy: bhy severity: normal status: open title: recursion limit exceeded when importing .pyc module type: behavior versions: Python 3.0 Added file: http://bugs.python.org/file10423/huge.py __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 13:04:30 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 May 2008 11:04:30 +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: <1211627069.48.0.191904086086.issue2507@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is a complementary patch that should fix the remaining cases (funnily doctest was relying on the old behaviour). Unfortunately #2833 still remains, and would probably need some discussion on the ML for proper resolution. Added file: http://bugs.python.org/file10424/better_exc_cleanup.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 13:32:38 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 24 May 2008 11:32:38 +0000 Subject: [issue2956] 2to3 should have a way to disable some fixers In-Reply-To: <1211624926.75.0.230496362406.issue2956@psf.upfronthosting.co.za> Message-ID: <1211628757.95.0.957137849645.issue2956@psf.upfronthosting.co.za> Guilherme Polo added the comment: Once I wanted this too. I'm attaching two patches but I prefer the former which allows the skipped fixer(s) to be logged. ---------- keywords: +patch nosy: +gpolo Added file: http://bugs.python.org/file10425/fixer_skip.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 13:32:51 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 24 May 2008 11:32:51 +0000 Subject: [issue2956] 2to3 should have a way to disable some fixers In-Reply-To: <1211624926.75.0.230496362406.issue2956@psf.upfronthosting.co.za> Message-ID: <1211628771.83.0.83555935068.issue2956@psf.upfronthosting.co.za> Changes by Guilherme Polo : Added file: http://bugs.python.org/file10426/fixer_skip2.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 14:27:32 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 24 May 2008 12:27:32 +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: <1211632052.72.0.878931134674.issue2507@psf.upfronthosting.co.za> Benjamin Peterson added the comment: For time being, should r62847 be reverted? ---------- nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 14:51:15 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 24 May 2008 12:51:15 +0000 Subject: [issue2955] Python 2.5 Documentation error in Tutorial section 8.3 In-Reply-To: <1211598495.79.0.572068175443.issue2955@psf.upfronthosting.co.za> Message-ID: <1211633474.93.0.814359835385.issue2955@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: What makes you think that the code does not match the description? ---------- nosy: +amaury.forgeotdarc __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 14:53:13 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 May 2008 12:53:13 +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: <1211633593.83.0.497656542853.issue2507@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think so. As Amaury pointed in #2833, the original re-raising behaviour which got changed by fixing the present bug was rather broken in its own way. Anyway, I think the question better be asked on the ML because any solution for the re-raising behaviour will require some significant trickery in the compiler and the eval loop. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 14:55:33 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 24 May 2008 12:55:33 +0000 Subject: [issue2806] Py30a5: Tk Menu Alt-f behaves differently Linux vs Windows In-Reply-To: <1210369916.39.0.944355148013.issue2806@psf.upfronthosting.co.za> Message-ID: <1211633732.68.0.278491283667.issue2806@psf.upfronthosting.co.za> Guilherme Polo added the comment: I just got an information here.. The new way is the recommended way since Tk 8.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 15:00:16 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 24 May 2008 13:00:16 +0000 Subject: [issue2955] Python 2.5 Documentation error in Tutorial section 8.3 In-Reply-To: <1211598495.79.0.572068175443.issue2955@psf.upfronthosting.co.za> Message-ID: <1211634016.06.0.184802745964.issue2955@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing as "works for me". ---------- resolution: -> works for me status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 15:03:54 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 24 May 2008 13:03:54 +0000 Subject: [issue2950] silly readline module problem In-Reply-To: <1211549968.03.0.808725881847.issue2950@psf.upfronthosting.co.za> Message-ID: <1211634233.94.0.160251893775.issue2950@psf.upfronthosting.co.za> Guilherme Polo added the comment: You need to install the development package of readline in order to have the readline module compiled. And this is not a bug. ---------- nosy: +gpolo resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 14:52:06 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 24 May 2008 12:52:06 +0000 Subject: [issue2806] Py30a5: Tk Menu Alt-f behaves differently Linux vs Windows In-Reply-To: <1210369916.39.0.944355148013.issue2806@psf.upfronthosting.co.za> Message-ID: <1211633526.88.0.443582373083.issue2806@psf.upfronthosting.co.za> Guilherme Polo added the comment: Using a frame and menubutton for creating a menubar has been deprecated for a long time. I tried finding when exactly it got "marked as deprecated", but I found just this page http://wiki.tcl.tk/4055 which says about a decade ago. ---------- nosy: +gpolo status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 15:55:45 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 24 May 2008 13:55:45 +0000 Subject: [issue2958] update Lib/test/README In-Reply-To: <1211637344.19.0.700206389482.issue2958@psf.upfronthosting.co.za> Message-ID: <1211637344.19.0.700206389482.issue2958@psf.upfronthosting.co.za> New submission from Benjamin Peterson : A good bug day task: Lib/test/README is a bit dated. It still talks about old-style Python tests which have been almost completely removed in 2.6 (and none more should be written.) The assert* methods of unittest should also be stressed instead of test_support.verify etc. ---------- components: Tests keywords: easy messages: 67300 nosy: benjamin.peterson priority: low severity: normal status: open title: update Lib/test/README type: feature request versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 16:00:17 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 May 2008 14:00:17 +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: <1211637617.79.0.354677019197.issue2507@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file10424/better_exc_cleanup.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 16:01:50 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 May 2008 14:01:50 +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: <1211637708.99.0.121499223457.issue2507@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patch removed, there are still some unsolved cases :-) __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 16:13:57 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 May 2008 14:13:57 +0000 Subject: [issue2833] __exit__ silences the active exception In-Reply-To: <1210576013.94.0.462684443177.issue2833@psf.upfronthosting.co.za> Message-ID: <1211638434.34.0.538891904198.issue2833@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Just found another funny example. This one fails also before r62847. def except_yield(): try: raise Exception("foo") except: yield 1 raise list(except_yield()) In Py3k (with or without r62487), we get "RuntimeError: No active exception to reraise". In Python 2.5, we get "TypeError: exceptions must be classes, instances, or strings (deprecated), not NoneType". __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 17:13:10 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 24 May 2008 15:13:10 +0000 Subject: [issue2944] asyncore doesn't handle connection refused correctly In-Reply-To: <1211462641.02.0.497686644895.issue2944@psf.upfronthosting.co.za> Message-ID: <1211641990.71.0.448657556006.issue2944@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola, josiah.carlson, josiahcarlson __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 17:14:04 2008 From: report at bugs.python.org (Facundo Batista) Date: Sat, 24 May 2008 15:14:04 +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: <1211642044.23.0.565221817912.issue2888@psf.upfronthosting.co.za> Facundo Batista added the comment: It's not a 2.6 bug, as it behaves exactly as the documentation states. In Py3 it *is* different the result than the documentation. However, it's not clear to me if this behaviour is changed deliberately or by mistake (personally, I prefer this new way of showing it, so the documentation should be fixed). What do you think? ---------- nosy: +facundobatista versions: -Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 18:32:08 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 24 May 2008 16:32:08 +0000 Subject: [issue2904] Cross-referencing to a method using an alternate title don't work with add_function_parentheses=True In-Reply-To: <1211086991.24.0.536909381187.issue2904@psf.upfronthosting.co.za> Message-ID: <1211646726.28.0.166333397181.issue2904@psf.upfronthosting.co.za> Georg Brandl added the comment: This should now be fixed in r63580. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 18:32:06 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 24 May 2008 16:32:06 +0000 Subject: [issue2852] sidebar directive fails In-Reply-To: <1210781431.12.0.00746405494641.issue2852@psf.upfronthosting.co.za> Message-ID: <1211646723.98.0.205033558987.issue2852@psf.upfronthosting.co.za> Georg Brandl added the comment: This should now be fixed in SVN. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 20:26:12 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 24 May 2008 18:26:12 +0000 Subject: [issue2944] asyncore doesn't handle connection refused correctly In-Reply-To: <1211462641.02.0.497686644895.issue2944@psf.upfronthosting.co.za> Message-ID: <1211653572.13.0.000355699959106.issue2944@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: By trying your script on Linux and Windows I notice different behaviors. On Windows handle_expt is always called. On Linux, no matter if using select or poll, handle_accept is called, then an exception is thrown at the time the data is going to be sent: Traceback (most recent call last): File "index.py", line 34, in test() File "index.py", line 31, in test asyncore.loop(use_poll=1) File "/usr/lib/python2.5/asyncore.py", line 205, in loop poll_fun(timeout, map) File "/usr/lib/python2.5/asyncore.py", line 190, in poll2 readwrite(obj, flags) File "/usr/lib/python2.5/asyncore.py", line 101, in readwrite obj.handle_error() File "/usr/lib/python2.5/asyncore.py", line 93, in readwrite obj.handle_read_event() File "/usr/lib/python2.5/asyncore.py", line 400, in handle_read_event self.handle_connect() File "index.py", line 17, in handle_connect self.send("hello world") File "/usr/lib/python2.5/asyncore.py", line 481, in send self.initiate_send() File "/usr/lib/python2.5/asyncore.py", line 468, in initiate_send num_sent = dispatcher.send(self, self.out_buffer[:512]) File "/usr/lib/python2.5/asyncore.py", line 345, in send result = self.socket.send(data) socket.error: (111, 'Connection refused') In my opinion both behaviors are wrong since neither handle_expt nor handle_connect should be called in case of a "connection refused" event. Especially handle_connect should not be called at all since no connection takes place. The correct behavior here must be identifying when such event occurs, raise the proper exception (ECONNREFUSED) and let it propagate until handle_error which will take care of it. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 20:31:41 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 24 May 2008 18:31:41 +0000 Subject: [issue2926] Revert SocketServer rename in 2.6 In-Reply-To: <1211258129.96.0.233519101848.issue2926@psf.upfronthosting.co.za> Message-ID: <1211653901.28.0.285579423197.issue2926@psf.upfronthosting.co.za> Georg Brandl added the comment: Okay, moved the module and applied the patch in r63586, r63587 and r63589. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 21:02:51 2008 From: report at bugs.python.org (Alexander Shigin) Date: Sat, 24 May 2008 19:02:51 +0000 Subject: [issue2944] asyncore doesn't handle connection refused correctly In-Reply-To: <1211462641.02.0.497686644895.issue2944@psf.upfronthosting.co.za> Message-ID: <1211655771.68.0.307594004755.issue2944@psf.upfronthosting.co.za> Alexander Shigin added the comment: Oh, fine. May be handle_error should have been called, but anyway not handle_connect. But in my mind, handle_expt is better. __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 23:39:11 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Sat, 24 May 2008 21:39:11 +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: <1211665151.78.0.671787485023.issue2636@psf.upfronthosting.co.za> Jeffrey C. Jacobs added the comment: I am finally making progress again, after a month of changing my patches from my local svn repository to bazaar hosted on launchpad.net, as stated in my last update. I also have more or less finished the probably easiest item, #5, so I have a full patch for that available now. First, though, I want to update my "No matter what" patch, which is to say these are the changes I want to make if any changes are made to the Regexp code. Added file: http://bugs.python.org/file10427/issue2636.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 23:39:57 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Sat, 24 May 2008 21:39:57 +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: <1211665197.9.0.777166944224.issue2636@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Added file: http://bugs.python.org/file10428/issue2636-05-only.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 23:40:24 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Sat, 24 May 2008 21:40:24 +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: <1211665224.18.0.783337740356.issue2636@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Added file: http://bugs.python.org/file10429/issue2636-05.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sat May 24 23:40:35 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Sat, 24 May 2008 21:40:35 +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: <1211665235.1.0.634798175236.issue2636@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Removed file: http://bugs.python.org/file10056/issue2636-05.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 00:21:55 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 May 2008 22:21:55 +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: <1211667715.16.0.282806892865.issue2871@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, it's true that get_ident() will always give you a reliable number while currentThread() can play dirty games on you at shutdown. The thing is the Thread object is dereferenced before the OS thread actually terminates, so it may be that a Python callback is called by some C code in those last moments and gets the wrong answer from currentThread() (because currentThread() returns a new dummy thread when it can't find a Thread object corresponding to the get_ident() value). So finally your request sounds quite reasonable :-) __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 00:35:31 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 May 2008 22:35:31 +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: <1211668531.28.0.383004243714.issue2507@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a hopefully complete patch using the same approach as before. However I'm now convinced that another approach would be better in order to solve both this bug and the various re-raising issues. It would involve replacing most of the set_exc_info() / reset_exc_info() mechanism in ceval.c with something different, probably based on saving/restoring exception state values onto/from the frame stack. Problem is, I'm not sure I'll have time for it very soon. Added file: http://bugs.python.org/file10430/better_exc_cleanup.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 00:47:55 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 24 May 2008 22:47:55 +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: <1211669275.55.0.0529032599907.issue2871@psf.upfronthosting.co.za> Gregory P. Smith added the comment: This seems like a useful addition and is easy enough. Patch with tests and documentation attached. Unless I hear objections I will commit it to trunk later this week. Patch available for review here: http://codereview.appspot.com/1301 ---------- assignee: -> gregory.p.smith keywords: +patch nosy: +gregory.p.smith priority: -> normal __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 01:02:45 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 24 May 2008 23:02:45 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211670165.61.0.37774873181.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: -Revert SocketServer rename in 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 01:03:26 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 24 May 2008 23:03:26 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211670206.27.0.615766232842.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : Removed file: http://bugs.python.org/file10267/socketserver_rename.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 01:26:16 2008 From: report at bugs.python.org (Michael Magin) Date: Sat, 24 May 2008 23:26:16 +0000 Subject: [issue2959] calling GzipFile close() more than once causes exception In-Reply-To: <1211671572.76.0.880996454775.issue2959@psf.upfronthosting.co.za> Message-ID: <1211671572.76.0.880996454775.issue2959@psf.upfronthosting.co.za> New submission from Michael Magin : Built-in file objects allow repeated calls to .close(), even the documentation states, "Calling close() more than once is allowed." (http://docs.python.org/lib/bltin-file-objects.html) GzipFile does not obey this aspect of the file interface: >>> import gzip >>> f = gzip.GzipFile('testfile1.gz', 'ab') >>> f.close() >>> f.close() Traceback (most recent call last): File "", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4//lib/python2.4/gzip.py", line 315, in close self.fileobj.write(self.compress.flush()) AttributeError: 'NoneType' object has no attribute 'write' The gzip documentation does not document this (mis-)behavior. (Trivial) patch against 2.4.3 gzip.py attached. ---------- components: Library (Lib) files: gzip.py.patch keywords: patch messages: 67313 nosy: mmagin severity: normal status: open title: calling GzipFile close() more than once causes exception versions: Python 2.4, Python 2.5 Added file: http://bugs.python.org/file10431/gzip.py.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 01:40:31 2008 From: report at bugs.python.org (Irmen de Jong) Date: Sat, 24 May 2008 23:40:31 +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: <1211672431.3.0.05683979234.issue2871@psf.upfronthosting.co.za> Irmen de Jong added the comment: Thanks Gregory, for taking the time to make a patch. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 03:10:16 2008 From: report at bugs.python.org (Brett Cannon) Date: Sun, 25 May 2008 01:10:16 +0000 Subject: [issue2925] Revert Queue rename in 2.6 In-Reply-To: <1211258049.35.0.372468669832.issue2925@psf.upfronthosting.co.za> Message-ID: <1211677816.93.0.970052712906.issue2925@psf.upfronthosting.co.za> Changes by Brett Cannon : __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 03:13:52 2008 From: report at bugs.python.org (Brett Cannon) Date: Sun, 25 May 2008 01:13:52 +0000 Subject: [issue2925] Revert Queue rename in 2.6 In-Reply-To: <1211258049.35.0.372468669832.issue2925@psf.upfronthosting.co.za> Message-ID: <1211678031.84.0.428694021521.issue2925@psf.upfronthosting.co.za> Brett Cannon added the comment: r63104 moved the stud module from Lib to Lib/lib-old. r63080 changed some docs and added a test for the rename. r63077 changed imports. __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 03:36:21 2008 From: report at bugs.python.org (Brett Cannon) Date: Sun, 25 May 2008 01:36:21 +0000 Subject: [issue2925] Revert Queue rename in 2.6 In-Reply-To: <1211258049.35.0.372468669832.issue2925@psf.upfronthosting.co.za> Message-ID: <1211679381.12.0.811326156835.issue2925@psf.upfronthosting.co.za> Brett Cannon added the comment: After performing a ``svn rename`` on Lib/queue.py to Lib/Queue.py the attached patch should revert all other changes related to the rename. As per usual, I am on OS X so I can't do the case-sensitive rename. If someone could do the svn rename, apply the patch, and run regrtest that would be appreciated. ---------- keywords: +patch Added file: http://bugs.python.org/file10432/revert_queue.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 05:17:05 2008 From: report at bugs.python.org (Brett Cannon) Date: Sun, 25 May 2008 03:17:05 +0000 Subject: [issue2923] Revert ConfigParser rename in 2.6 In-Reply-To: <1211257882.61.0.790616237846.issue2923@psf.upfronthosting.co.za> Message-ID: <1211685425.25.0.630584709298.issue2923@psf.upfronthosting.co.za> Brett Cannon added the comment: I have uploaded a patch that when applied after a ``svn rename`` for Lib/configparser.py to Lib/ConfigParser.py, should revert the rename. Since I am on OS X I can't do the rename myself. ---------- keywords: +patch Added file: http://bugs.python.org/file10433/revert_configparser.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 05:18:03 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 25 May 2008 03:18:03 +0000 Subject: [issue2960] bsddb/test/test_replication.py bus error, segfault, assertion error, pass In-Reply-To: <1211685483.73.0.203518027491.issue2960@psf.upfronthosting.co.za> Message-ID: <1211685483.73.0.203518027491.issue2960@psf.upfronthosting.co.za> New submission from Gregory P. Smith : Using Linux with BerkeleyDB 4.7.25 the bsddb/test/test_replication.py test is very flaky. It alternately passes, raises an AssertionError because of the timeout or gets a segmentation fault or bus error. (side note: i updated test_replication to not use hard coded port numbers) I have not tried this test using other BerkeleyDB versions. ---------- assignee: jcea components: Extension Modules messages: 67318 nosy: gregory.p.smith, jcea priority: high severity: normal status: open title: bsddb/test/test_replication.py bus error, segfault, assertion error, pass versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 07:56:50 2008 From: report at bugs.python.org (Chester) Date: Sun, 25 May 2008 05:56:50 +0000 Subject: [issue2961] Two error messages inconsistent In-Reply-To: <1211695010.07.0.381155349233.issue2961@psf.upfronthosting.co.za> Message-ID: <1211695010.07.0.381155349233.issue2961@psf.upfronthosting.co.za> New submission from Chester : Hello, I would like to report that two error messages of the Python parser are not consistent. Please take a look at this: >>> a = "hello" >>> a + 1 Traceback (most recent call last): File "", line 1, in TypeError: cannot concatenate 'str' and 'int' objects >>> 1 + a Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for +: 'int' and 'str' When the order of the objects is changed, that should only change the order of the 'str' and 'int' words in the message. So if a+1, then TypeError: cannot concatenate 'str' and 'int' objects and if 1+a, then TypeError: cannot concatenate 'int' and 'str' objects ---------- messages: 67319 nosy: chester severity: normal status: open title: Two error messages inconsistent versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 08:11:13 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 25 May 2008 06:11:13 +0000 Subject: [issue2887] bsddb 4.6.4 needs to be ported to Python 3.0 In-Reply-To: <1210915662.48.0.494614370174.issue2887@psf.upfronthosting.co.za> Message-ID: <1211695873.82.0.926002575493.issue2887@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I believe Jesus wants to do this is such a way that bsddb.h and _bsddb.c are a single code base with #ifdef's that compiles on 2.x and 3.x at once. ---------- assignee: -> jcea __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 08:13:51 2008 From: report at bugs.python.org (Chester) Date: Sun, 25 May 2008 06:13:51 +0000 Subject: [issue2961] Two error messages inconsistent In-Reply-To: <1211695010.07.0.381155349233.issue2961@psf.upfronthosting.co.za> Message-ID: <1211696031.38.0.586867986633.issue2961@psf.upfronthosting.co.za> Chester added the comment: For the case a + 1 I recommend: TypeError: can't concatenate 'str' and 'int' objects And for the case 1 + a I recommend: TypeError: can't concatenate 'int' and 'str' objects Consistency matters! __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 08:54:36 2008 From: report at bugs.python.org (Chester) Date: Sun, 25 May 2008 06:54:36 +0000 Subject: [issue2962] Goodbye, 'global' statement! In-Reply-To: <1211698476.24.0.0646576377448.issue2962@psf.upfronthosting.co.za> Message-ID: <1211698476.24.0.0646576377448.issue2962@psf.upfronthosting.co.za> New submission from Chester : The 'global' statement is used to mark a variable as global. It is used in functions to allow statements in the function body to rebind global variables. Using the 'global' statement is generally considered poor style and should be avoided whenever possible. Example: count = 1 def inc(): global count count = count + 1 Since the use of the 'global' statement is frowned upon, it should be removed from Python 3.0. ---------- components: Interpreter Core messages: 67322 nosy: chester severity: normal status: open title: Goodbye, 'global' statement! type: feature request versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 09:21:14 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 25 May 2008 07:21:14 +0000 Subject: [issue2925] Revert Queue rename in 2.6 In-Reply-To: <1211258049.35.0.372468669832.issue2925@psf.upfronthosting.co.za> Message-ID: <1211700074.12.0.612625153015.issue2925@psf.upfronthosting.co.za> Georg Brandl added the comment: Renamed and fixed references in r63599, r63600, r63603. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 09:26:05 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 25 May 2008 07:26:05 +0000 Subject: [issue2923] Revert ConfigParser rename in 2.6 In-Reply-To: <1211257882.61.0.790616237846.issue2923@psf.upfronthosting.co.za> Message-ID: <1211700365.37.0.222053706258.issue2923@psf.upfronthosting.co.za> Georg Brandl added the comment: Renamed module, applied patch and adapted some further references in r63605-07. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 09:57:16 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 25 May 2008 07:57:16 +0000 Subject: [issue2879] Rename _winreg to winreg In-Reply-To: <1210913526.61.0.164470356579.issue2879@psf.upfronthosting.co.za> Message-ID: <1211702235.67.0.629080862166.issue2879@psf.upfronthosting.co.za> Georg Brandl added the comment: Renamed in 3k in r63610, added note in 2.6 docs in r63611, added fixer entry in r63612. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 10:01:11 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 25 May 2008 08:01:11 +0000 Subject: [issue2962] Goodbye, 'global' statement! In-Reply-To: <1211698476.24.0.0646576377448.issue2962@psf.upfronthosting.co.za> Message-ID: <1211702471.53.0.0562565163713.issue2962@psf.upfronthosting.co.za> Georg Brandl added the comment: First, global is frowned upon in large projects, but sometimes useful in quick & dirty scripts. Second, the time for such changes to Python 3.0 is past. Third, this at least needs a PEP. ---------- nosy: +georg.brandl resolution: -> rejected status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 10:03:25 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 25 May 2008 08:03:25 +0000 Subject: [issue2961] Two error messages inconsistent In-Reply-To: <1211695010.07.0.381155349233.issue2961@psf.upfronthosting.co.za> Message-ID: <1211702604.91.0.592476435249.issue2961@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't see a problem here. You may be mislead by the assumption that the error messages are generated by the parser, which they aren't -- they are generated at runtime by the objects you try to add. The two types report their failure to do the operation differently -- strings are usually concatenated, so the first one makes sense for strings, but ints have no such notion. ---------- nosy: +georg.brandl resolution: -> rejected status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 10:05:50 2008 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 25 May 2008 08:05:50 +0000 Subject: [issue2963] Method cache is broken in Py3 In-Reply-To: <1211702749.69.0.15718735899.issue2963@psf.upfronthosting.co.za> Message-ID: <1211702749.69.0.15718735899.issue2963@psf.upfronthosting.co.za> New submission from Stefan Behnel : The method cache is deactivated in current Py3. As Lisandro Dalc?n noticed, the following code in typeobject.c always returns false for a Py3 identifier: #define MCACHE_CACHEABLE_NAME(name) \ PyString_CheckExact(name) && \ PyString_GET_SIZE(name) <= MCACHE_MAX_ATTR_SIZE ---------- components: Interpreter Core messages: 67328 nosy: scoder severity: normal status: open title: Method cache is broken in Py3 type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 10:07:51 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 25 May 2008 08:07:51 +0000 Subject: [issue2959] calling GzipFile close() more than once causes exception In-Reply-To: <1211671572.76.0.880996454775.issue2959@psf.upfronthosting.co.za> Message-ID: <1211702871.24.0.6463340424.issue2959@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r63614. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 10:36:02 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 25 May 2008 08:36:02 +0000 Subject: [issue2669] bsddb iterkeys sliently fails when database modified during iteration In-Reply-To: <1208886727.18.0.175464776053.issue2669@psf.upfronthosting.co.za> Message-ID: <1211704561.99.0.810852017994.issue2669@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Fixed in trunk r63617. Fix issue2669: bsddb simple/legacy interface iteration silently fails when database changes size during iteration. It now behaves like a dictionary, the next attempt to get a value from the iterator after the database has changed size will raise a RuntimeError. ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith priority: -> normal resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 10:41:00 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 25 May 2008 08:41:00 +0000 Subject: [issue2853] *** glibc detected *** python: double free or corruption In-Reply-To: <1210784892.85.0.853831073509.issue2853@psf.upfronthosting.co.za> Message-ID: <1211704860.33.0.9045708547.issue2853@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Could you supply some real code in a test case and better describe the environment needed to reproduce this? (what OS for the client and server, 64bit, 32bit, mount options, etc). ---------- nosy: +gregory.p.smith priority: -> critical __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 10:54:47 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 25 May 2008 08:54:47 +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: <1211705687.38.0.85807015749.issue2782@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Yes, sounds like a bug. I'll fix it. But should time.strftime allow a unicode format string as input in the first place? For backwards compatibility I'd say yes. But.. Sane output can not be guaranteed from time.strftime when given a unicode format string if it contains multibyte characters that happen to have a valid (bytewise) % format code in them within a multibyte character. Anyways the output is always byte string without a specified encoding so giving it actual unicode characters as input is not advised (at least in 2.6, i didn't check 3.0). there's an amusing comment in Modules/datetimemodule.c: /* I sure don't want to reproduce the strftime code from the time module, * so this imports the module and calls it. All the hair is due to * giving special meanings to the %z, %Z and %f format codes via a * preprocessing step on the format string. ... */ static PyObject * wrap_strftime( ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith priority: -> normal __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 10:57:10 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 25 May 2008 08:57:10 +0000 Subject: [issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data In-Reply-To: <1211069816.05.0.311102248623.issue2901@psf.upfronthosting.co.za> Message-ID: <1211705830.77.0.218291516758.issue2901@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith priority: -> normal __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 10:58:15 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 25 May 2008 08:58:15 +0000 Subject: =?utf-8?q?[issue2949]_Windows_installer_doesn't_include_OpenSSL_license_and=09notice?= In-Reply-To: <1211541769.18.0.393592583867.issue2949@psf.upfronthosting.co.za> Message-ID: <1211705895.96.0.71824902004.issue2949@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- priority: -> release blocker __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 11:00:08 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 25 May 2008 09:00:08 +0000 Subject: [issue2891] urllib not handling ftp servers that do not support REST In-Reply-To: <1210933128.84.0.447091600093.issue2891@psf.upfronthosting.co.za> Message-ID: <1211706008.65.0.841653517556.issue2891@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I believe that means we can close this issue here? If not, please reopen. ---------- nosy: +gregory.p.smith resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 11:02:35 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 25 May 2008 09:02:35 +0000 Subject: [issue2523] binary buffered reading is quadratic In-Reply-To: <1206987085.65.0.944826780657.issue2523@psf.upfronthosting.co.za> Message-ID: <1211706155.8.0.782427750036.issue2523@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith priority: -> high __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 11:07:56 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 25 May 2008 09:07:56 +0000 Subject: [issue2595] Multiple integer overflows in imgfile extension module lead to buffer overflow In-Reply-To: <1207673799.86.0.811482353328.issue2595@psf.upfronthosting.co.za> Message-ID: <1211706476.73.0.618957186944.issue2595@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- priority: -> low __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 11:09:30 2008 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 25 May 2008 09:09:30 +0000 Subject: [issue2964] instancemethod_descr_get() lacks an INCREF In-Reply-To: <1211706570.33.0.362667787125.issue2964@psf.upfronthosting.co.za> Message-ID: <1211706570.33.0.362667787125.issue2964@psf.upfronthosting.co.za> New submission from Stefan Behnel : Here is a fix for Objects/classobject.c in Py3.0a5 that fixes a ref count crash for classmethods. ---------- components: Interpreter Core files: instancemethod-fix.patch keywords: patch messages: 67334 nosy: scoder severity: normal status: open title: instancemethod_descr_get() lacks an INCREF type: crash versions: Python 3.0 Added file: http://bugs.python.org/file10434/instancemethod-fix.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 11:10:27 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 25 May 2008 09:10:27 +0000 Subject: [issue2588] PyOS_vsnprintf() underflow leads to memory corruption In-Reply-To: <1207670110.11.0.605807538943.issue2588@psf.upfronthosting.co.za> Message-ID: <1211706627.9.0.822786177823.issue2588@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- assignee: -> gregory.p.smith keywords: +patch nosy: +gregory.p.smith priority: -> normal __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 11:13:07 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 25 May 2008 09:13:07 +0000 Subject: [issue2589] PyOS_vsnprintf() potential integer overflow leads to memory corruption on esoteric architectures In-Reply-To: <1207670389.49.0.356116216637.issue2589@psf.upfronthosting.co.za> Message-ID: <1211706787.59.0.51202427876.issue2589@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith priority: -> low __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 11:18:01 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 25 May 2008 09:18:01 +0000 Subject: [issue2455] stat.ST_CTIME and stat.ST_ATIME problem In-Reply-To: <1206152716.81.0.392707028584.issue2455@psf.upfronthosting.co.za> Message-ID: <1211707081.24.0.222320186254.issue2455@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 11:23:26 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 25 May 2008 09:23:26 +0000 Subject: [issue2254] Python CGIHTTPServer information disclosure In-Reply-To: <1204919985.1.0.220899639338.issue2254@psf.upfronthosting.co.za> Message-ID: <1211707406.47.0.164071380176.issue2254@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Could you please create a test case for this as a patch to Lib/test/test_httpservers.py? thanks! ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith priority: -> normal __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 11:24:47 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 25 May 2008 09:24:47 +0000 Subject: [issue2964] instancemethod_descr_get() lacks an INCREF In-Reply-To: <1211706570.33.0.362667787125.issue2964@psf.upfronthosting.co.za> Message-ID: <1211707487.32.0.111372445311.issue2964@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r63620. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 11:28:09 2008 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 25 May 2008 09:28:09 +0000 Subject: [issue2963] Method cache is broken in Py3 In-Reply-To: <1211702749.69.0.15718735899.issue2963@psf.upfronthosting.co.za> Message-ID: <1211707689.63.0.432690499552.issue2963@psf.upfronthosting.co.za> Stefan Behnel added the comment: Here is a patch that fixes this. ---------- keywords: +patch Added file: http://bugs.python.org/file10435/py3k-method-cache-fix.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 11:32:31 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 25 May 2008 09:32:31 +0000 Subject: [issue2963] Method cache is broken in Py3 In-Reply-To: <1211702749.69.0.15718735899.issue2963@psf.upfronthosting.co.za> Message-ID: <1211707951.42.0.20233228119.issue2963@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed patch as r63621. Thanks! ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 11:33:08 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 25 May 2008 09:33:08 +0000 Subject: [issue2218] Enhanced hotshot profiler with high-resolution timer In-Reply-To: <1204501511.28.0.993763550383.issue2218@psf.upfronthosting.co.za> Message-ID: <1211707988.26.0.194369315812.issue2218@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- keywords: +patch nosy: +gregory.p.smith priority: -> normal __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 11:46:25 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 25 May 2008 09:46:25 +0000 Subject: [issue2965] Update interface of weakref dictionaries In-Reply-To: <1211708783.58.0.883984457478.issue2965@psf.upfronthosting.co.za> Message-ID: <1211708783.58.0.883984457478.issue2965@psf.upfronthosting.co.za> New submission from Georg Brandl : The weak dictionaries in the weakref module still present the 2.x dictionary methods (iter*). This should be fixed for consistency with 3k dicts. ---------- components: Library (Lib) messages: 67339 nosy: georg.brandl priority: critical severity: normal status: open title: Update interface of weakref dictionaries versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 12:21:42 2008 From: report at bugs.python.org (Peter Puk) Date: Sun, 25 May 2008 10:21:42 +0000 Subject: [issue2966] pydoc doesnt show 'from module import identifier' in the docs In-Reply-To: <1211710902.46.0.335827912868.issue2966@psf.upfronthosting.co.za> Message-ID: <1211710902.46.0.335827912868.issue2966@psf.upfronthosting.co.za> New submission from Peter Puk : When you try to make a doc from your programm woth pydoc, it doesnt show the the identifiers in the modules section. when i put 'from module import identifier' in my code ---------- components: Extension Modules messages: 67340 nosy: peter.puk severity: normal status: open title: pydoc doesnt show 'from module import identifier' in the docs versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 13:35:57 2008 From: report at bugs.python.org (Ismail Donmez) Date: Sun, 25 May 2008 11:35:57 +0000 Subject: [issue2967] [PATCH] Rename Tkinter to tkinter in test_tcl In-Reply-To: <1211715357.08.0.700119566525.issue2967@psf.upfronthosting.co.za> Message-ID: <1211715357.08.0.700119566525.issue2967@psf.upfronthosting.co.za> New submission from Ismail Donmez : Tkinter module is renamed to tkinter. test_tcl should be updated for this. Patch attached. ---------- components: Tests files: tcl.patch keywords: patch messages: 67341 nosy: cartman severity: normal status: open title: [PATCH] Rename Tkinter to tkinter in test_tcl versions: Python 3.0 Added file: http://bugs.python.org/file10436/tcl.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 13:36:09 2008 From: report at bugs.python.org (Ismail Donmez) Date: Sun, 25 May 2008 11:36:09 +0000 Subject: [issue2967] [PATCH] Rename Tkinter to tkinter in test_tcl In-Reply-To: <1211715357.08.0.700119566525.issue2967@psf.upfronthosting.co.za> Message-ID: <1211715369.81.0.857746425983.issue2967@psf.upfronthosting.co.za> Changes by Ismail Donmez : ---------- type: -> compile error __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 13:53:25 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 25 May 2008 11:53:25 +0000 Subject: [issue2967] [PATCH] Rename Tkinter to tkinter in test_tcl In-Reply-To: <1211715357.08.0.700119566525.issue2967@psf.upfronthosting.co.za> Message-ID: <1211716405.04.0.117988020172.issue2967@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r63624. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 13:54:11 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 25 May 2008 11:54:11 +0000 Subject: [issue2966] pydoc doesnt show 'from module import identifier' in the docs In-Reply-To: <1211710902.46.0.335827912868.issue2966@psf.upfronthosting.co.za> Message-ID: <1211716450.62.0.169772133589.issue2966@psf.upfronthosting.co.za> Georg Brandl added the comment: Can you expand a bit? What exactly do you expect in the generated documentation that is not there? ---------- nosy: +georg.brandl __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 14:06:47 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 25 May 2008 12:06:47 +0000 Subject: =?utf-8?q?[issue2949]_Windows_installer_doesn't_include_OpenSSL_license_and=09notice?= In-Reply-To: <1211541769.18.0.393592583867.issue2949@psf.upfronthosting.co.za> Message-ID: <1211717207.47.0.791280012164.issue2949@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is now fixed in r63625 and r63626. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 14:52:04 2008 From: report at bugs.python.org (Ali Polatel) Date: Sun, 25 May 2008 12:52:04 +0000 Subject: [issue756093] complex pow() crash on Alpha Message-ID: <1211719924.03.0.803250262736.issue756093@psf.upfronthosting.co.za> Ali Polatel added the comment: Probably related to this. test_pow fails on alpha with both 2.4.4 and 2.5.2. test test_pow failed -- Traceback (most recent call last): File "/var/tmp/portage/dev-lang/python-2.4.4-r9/work/Python-2.4.4/Lib/test/test_pow.py", line 109, in test_bug705231 eq(pow(a, 1.23e167), 1.0) ValueError: negative number cannot be raised to a fractional power I'll test with 2.6 and report back. ---------- nosy: +hawking ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 25 15:04:53 2008 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 25 May 2008 13:04:53 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211720693.56.0.920900182642.issue643841@psf.upfronthosting.co.za> Nick Coghlan added the comment: Updated test cases and documentation to cover use of a descriptor for _target in a subclass, and uploaded most recent local copies of all 3 files. ---------- keywords: +patch versions: +Python 3.0 -Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5 Added file: http://bugs.python.org/file10437/typetools.rst ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 25 15:05:25 2008 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 25 May 2008 13:05:25 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211720725.53.0.204368117042.issue643841@psf.upfronthosting.co.za> Changes by Nick Coghlan : Added file: http://bugs.python.org/file10438/typetools.py ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 25 15:05:51 2008 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 25 May 2008 13:05:51 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211720751.25.0.107020653448.issue643841@psf.upfronthosting.co.za> Changes by Nick Coghlan : Added file: http://bugs.python.org/file10439/test_typetools.py ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 25 15:06:33 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 25 May 2008 13:06:33 +0000 Subject: [issue2875] Rename the thread module to _thread In-Reply-To: <1210913205.44.0.787741913156.issue2875@psf.upfronthosting.co.za> Message-ID: <1211720793.04.0.819165217953.issue2875@psf.upfronthosting.co.za> Georg Brandl added the comment: Done in r63631. Fixer added in r63627 and r63629, notices to 2.6 docs added in r63630. Do you still want to warn when importing thread or dummy_thread directly in 2.6, like PEP 3108 says? ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 15:07:40 2008 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 25 May 2008 13:07:40 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211720860.17.0.149917946306.issue643841@psf.upfronthosting.co.za> Changes by Nick Coghlan : Removed file: http://bugs.python.org/file10389/typetools.py ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 25 15:07:46 2008 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 25 May 2008 13:07:46 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211720866.32.0.488998106392.issue643841@psf.upfronthosting.co.za> Changes by Nick Coghlan : Removed file: http://bugs.python.org/file10390/test_typetools.py ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 25 15:07:52 2008 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 25 May 2008 13:07:52 +0000 Subject: [issue643841] New class special method lookup change Message-ID: <1211720872.28.0.995879691713.issue643841@psf.upfronthosting.co.za> Changes by Nick Coghlan : Removed file: http://bugs.python.org/file10402/typetools.rst ____________________________________ Tracker ____________________________________ From report at bugs.python.org Sun May 25 17:14:18 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 25 May 2008 15:14:18 +0000 Subject: [issue2968] Test_imports takes a long time to run In-Reply-To: <1211728458.35.0.22936057327.issue2968@psf.upfronthosting.co.za> Message-ID: <1211728458.35.0.22936057327.issue2968@psf.upfronthosting.co.za> New submission from Martin v. L?wis : Test_imports takes a very long time to complete. I believe this is due to the individual refactorings taking such a long time, even though they apply to small pieces of code only. ---------- messages: 67348 nosy: loewis severity: normal status: open title: Test_imports takes a long time to run __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 17:16:22 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 25 May 2008 15:16:22 +0000 Subject: [issue2968] Test_imports takes a long time to run In-Reply-To: <1211728458.35.0.22936057327.issue2968@psf.upfronthosting.co.za> Message-ID: <1211728582.34.0.851812945681.issue2968@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- assignee: -> collinwinter components: +2to3 (2.x to 3.0 conversion tool) nosy: +collinwinter __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 17:19:11 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 25 May 2008 15:19:11 +0000 Subject: [issue2969] Test_imports fails in 2.6 In-Reply-To: <1211728751.03.0.714435224741.issue2969@psf.upfronthosting.co.za> Message-ID: <1211728751.03.0.714435224741.issue2969@psf.upfronthosting.co.za> New submission from Martin v. L?wis : Test_imports fails for selected cases, when run under Python 2.6. E.g. from_import_usage fails for rewriting __builtin__ print, and also for __builtin__ zip. ---------- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) messages: 67349 nosy: collinwinter, loewis severity: normal status: open title: Test_imports fails in 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 19:22:58 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 25 May 2008 17:22:58 +0000 Subject: [issue2938] Interactive help writes to the python install destination directory In-Reply-To: <1211432376.31.0.60210310996.issue2938@psf.upfronthosting.co.za> Message-ID: <1211736177.96.0.126994367006.issue2938@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the report. This should now be fixed with r63643, r63644 and r63645. ---------- nosy: +loewis resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 20:01:41 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 25 May 2008 18:01:41 +0000 Subject: [issue2906] tkinter, assorted fixes In-Reply-To: <1211125137.99.0.839625810587.issue2906@psf.upfronthosting.co.za> Message-ID: <1211738501.17.0.866433834267.issue2906@psf.upfronthosting.co.za> Guilherme Polo added the comment: I found a problem in the previous patch, new one added. This patch now only considers tuple and list as possible option value that should be joined, and the items inside the list or tuple should be either a string or integer, otherwise it doesn't try to join the values. The problem in the previous patch is that it would always join the value independent of the value's content. But if an option is composed of a tuple of tuples (used by dialogs), this conversion shouldn't be done. Added file: http://bugs.python.org/file10440/fixes_Tkinter.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 20:01:53 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 25 May 2008 18:01:53 +0000 Subject: [issue2906] tkinter, assorted fixes In-Reply-To: <1211125137.99.0.839625810587.issue2906@psf.upfronthosting.co.za> Message-ID: <1211738513.35.0.311915399973.issue2906@psf.upfronthosting.co.za> Changes by Guilherme Polo : Removed file: http://bugs.python.org/file10362/fixes_tkinter.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 20:24:15 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 25 May 2008 18:24:15 +0000 Subject: [issue2966] pydoc doesnt show 'from module import identifier' in the docs In-Reply-To: <1211710902.46.0.335827912868.issue2966@psf.upfronthosting.co.za> Message-ID: <1211739854.87.0.204899805572.issue2966@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think he means that if you use "from m import x" to import part of module interface, "x" is not shown in the generated doc. ---------- nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 20:41:28 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 25 May 2008 18:41:28 +0000 Subject: [issue2965] Update interface of weakref dictionaries In-Reply-To: <1211708783.58.0.883984457478.issue2965@psf.upfronthosting.co.za> Message-ID: <1211740885.66.0.36873778343.issue2965@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Attaching patch. ---------- keywords: +patch nosy: +benjamin.peterson Added file: http://bugs.python.org/file10441/weakref_py3k.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Sun May 25 21:54:02 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 25 May 2008 19:54:02 +0000 Subject: [issue2572] 3.0 pickle docs -- what about old-style classes? In-Reply-To: <1207595901.24.0.991437670579.issue2572@psf.upfronthosting.co.za> Message-ID: <1211745242.28.0.0771415464901.issue2572@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Alexandre, would you mind fixing up the docs? ---------- nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 02:17:30 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 26 May 2008 00:17:30 +0000 Subject: [issue2875] Rename the thread module to _thread In-Reply-To: <1210913205.44.0.787741913156.issue2875@psf.upfronthosting.co.za> Message-ID: <1211761048.77.0.536909717303.issue2875@psf.upfronthosting.co.za> Brett Cannon added the comment: Yeah, it is essentially a deprecation so the warning should be there. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 02:18:08 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 26 May 2008 00:18:08 +0000 Subject: [issue2875] Rename the thread module to _thread In-Reply-To: <1210913205.44.0.787741913156.issue2875@psf.upfronthosting.co.za> Message-ID: <1211761087.45.0.158082431315.issue2875@psf.upfronthosting.co.za> Brett Cannon added the comment: But then again I thought that about the renames. =) Someone might actually pickle something from thread, so not sure how best to handle this one. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 02:20:17 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 26 May 2008 00:20:17 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211761217.96.0.308967024792.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: -Rename _winreg to winreg, Rename the thread module to _thread, Revert ConfigParser rename in 2.6, Revert Queue rename in 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 02:24:22 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 26 May 2008 00:24:22 +0000 Subject: [issue2876] Write UserDict fixer for 2to3 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1211761462.82.0.818163767906.issue2876@psf.upfronthosting.co.za> Brett Cannon added the comment: Raymond, can you tell me exactly where each module-level thing in UserDict went and if it was renamed or not? That way the fixer can get written. ---------- assignee: -> rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 02:24:46 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 26 May 2008 00:24:46 +0000 Subject: [issue2877] Backport UserString move from 3.0 In-Reply-To: <1210913405.95.0.573859631329.issue2877@psf.upfronthosting.co.za> Message-ID: <1211761486.32.0.933580605702.issue2877@psf.upfronthosting.co.za> Brett Cannon added the comment: Raymond, can you tell me exactly where each module-level thing in UserString went and if it was renamed or not? That way the fixer can get written. ---------- assignee: -> rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 02:25:08 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 26 May 2008 00:25:08 +0000 Subject: [issue2878] Backport UserList move in 3.0 In-Reply-To: <1210913470.53.0.764611269723.issue2878@psf.upfronthosting.co.za> Message-ID: <1211761508.5.0.267124132409.issue2878@psf.upfronthosting.co.za> Brett Cannon added the comment: Raymond, can you tell me exactly where each module-level thing in UserList went and if it was renamed or not? That way the fixer can get written. ---------- assignee: -> rhettinger nosy: +rhettinger __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 03:30:59 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 26 May 2008 01:30:59 +0000 Subject: [issue2872] Remove commands for PEP 3108 In-Reply-To: <1210912647.86.0.565995912638.issue2872@psf.upfronthosting.co.za> Message-ID: <1211765459.62.0.85201955249.issue2872@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 04:03:23 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 26 May 2008 02:03:23 +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: <1211767403.18.0.0652856612937.issue2888@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think I *slightly* prefer the 'new' way. Was pprint.py changed between 2.6 and 3.0? Or is the change a side-effect of 3.0 changes? Or of 2to3 if that was used? (In glancing through it, I did not see anything that needed change) Fred, I am assigning to you simply because you are listed as original author and *might* immediately know the answers. ---------- assignee: -> fdrake nosy: +fdrake, tjreedy __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 05:50:31 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 26 May 2008 03:50:31 +0000 Subject: [issue2876] Write UserDict fixer for 2to3 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1211773827.42.0.300486912593.issue2876@psf.upfronthosting.co.za> Raymond Hettinger added the comment: UserDict.UserDict is gone. UserDict.IterableUserDict class is now collections.UserDict. UserDict.Mixin is now collections.MutableMapping. The new classes comform to the new dict API, so they fixer needs to also make same method adaptatations as for dicts (i.e. d.keys() --> list (d.keys() and d.has_key --> d.__contains__). __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 05:56:14 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 26 May 2008 03:56:14 +0000 Subject: [issue2878] Backport UserList move in 3.0 In-Reply-To: <1210913470.53.0.764611269723.issue2878@psf.upfronthosting.co.za> Message-ID: <1211774174.05.0.187352417785.issue2878@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It was moved to the collections module. ---------- assignee: rhettinger -> brett.cannon __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 05:57:16 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 26 May 2008 03:57:16 +0000 Subject: [issue2877] Backport UserString move from 3.0 In-Reply-To: <1210913405.95.0.573859631329.issue2877@psf.upfronthosting.co.za> Message-ID: <1211774236.23.0.727669142459.issue2877@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It was moved to the collections module. ---------- assignee: rhettinger -> brett.cannon __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 05:59:16 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 26 May 2008 03:59:16 +0000 Subject: [issue2876] Write UserDict fixer for 2to3 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1211774356.75.0.940907643467.issue2876@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> brett.cannon __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 07:02:27 2008 From: report at bugs.python.org (Ismail Donmez) Date: Mon, 26 May 2008 05:02:27 +0000 Subject: [issue2970] test_distutils fails on Linux In-Reply-To: <1211778144.81.0.940040536081.issue2970@psf.upfronthosting.co.za> Message-ID: <1211778144.81.0.940040536081.issue2970@psf.upfronthosting.co.za> New submission from Ismail Donmez : This is on Ubuntu 8.04 : test_distutils Using PyPI login from /home/cartman/Sources/py3k/Lib/distutils/tests/.pypirc Using PyPI login from /home/cartman/Sources/py3k/Lib/distutils/tests/.pypirc Using PyPI login from /home/cartman/Sources/py3k/Lib/distutils/tests/.pypirc test test_distutils produced unexpected output: ********************************************************************** *** lines 2-3 of actual output doesn't appear in expected output after line 1: + Using PyPI login from /home/cartman/Sources/py3k/Lib/distutils/tests/.pypirc + Using PyPI login from /home/cartman/Sources/py3k/Lib/distutils/tests/.pypirc ********************************************************************** Same test passes on Darwin and outputs 5 lines so it might be a bug in the expected output instead. ---------- components: Tests messages: 67364 nosy: cartman severity: normal status: open title: test_distutils fails on Linux type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 07:13:25 2008 From: report at bugs.python.org (Ismail Donmez) Date: Mon, 26 May 2008 05:13:25 +0000 Subject: [issue2971] test_zipfile64 fails In-Reply-To: <1211778804.81.0.308743565458.issue2971@psf.upfronthosting.co.za> Message-ID: <1211778804.81.0.308743565458.issue2971@psf.upfronthosting.co.za> New submission from Ismail Donmez : test_zipfile64 testDeflated (test.test_zipfile64.TestsWithSourceFile) ... ERROR testStored (test.test_zipfile64.TestsWithSourceFile) ... ERROR ====================================================================== ERROR: testDeflated (test.test_zipfile64.TestsWithSourceFile) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cartman/Sources/py3k/Lib/test/test_zipfile64.py", line 41, in setUp fp.write(self.data) File "/home/cartman/Sources/py3k/Lib/io.py", line 987, in write raise TypeError("can't write str to binary stream") TypeError: can't write str to binary stream ====================================================================== ERROR: testStored (test.test_zipfile64.TestsWithSourceFile) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cartman/Sources/py3k/Lib/test/test_zipfile64.py", line 41, in setUp fp.write(self.data) File "/home/cartman/Sources/py3k/Lib/io.py", line 987, in write raise TypeError("can't write str to binary stream") TypeError: can't write str to binary stream ---------------------------------------------------------------------- Ran 2 tests in 2.151s FAILED (errors=2) test test_zipfile64 failed -- errors occurred; run in verbose mode for details 'test_zipfile64' left behind file '@test' 1 test failed: test_zipfile64 ---------- components: Tests messages: 67365 nosy: cartman severity: normal status: open title: test_zipfile64 fails type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 09:37:45 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 26 May 2008 07:37:45 +0000 Subject: [issue2957] recursion limit exceeded when importing .pyc module In-Reply-To: <1211626208.53.0.435870200974.issue2957@psf.upfronthosting.co.za> Message-ID: <1211787464.54.0.23597254169.issue2957@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It's a bug in marshal.c: near the end of r_object(), there is an extra "return v" that should be removed. ---------- assignee: -> amaury.forgeotdarc nosy: +amaury.forgeotdarc __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 10:45:01 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 26 May 2008 08:45:01 +0000 Subject: [issue2875] Rename the thread module to _thread In-Reply-To: <1210913205.44.0.787741913156.issue2875@psf.upfronthosting.co.za> Message-ID: <1211791500.86.0.901198503381.issue2875@psf.upfronthosting.co.za> Georg Brandl added the comment: Then I suggest to do the same thing as for all the other renames, leaving only the notice in the docs. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 11:36:41 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 26 May 2008 09:36:41 +0000 Subject: [issue2857] add codec for java modified utf-8 In-Reply-To: <1210820919.45.0.733381289954.issue2857@psf.upfronthosting.co.za> Message-ID: <1211794600.93.0.283651475411.issue2857@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Ok, if you can write a patch implementing the codec, we'll add it. Please use the name "utf-8-java" and codec name utf_8_java.py. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 12:30:41 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 26 May 2008 10:30:41 +0000 Subject: [issue2881] Create the dbm package In-Reply-To: <1210914327.93.0.813244927721.issue2881@psf.upfronthosting.co.za> Message-ID: <1211797841.03.0.434426714883.issue2881@psf.upfronthosting.co.za> Georg Brandl added the comment: Added 2.6 warnings in r63660, fixer in r63661, renamed modules in 3k in r63662, and a remaining test file in r63663. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 12:35:59 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 26 May 2008 10:35:59 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211798159.9.0.881964114858.issue2775@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- dependencies: -Create the dbm package __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 16:49:35 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 26 May 2008 14:49:35 +0000 Subject: [issue2886] Create the xmlrpc package In-Reply-To: <1210914821.89.0.572470213845.issue2886@psf.upfronthosting.co.za> Message-ID: <1211813375.84.0.491912112117.issue2886@psf.upfronthosting.co.za> Georg Brandl added the comment: Added 2.6 notes in r63665, fixer in r63666, renamed in 3.0 in r63667. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 16:49:48 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 26 May 2008 14:49:48 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211813388.51.0.899833000626.issue2775@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- dependencies: -Create the xmlrpc package __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 18:14:24 2008 From: report at bugs.python.org (Gregor Lingl) Date: Mon, 26 May 2008 16:14:24 +0000 Subject: [issue1513695] new turtle module Message-ID: <1211818464.69.0.87212415199.issue1513695@psf.upfronthosting.co.za> Gregor Lingl added the comment: Certainly I'd like to file a contributor agreement. But I don't know what is required exactly. Is there any template or example? (There is already a compyright-preamble in the submitted version - but I think you mean something else?) There is progress on most of the open issues and I have now a version which works well with Python 2.6 and is fairly well documented via docstrings. I could upload this within (at most) two days. It has also those 2 features requested by Brad miller (msg64388) implemented. But I have a few questions to which I need answers in order to continue my work optimally: 1) The turtle module is contained in one large file. But there will be two versions, one for Python2.6 the other one for Python3.0. Right? 2) As far as I understand, xturtle.py will replace turtle.py in Python 3.0. Will xturtle.py replace turtle.py already in Python2.6 or are the plans that it will only be added to Python2.6? 3) I understand, that compatibility issues are of primary importance for Python 2.6. Is this also the case for Python 3.0? (If not some cleanup could be done. I.e. some code, which is only there for compatibility reasons could be dropped.) 4) How to proceed with documentation? Is it extracted automatically from the docstrings? Or should I compose a single text file mainly from the docstrings with some additional structure and explanations? I also would be happy to create sources for Sphinx, but that would take some time (approx. a week) as I'm not familiar neither with Sphinx nor with reStructuredText. There are quite a few people around who would like to help with the documentation, especially to amend my not very brillant and clear English. This brings me to two very important questions: 5) How will the development of xturtle/turtle continue? There are more than 3 month until the final release and it will be reasonable to use this time to amend the docs (as mentioned above) and to fix those bugs, which inevitably will occur during the beta testing period. - Should I prepare bugfix-releases of the module on my own and then submit them every 1 or 2 weeks, or - should the bugs and amendments be submitted to the bugtracker one at a time and then be incorporated by some reviewer? 6) Who will be the reviewer? Martin? Or has the reviewer still to be determined? I would very much appreciate some regular communication about the open issues. 7) Where is the right place for this communication? Here at the bugtracker? At Python-dev? 8) Another open issue is, if there should be added some sample scripts to the standard-distro? What is your opinion? More questions will certainly arise, but for now I'd be happy to get answers to these ones. Thanks in advance Gregor Lingl _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 26 18:17:16 2008 From: report at bugs.python.org (Henrik Vendelbo) Date: Mon, 26 May 2008 16:17:16 +0000 Subject: [issue2972] arguments and default path not set in site.py and sitecustomize.py In-Reply-To: <1211818636.32.0.584139114136.issue2972@psf.upfronthosting.co.za> Message-ID: <1211818636.32.0.584139114136.issue2972@psf.upfronthosting.co.za> New submission from Henrik Vendelbo : If you want to use site.py/sitecustomize.py as a regular python script, altering behaviour of calling the python exe, there is a significant problem. sys.argv isn't assigned until after site.py completes, and the directory of the script to execute is added to sys.path after site.py completes as well. If it cannot be introduced for backwards compatibility, there should at least be a way to access the information ---------- components: None messages: 67372 nosy: hvendelbo severity: normal status: open title: arguments and default path not set in site.py and sitecustomize.py versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 18:32:42 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 26 May 2008 16:32:42 +0000 Subject: [issue2883] Create the http package In-Reply-To: <1210914446.04.0.852197194543.issue2883@psf.upfronthosting.co.za> Message-ID: <1211819562.14.0.0121322877059.issue2883@psf.upfronthosting.co.za> Georg Brandl added the comment: Added renaming notices in r63691, 2to3 fixer in r63695, created package in r63700. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 18:32:51 2008 From: report at bugs.python.org (Georg Brandl) Date: Mon, 26 May 2008 16:32:51 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211819571.19.0.161560540983.issue2775@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- dependencies: -Create the http package __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 18:35:29 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 26 May 2008 16:35:29 +0000 Subject: [issue1513695] new turtle module Message-ID: <1211819729.33.0.0312108526771.issue1513695@psf.upfronthosting.co.za> Benjamin Peterson added the comment: You can get a contributor agreement at http://www.python.org/psf/contrib/. 1. We will add it to the 2.6, and tree and it will be ported to 3.0. 2. As long as it's compatible, it will replace the old turtle in 2.6. 3. We're trying not to change the APIs too much, but this is a possibility if you deprecate them in 2.6. 4. reST is what we are using. If you could give the doc team a plain text, we'd be happy to work with you and convert it to reST. 5. We can probably give you commit access to maintain your module. In that case you can just do your fixes in Subversion. 6. I don't know. :) 7. Yes. 8. I think we could use some examples in the Demo directory. Thanks for contributing! ---------- nosy: +benjamin.peterson _____________________________________ Tracker _____________________________________ From report at bugs.python.org Mon May 26 18:44:22 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Mon, 26 May 2008 16:44:22 +0000 Subject: [issue2970] test_distutils fails on Linux In-Reply-To: <1211778144.81.0.940040536081.issue2970@psf.upfronthosting.co.za> Message-ID: <1211820262.9.0.137257064969.issue2970@psf.upfronthosting.co.za> Quentin Gallet-Gilles added the comment: This has been handled in r63575. ---------- nosy: +quentin.gallet-gilles __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 18:49:00 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 26 May 2008 16:49:00 +0000 Subject: [issue2970] test_distutils fails on Linux In-Reply-To: <1211778144.81.0.940040536081.issue2970@psf.upfronthosting.co.za> Message-ID: <1211820540.77.0.17353212433.issue2970@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 19:15:22 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 26 May 2008 17:15:22 +0000 Subject: [issue2973] _ssl compiler warnings In-Reply-To: <1211822122.76.0.619319801709.issue2973@psf.upfronthosting.co.za> Message-ID: <1211822122.76.0.619319801709.issue2973@psf.upfronthosting.co.za> New submission from Benjamin Peterson : When compiling the _ssl extension on MacOS 10.4, I get these warnings: /users/benjamin/python/trunk/Modules/_ssl.c: In function '_get_peer_alt_names': /users/benjamin/python/trunk/Modules/_ssl.c:694 warning: passing argument 2 of 'ASN1_item_d2i' from incompatible pointer type /users/benjamin/python/trunk/Modules/_ssl.c:698: warning: passing argument 2 of 'method->d2i' from incompatible pointer type ---------- components: Extension Modules messages: 67376 nosy: benjamin.peterson priority: normal severity: normal status: open title: _ssl compiler warnings type: compile error versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 19:33:18 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 26 May 2008 17:33:18 +0000 Subject: [issue2875] Rename the thread module to _thread In-Reply-To: <1211791500.86.0.901198503381.issue2875@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Mon, May 26, 2008 at 1:45 AM, Georg Brandl wrote: > > Georg Brandl added the comment: > > Then I suggest to do the same thing as for all the other renames, > leaving only the notice in the docs. > Works for me. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 19:34:33 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 26 May 2008 17:34:33 +0000 Subject: [issue2876] Write UserDict fixer for 2to3 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1211823273.29.0.445508856668.issue2876@psf.upfronthosting.co.za> Brett Cannon added the comment: I don't know if 2to3 can handle the class renames. Up to this point we have only been handling module renames. Collin, how doable is this? ---------- assignee: brett.cannon -> collinwinter nosy: +collinwinter __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 19:52:48 2008 From: report at bugs.python.org (Buck Golemon) Date: Mon, 26 May 2008 17:52:48 +0000 Subject: [issue2966] pydoc doesnt show 'from module import identifier' in the docs In-Reply-To: <1211710902.46.0.335827912868.issue2966@psf.upfronthosting.co.za> Message-ID: <1211824368.4.0.240172616042.issue2966@psf.upfronthosting.co.za> Buck Golemon added the comment: I feel like that's the correct behavior, since x should be documented in m. In a module you can override this by doing '__all__ = ['x']', but I'm not sure there's a way in a script. ---------- nosy: +bgolemon __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 20:01:34 2008 From: report at bugs.python.org (Buck Golemon) Date: Mon, 26 May 2008 18:01:34 +0000 Subject: [issue2613] inconsistency with bare * in parameter list In-Reply-To: <1207903370.95.0.0868464301565.issue2613@psf.upfronthosting.co.za> Message-ID: <1211824894.25.0.249477784159.issue2613@psf.upfronthosting.co.za> Buck Golemon added the comment: It seems like f(a=1, b=2) and g(a=1, b=2) should be equivalent. Anyone agree, disagree? ---------- nosy: +bgolemon __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 20:26:39 2008 From: report at bugs.python.org (Ismail Donmez) Date: Mon, 26 May 2008 18:26:39 +0000 Subject: [issue2974] test_subprocess fails on Darwin In-Reply-To: <1211826399.44.0.0384568842407.issue2974@psf.upfronthosting.co.za> Message-ID: <1211826399.44.0.0384568842407.issue2974@psf.upfronthosting.co.za> New submission from Ismail Donmez : ./python -E -tt -bb ./Lib/test/regrtest.py -l -uall [...] test_subprocess . this bit of output is from a test of stdout in a different process ... test test_subprocess failed -- Traceback (most recent call last): File "/Users/cartman/Sources/py3k/Lib/test/test_subprocess.py", line 407, in test_no_leaking data = p.communicate("lime")[0] File "/Users/cartman/Sources/py3k/Lib/subprocess.py", line 599, in communicate return self._communicate(input) File "/Users/cartman/Sources/py3k/Lib/subprocess.py", line 1086, in _communicate rlist, wlist, xlist = select.select(read_set, write_set, []) select.error: (4, 'Interrupted system call') ---------- components: Tests messages: 67381 nosy: cartman severity: normal status: open title: test_subprocess fails on Darwin type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 21:05:29 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 26 May 2008 19:05:29 +0000 Subject: [issue2872] Remove commands for PEP 3108 In-Reply-To: <1210912647.86.0.565995912638.issue2872@psf.upfronthosting.co.za> Message-ID: <1211828729.31.0.0595935571746.issue2872@psf.upfronthosting.co.za> Brett Cannon added the comment: r63715 has the 3.0 changes; biggest difference is that I also ripped out the mk2arg() and friends since they are not used by anyone. I still need to add the fixer and add the proper warnings in 2.6 along with the doc change. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 21:22:00 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 26 May 2008 19:22:00 +0000 Subject: [issue2974] test_subprocess fails on Darwin In-Reply-To: <1211826399.44.0.0384568842407.issue2974@psf.upfronthosting.co.za> Message-ID: <1211829720.6.0.900019929008.issue2974@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This works fine for me. ---------- nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 21:44:14 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 26 May 2008 19:44:14 +0000 Subject: [issue2872] Remove commands for PEP 3108 In-Reply-To: <1210912647.86.0.565995912638.issue2872@psf.upfronthosting.co.za> Message-ID: <1211831054.0.0.401081881609.issue2872@psf.upfronthosting.co.za> Benjamin Peterson added the comment: 2.6 things done in r63721. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 21:51:33 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 26 May 2008 19:51:33 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1211831493.17.0.261493632893.issue2775@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- dependencies: -Remove commands for PEP 3108 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 21:52:25 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 26 May 2008 19:52:25 +0000 Subject: [issue2939] Apache mod_python python-func strftime In-Reply-To: <1211442305.92.0.687824708378.issue2939@psf.upfronthosting.co.za> Message-ID: <1211831545.11.0.0980170868392.issue2939@psf.upfronthosting.co.za> Gregory P. Smith added the comment: time.strftime and datetime.datetime.strftime merely format a time value you supply from elsewhere, they don't get the current time. If there really is a bug, please open a new issue with an accurate description and some example code. ---------- components: +Library (Lib) -ctypes nosy: +gregory.p.smith resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 21:56:17 2008 From: report at bugs.python.org (Ismail Donmez) Date: Mon, 26 May 2008 19:56:17 +0000 Subject: [issue2974] test_subprocess fails on Darwin In-Reply-To: <1211826399.44.0.0384568842407.issue2974@psf.upfronthosting.co.za> Message-ID: <1211831777.07.0.925512535754.issue2974@psf.upfronthosting.co.za> Ismail Donmez added the comment: On a second run, I can't reproduce this. There might be a race somewhere but until it can be reproduced this bug can be closed. Thanks for your attention. __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 21:56:36 2008 From: report at bugs.python.org (Jim Kleckner) Date: Mon, 26 May 2008 19:56:36 +0000 Subject: [issue2975] VS8 include dirs grow without bound In-Reply-To: <1211831796.1.0.811493312376.issue2975@psf.upfronthosting.co.za> Message-ID: <1211831796.1.0.811493312376.issue2975@psf.upfronthosting.co.za> New submission from Jim Kleckner : I tracked down a testing failure for Cython tests on the Windows platform to be the result of how the Visual C environment variables are being detected. In the function, query_vcvarsall, the .bat file: "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" is being run with the arguments: x86 & set This in turn calls the platform-specific file vcvars32.bat (or other). In this file, the PATH, INCLUDE, and LIBPATH environment variables are simply being appended/prepended with their values. initialize() then just overrides the os.environ values with these monotonically growing variables. It seems that duplicate names should be filtered out from these paths to prevent overflow. The attached patch seems to fix this issue, if a bit brute force. Please review as a candidate. ===== @set PATH=%DevEnvDir%;%VCINSTALLDIR%\BIN;%VSINSTALLDIR%\Common7\Tools;%VSINSTALLDIR%\Common7\Tools\bin;%FrameworkDir%\%Framework35Version%;%FrameworkDir%\%Framework35Version%\Microsoft .NET Framework 3.5 (Pre-Release Version);%FrameworkDir%\%FrameworkVersion%;%VCINSTALLDIR%\VCPackages;%PATH% @set INCLUDE=%VCINSTALLDIR%\ATLMFC\INCLUDE;%VCINSTALLDIR%\INCLUDE;%INCLUDE% @set LIB=%VCINSTALLDIR%\ATLMFC\LIB;%VCINSTALLDIR%\LIB;%LIB% @set LIBPATH=%FrameworkDir%\%Framework35Version%;%FrameworkDir%\%FrameworkVersion%;%VCINSTALLDIR%\ATLMFC\LIB;%VCINSTALLDIR%\LIB;%LIBPATH% ===== ---------- components: Distutils files: dist.patch keywords: patch messages: 67387 nosy: jkleckner severity: normal status: open title: VS8 include dirs grow without bound type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file10442/dist.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 21:56:48 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 26 May 2008 19:56:48 +0000 Subject: [issue2974] test_subprocess fails on Darwin In-Reply-To: <1211826399.44.0.0384568842407.issue2974@psf.upfronthosting.co.za> Message-ID: <1211831808.07.0.950055219518.issue2974@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> works for me status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 21:57:05 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 26 May 2008 19:57:05 +0000 Subject: [issue2791] subprocess.py leaks fd in communicate In-Reply-To: <1210249364.92.0.977353677692.issue2791@psf.upfronthosting.co.za> Message-ID: <1211831825.9.0.00831193398488.issue2791@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- assignee: -> gregory.p.smith keywords: +patch nosy: +gregory.p.smith versions: +Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 21:58:32 2008 From: report at bugs.python.org (Alan McIntyre) Date: Mon, 26 May 2008 19:58:32 +0000 Subject: [issue1622] zipfile hangs on certain zip files In-Reply-To: <1197595878.01.0.706002731675.issue1622@psf.upfronthosting.co.za> Message-ID: <1211831912.86.0.367164581397.issue1622@psf.upfronthosting.co.za> Alan McIntyre added the comment: Here's an updated patch (zipfile-patch-1622.diff). I didn't get around to separating the fixes for #1526 and #1746. All the tests (including test_zipfile64) pass after applying this patch. Added file: http://bugs.python.org/file10443/zipfile-patch-1622.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 22:07:01 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 26 May 2008 20:07:01 +0000 Subject: [issue2872] Remove commands for PEP 3108 In-Reply-To: <1210912647.86.0.565995912638.issue2872@psf.upfronthosting.co.za> Message-ID: <1211832421.08.0.77893610203.issue2872@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for adding the warnings, Benjamin. The docs for 2.6 still need to be updated about the rename/merge. I have replied to your commit with some comments. And I think the 2to3 fixer still needs to be done. Because of all this I am re-opening this issue. ---------- resolution: fixed -> status: closed -> open __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 22:23:01 2008 From: report at bugs.python.org (Thomas Heller) Date: Mon, 26 May 2008 20:23:01 +0000 Subject: [issue2976] test_pydoc fails in trunk In-Reply-To: <1211833381.06.0.61569848147.issue2976@psf.upfronthosting.co.za> Message-ID: <1211833381.06.0.61569848147.issue2976@psf.upfronthosting.co.za> New submission from Thomas Heller : Would be nice if this is fixed, since it is currently the only failing test on some windows buildbots. ---------- messages: 67390 nosy: theller severity: normal status: open title: test_pydoc fails in trunk versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 22:24:30 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 26 May 2008 20:24:30 +0000 Subject: [issue2791] subprocess.py leaks fd in communicate In-Reply-To: <1210249364.92.0.977353677692.issue2791@psf.upfronthosting.co.za> Message-ID: <1211833470.82.0.00920391752204.issue2791@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Thanks zanella. Fixed in 2.6 trunk r63724. I created a unit test based on jrosdahl's example code. I will backport it to release25-maint after it has baked in trunk for a bit. ---------- priority: -> low versions: -Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 22:37:49 2008 From: report at bugs.python.org (Hugh Myers) Date: Mon, 26 May 2008 20:37:49 +0000 Subject: [issue2977] truncation of text in tables in Library Reference PDF In-Reply-To: <1211834269.04.0.0744383580947.issue2977@psf.upfronthosting.co.za> Message-ID: <1211834269.04.0.0744383580947.issue2977@psf.upfronthosting.co.za> New submission from Hugh Myers : Pages: 81, 87, 88 and 89 all have tables that truncate the last column. ---------- assignee: georg.brandl components: Documentation messages: 67392 nosy: georg.brandl, hsmyers severity: normal status: open title: truncation of text in tables in Library Reference PDF type: performance versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 22:39:52 2008 From: report at bugs.python.org (Hugh Myers) Date: Mon, 26 May 2008 20:39:52 +0000 Subject: [issue2978] typo in text of page 80 of Library Reference PDF In-Reply-To: <1211834392.64.0.398728350153.issue2978@psf.upfronthosting.co.za> Message-ID: <1211834392.64.0.398728350153.issue2978@psf.upfronthosting.co.za> New submission from Hugh Myers : Page 80 of the 2.5 Library Reference has the text "easily write you own"; should be "easily write your own". ---------- assignee: georg.brandl components: Documentation messages: 67393 nosy: georg.brandl, hsmyers severity: normal status: open title: typo in text of page 80 of Library Reference PDF type: performance versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 22:40:46 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 26 May 2008 20:40:46 +0000 Subject: [issue2976] test_pydoc fails in trunk In-Reply-To: <1211833381.06.0.61569848147.issue2976@psf.upfronthosting.co.za> Message-ID: <1211834446.53.0.2319862915.issue2976@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 22:43:38 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 26 May 2008 20:43:38 +0000 Subject: [issue2978] typo in text of page 80 of Library Reference PDF In-Reply-To: <1211834392.64.0.398728350153.issue2978@psf.upfronthosting.co.za> Message-ID: <1211834618.47.0.966566682708.issue2978@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks! Fixed in r63726. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 23:12:41 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 26 May 2008 21:12:41 +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: <1211836361.46.0.372232172276.issue2451@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith priority: -> high __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 23:14:48 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Mon, 26 May 2008 21:14:48 +0000 Subject: [issue2872] Remove commands for PEP 3108 In-Reply-To: <1210912647.86.0.565995912638.issue2872@psf.upfronthosting.co.za> Message-ID: <1211836488.39.0.727904813259.issue2872@psf.upfronthosting.co.za> Changes by Quentin Gallet-Gilles : Removed file: http://bugs.python.org/file10415/commands_import_fixer.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 23:15:35 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Mon, 26 May 2008 21:15:35 +0000 Subject: [issue2872] Remove commands for PEP 3108 In-Reply-To: <1210912647.86.0.565995912638.issue2872@psf.upfronthosting.co.za> Message-ID: <1211836535.42.0.644129900445.issue2872@psf.upfronthosting.co.za> Quentin Gallet-Gilles added the comment: I've updated the 2to3 import fixer (mkarg/mk2arg not handled anymore). Added file: http://bugs.python.org/file10444/commands_import_fixer.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 23:17:31 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 26 May 2008 21:17:31 +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: <1211836651.1.0.00503095492342.issue2589@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Fixed in trunk r63728. There was a problem with the code on normal architectures as well. The input was a size_t while the output was an int. So an integer overflow could have happened going from the vsnprintf return value to the integer since size_t is unsigned and int isn't (also when size_t is a larger type than an int). I don't think that would lead to memory corruption when using the system's vsnprintf but it could have bad results if the caller expected str to be null terminated properly. I will backport this to release25-maint. ---------- priority: low -> normal title: PyOS_vsnprintf() potential integer overflow leads to memory corruption on esoteric architectures -> PyOS_vsnprintf() potential integer overflow leads to memory corruption __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 23:31:36 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 26 May 2008 21:31:36 +0000 Subject: [issue2872] Remove commands for PEP 3108 In-Reply-To: <1210912647.86.0.565995912638.issue2872@psf.upfronthosting.co.za> Message-ID: <1211837496.93.0.0186929742817.issue2872@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I've committed Quentin's 2to3 addition as r63729. ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 23:42:25 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 26 May 2008 21:42:25 +0000 Subject: [issue2957] recursion limit exceeded when importing .pyc module In-Reply-To: <1211626208.53.0.435870200974.issue2957@psf.upfronthosting.co.za> Message-ID: <1211838145.57.0.0212221780489.issue2957@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Corrected as r63731. Thanks for the report! ---------- resolution: -> fixed status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Mon May 26 23:54:11 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 26 May 2008 21:54:11 +0000 Subject: [issue2968] Test_imports takes a long time to run In-Reply-To: <1211728458.35.0.22936057327.issue2968@psf.upfronthosting.co.za> Message-ID: <1211838851.97.0.98076486034.issue2968@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- type: -> performance __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 00:10:26 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 26 May 2008 22:10:26 +0000 Subject: [issue2588] PyOS_vsnprintf() underflow leads to memory corruption In-Reply-To: <1207670110.11.0.605807538943.issue2588@psf.upfronthosting.co.za> Message-ID: <1211839826.15.0.29416585744.issue2588@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Fixed in trunk r63734 using Alexander's suggested fix. I will backport this to release25-maint. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 02:09:50 2008 From: report at bugs.python.org (Virgil Dupras) Date: Tue, 27 May 2008 00:09:50 +0000 Subject: [issue2979] use_datetime in SimpleXMLRPCServer In-Reply-To: <1211846989.94.0.031553096454.issue2979@psf.upfronthosting.co.za> Message-ID: <1211846989.94.0.031553096454.issue2979@psf.upfronthosting.co.za> New submission from Virgil Dupras : It seems strange to me that xmlrpclib.ServerProxy has a use_datetime argument, but not SimpleXMLRPCServer or CGIXMLRPCRequestHandler. I'm hereby submitting a patch to fix this. Sorry for the shaky testing (I only really test SimpleXMLRPCDispatcher), but trying to test at the SimpleXMLRPCServer level using the current http_server() scheme quickly became dirty, so I backed off. ---------- components: Library (Lib) files: SimpleXMLRPCServer_use_datetime.diff keywords: patch messages: 67400 nosy: vdupras severity: normal status: open title: use_datetime in SimpleXMLRPCServer type: feature request versions: Python 2.6 Added file: http://bugs.python.org/file10445/SimpleXMLRPCServer_use_datetime.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 02:10:06 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 27 May 2008 00:10:06 +0000 Subject: [issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data In-Reply-To: <1211069816.05.0.311102248623.issue2901@psf.upfronthosting.co.za> Message-ID: <1211847006.25.0.0588132551762.issue2901@psf.upfronthosting.co.za> Gregory P. Smith added the comment: First and foremost: do not use XML for bulk data transport. It is HORRIBLY inefficient. I've been playing with this on Linux and OS X with various (trunk 2.6, release25-maint and 2.5.2) pythons: I was never able to reproduce the malloc failures on my systems, testing with data sizes up to 100mb. It likely takes a specific set of conditions to reproduce exactly that problem but I do understand how it could happen. Anyways one -likely- source of such problems was the socket module _fileobject.recv() code's long lived over-allocated+realloced strings. This was "fixed" in release25-maint [to become 2.5.3] (actually it caused a perf regression in other code) and the fix was fixed to solve the perf regression in trunk and will be backported... Too much history to sum up there. See http://bugs.python.org/issue2632 and the older issues it links to for details. I cannot claim that the above solves this problem because the bulk of the actual memory used is the XML parser's fault: Instrumenting the SimpleXMLRPCServer do_POST code I see the following: The majority of the memory bloat to handle a request (bloat appears to be 5-10x the size of the Binary data blob in question!) comes from the XML parser called by xmlrpclib.loads() from SimpleXMLRPCServer's _marshaled_dispatch() method. Why? Its XML. On top of that it is not being parsed and decoded as a stream. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 02:11:14 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 27 May 2008 00:11:14 +0000 Subject: [issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data In-Reply-To: <1211069816.05.0.311102248623.issue2901@psf.upfronthosting.co.za> Message-ID: <1211847074.1.0.799265988967.issue2901@psf.upfronthosting.co.za> Gregory P. Smith added the comment: hwaara: can you try your test code on the systems where you can reproduce this problem using the most recent Python 2.6 alpha release to see if the mmap errors still happen? __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 02:38:29 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 27 May 2008 00:38:29 +0000 Subject: [issue2613] inconsistency with bare * in parameter list In-Reply-To: <1207903370.95.0.0868464301565.issue2613@psf.upfronthosting.co.za> Message-ID: <1211848709.05.0.331058880367.issue2613@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Guido, what do you say? ---------- assignee: -> gvanrossum nosy: +benjamin.peterson, gvanrossum __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 03:31:53 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 27 May 2008 01:31:53 +0000 Subject: [issue2351] Using __(get|set|del)slice__ needs a Py3K warning In-Reply-To: <1205781950.27.0.373262403041.issue2351@psf.upfronthosting.co.za> Message-ID: <1211851913.48.0.334831524924.issue2351@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Here's a much better patch that does warn with old-style classes. ---------- assignee: -> georg.brandl nosy: +georg.brandl Added file: http://bugs.python.org/file10446/slice_methods_py3kwarn2.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 08:55:23 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 27 May 2008 06:55:23 +0000 Subject: [issue1410739] Add notes to the manual about `is` and methods Message-ID: <1211871323.84.0.384261294167.issue1410739@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> georg.brandl nosy: +georg.brandl _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 27 08:58:17 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 27 May 2008 06:58:17 +0000 Subject: [issue1174614] site enhancements Message-ID: <1211871497.74.0.633456494769.issue1174614@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: open -> closed _____________________________________ Tracker _____________________________________ From report at bugs.python.org Tue May 27 10:06:53 2008 From: report at bugs.python.org (=?utf-8?q?H=C3=A5kan_Waara?=) Date: Tue, 27 May 2008 08:06:53 +0000 Subject: [issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data In-Reply-To: <1211069816.05.0.311102248623.issue2901@psf.upfronthosting.co.za> Message-ID: <1211875613.11.0.861720115472.issue2901@psf.upfronthosting.co.za> H?kan Waara added the comment: I'll try to test this. Are there pre-built binaries for 2.6 alpha, or will I need to compile it myself? __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 10:46:29 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 27 May 2008 08:46:29 +0000 Subject: [issue2613] inconsistency with bare * in parameter list In-Reply-To: <1207903370.95.0.0868464301565.issue2613@psf.upfronthosting.co.za> Message-ID: <1211877989.16.0.710905414974.issue2613@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Agreed with Buck and Mark, this looks like a bug. Or, rather, a limitation, since a bare * just before a **kwargs should be useless if I understand correctly. ---------- nosy: +pitrou __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 14:31:46 2008 From: report at bugs.python.org (Adrian M) Date: Tue, 27 May 2008 12:31:46 +0000 Subject: [issue2940] Building Python fails on SunOS In-Reply-To: <1211447814.19.0.559318035687.issue2940@psf.upfronthosting.co.za> Message-ID: <1211891506.62.0.0817044965672.issue2940@psf.upfronthosting.co.za> Adrian M added the comment: Thanks for the tip, Martin: on this server there are two gcc's installed: 2.6.3 in /usr/GNU and 3.4.2 in /usr/local. After setting the PATH to point to /usr/local/bin the 'configure' and the 'make' steps have completed successfully . Now there is just one more problem: $ make install Creating directory /home/am/usr/bin mkdir: Failed to make directory "/home/am"; Operation not applicable mkdir: Failed to make directory "/home/am/usr"; No such file or directory mkdir: Failed to make directory "/home/am/usr/bin"; No such file or directory Creating directory /home/am/usr/lib mkdir: Failed to make directory "/home/am"; Operation not applicable mkdir: Failed to make directory "/home/am/usr"; No such file or directory mkdir: Failed to make directory "/home/am/usr/lib"; No such file or directory make: *** [altbininstall] Error 2 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 14:38:17 2008 From: report at bugs.python.org (Adrian M) Date: Tue, 27 May 2008 12:38:17 +0000 Subject: [issue2940] Building Python fails on SunOS In-Reply-To: <1211447814.19.0.559318035687.issue2940@psf.upfronthosting.co.za> Message-ID: <1211891897.02.0.470574924245.issue2940@psf.upfronthosting.co.za> Changes by Adrian M : Removed file: http://bugs.python.org/file10397/config_logs.zip __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 14:40:14 2008 From: report at bugs.python.org (Adrian M) Date: Tue, 27 May 2008 12:40:14 +0000 Subject: [issue2940] Building Python fails on SunOS In-Reply-To: <1211447814.19.0.559318035687.issue2940@psf.upfronthosting.co.za> Message-ID: <1211892014.78.0.768337660481.issue2940@psf.upfronthosting.co.za> Adrian M added the comment: Problem solved ! (the make install problem was because i was trying to use a wrong --prefix directory) __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 14:56:00 2008 From: report at bugs.python.org (atsuo ishimoto) Date: Tue, 27 May 2008 12:56:00 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1211892960.41.0.615378517227.issue2630@psf.upfronthosting.co.za> atsuo ishimoto added the comment: I updated a patch as per latest PEP. - io.TextIOWrapper doesn't provide API to change error handler at this time. I should update this patch after the API is provided. - This patch contains a fix for Tools/unicode/makeunicodedata.py in rev 63378. Added file: http://bugs.python.org/file10447/diff4.txt __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 17:38:15 2008 From: report at bugs.python.org (Haukur Hreinsson) Date: Tue, 27 May 2008 15:38:15 +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: <1211902695.6.0.958731947697.issue2980@psf.upfronthosting.co.za> New submission from Haukur Hreinsson : I'm not sure if this is a functionality or documentation bug. The docs say in section 13.1.2, Data stream format (http://docs.python.org/lib/node315.html): "By default, the pickle data format uses a printable ASCII representation." I took that to mean that only ASCII characters ever appear in the pickle output, but that's not true. >>> print [ord(c) for c in pickle.dumps(u'?')] [86, 225, 10, 112, 48, 10, 46] ---------- assignee: georg.brandl components: Documentation, Library (Lib) messages: 67410 nosy: Mawbid, georg.brandl severity: normal status: open title: Pickle stream for unicode object may contain non-ASCII characters. type: feature request versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 17:56:10 2008 From: report at bugs.python.org (Yu LI) Date: Tue, 27 May 2008 15:56:10 +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: <1211903770.4.0.523120419892.issue2981@psf.upfronthosting.co.za> New submission from Yu LI : As documented, build in module struct has two format for string objects, such as 's' 'p'. They suggest following actions >>> struct.pack('5s', 'hello') 'hello' >>> struct.pack('6p', 'hello') '\x05hello' However, the second action really confuses people. In the documentation: the "p" format character encodes a "Pascal string", meaning a short variable-length string stored in a fixed number of bytes. So people naturally assumes following action >>> struct.pack('p', 'hello') '\x05hello' which makes more sense. Otherwise, why people should use format 'p'? Either when you struct.pack or struct.unpack you have to know the size of string at first, why not turn to format 's'? Also the the bigger number (6) before 'p' makes people confuse. Why should it be string size + 1? If we know there is a padding character and the string size, why not struct.unpack('x5s', abuf) instead? So the suggestion is to modify the behavior of format string 'p' to be the same as people's intuition. In detail, the actions should be >>> s = struct.pack('p', 'hello') '\x05hello' >>> struct.unpack('p', s) ('hello',) And also these actions should be consist with struct.pack_into and struct.unpack_from ---------- components: Library (Lib) messages: 67411 nosy: liyu severity: normal status: open title: confusing action of struct.pack and struct.unpack with fmt 'p' type: behavior versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 18:27:08 2008 From: report at bugs.python.org (Maciek Fijalkowski) Date: Tue, 27 May 2008 16:27:08 +0000 Subject: [issue2982] more tests for pyexpat In-Reply-To: <1211905628.44.0.670797216201.issue2982@psf.upfronthosting.co.za> Message-ID: <1211905628.44.0.670797216201.issue2982@psf.upfronthosting.co.za> New submission from Maciek Fijalkowski : pyexpat tests are a bit erratic. For example, there is no single test for handlers for: NotStandalone, StartDoctypeDecl, EndDoctypeDecl, EntityDecl, XmlDecl, ElementDecl, AttlistDecl, SkippedEntity. There is also not a single test for error handling working correctly. Cheers, fijal ---------- components: Tests messages: 67412 nosy: fijal, therve severity: normal status: open title: more tests for pyexpat type: behavior versions: Python 2.6 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 18:32:07 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 27 May 2008 16:32:07 +0000 Subject: [issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data In-Reply-To: <1211069816.05.0.311102248623.issue2901@psf.upfronthosting.co.za> Message-ID: <1211905927.09.0.727924757823.issue2901@psf.upfronthosting.co.za> Gregory P. Smith added the comment: There are no prebuilt binaries for OS X, just download the latest source tarball from here and build it: http://python.org/download/releases/2.6/ Thanks for testing. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 19:08:56 2008 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 27 May 2008 17:08:56 +0000 Subject: [issue2613] inconsistency with bare * in parameter list In-Reply-To: <1207903370.95.0.0868464301565.issue2613@psf.upfronthosting.co.za> Message-ID: <1211908136.26.0.808395316818.issue2613@psf.upfronthosting.co.za> Guido van Rossum added the comment: I see it differently. The rule is simply that if you use a bare * you *must* follow it with at least one argument (that's not **k). This makes sense since otherwise the * is redundant. Think about it; there is nothing different between def g(*, **kwds): ... and def g(**kwds): ... ---------- resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 19:26:10 2008 From: report at bugs.python.org (Buck Golemon) Date: Tue, 27 May 2008 17:26:10 +0000 Subject: [issue2613] inconsistency with bare * in parameter list In-Reply-To: <1207903370.95.0.0868464301565.issue2613@psf.upfronthosting.co.za> Message-ID: <1211909169.95.0.943460360175.issue2613@psf.upfronthosting.co.za> Buck Golemon added the comment: If there's no difference then they should work the same? I agree there's probably little value in 'fixing' it. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 19:30:13 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Tue, 27 May 2008 17:30:13 +0000 Subject: [issue2877] Backport UserString move from 3.0 In-Reply-To: <1210913405.95.0.573859631329.issue2877@psf.upfronthosting.co.za> Message-ID: <1211909413.83.0.0126023409668.issue2877@psf.upfronthosting.co.za> Quentin Gallet-Gilles added the comment: I only see UserString in the collections module. Has MutableString been removed in 3.0 ? ---------- nosy: +quentin.gallet-gilles __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 19:39:05 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Tue, 27 May 2008 17:39:05 +0000 Subject: [issue2878] Backport UserList move in 3.0 In-Reply-To: <1210913470.53.0.764611269723.issue2878@psf.upfronthosting.co.za> Message-ID: <1211909945.43.0.158069845312.issue2878@psf.upfronthosting.co.za> Quentin Gallet-Gilles added the comment: Attaching a patch for the import fixer of UserList. ---------- keywords: +patch nosy: +quentin.gallet-gilles Added file: http://bugs.python.org/file10448/userlist_import_fixer.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 19:52:28 2008 From: report at bugs.python.org (safe alattar) Date: Tue, 27 May 2008 17:52:28 +0000 Subject: [issue1948] Cant open python gui using VISTA In-Reply-To: <1211474016.91.0.877876049776.issue1948@psf.upfronthosting.co.za> Message-ID: safe alattar added the comment: still cant get it to work On Thu, May 22, 2008 at 9:33 AM, Kurt B. Kaiser wrote: > > Kurt B. Kaiser added the comment: > > No response from OP, closing. > > ---------- > resolution: -> works for me > status: open -> closed > > __________________________________ > Tracker > > __________________________________ > Added file: http://bugs.python.org/file10449/unnamed __________________________________ Tracker __________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Tue May 27 19:57:12 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 27 May 2008 17:57:12 +0000 Subject: [issue2983] Ttk support for Tkinter In-Reply-To: <1211911032.63.0.360625687085.issue2983@psf.upfronthosting.co.za> Message-ID: <1211911032.63.0.360625687085.issue2983@psf.upfronthosting.co.za> New submission from Guilherme Polo : Hello, this issue could be considered an extension of issue2618 and maybe I should have continued there but.. continuing, I'm proposing the inclusion of a ttk module (should be renamed to Ttk for python 2.x) that would fit inside lib-tk or the new tkinter package. This is a wrapper for the new themed widget set included with Tk 8.5, which will also work if you have the tile package installed and an older Tk version (I tested with Tk 8.4 only). The code and docs are at: http://svn.python.org/view/sandbox/trunk/ttk-gsoc/ ---------- components: Tkinter messages: 67419 nosy: gpolo severity: normal status: open title: Ttk support for Tkinter versions: Python 2.5, Python 2.6, Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 20:05:12 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 27 May 2008 18:05:12 +0000 Subject: [issue2877] Backport UserString move from 3.0 In-Reply-To: <1210913405.95.0.573859631329.issue2877@psf.upfronthosting.co.za> Message-ID: <1211911512.43.0.467651192181.issue2877@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Yes. __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 20:10:41 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 27 May 2008 18:10:41 +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: <1211911840.92.0.754351237434.issue2980@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Only pickle protocol 0 is ASCII. The other two are binary protocols. Protocol 2 is default in Python 2.5. This should probably be made clear in the documentation, so I'd consider this a documentation bug. ---------- nosy: +lemburg __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 20:20:37 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 27 May 2008 18:20:37 +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: <1211912437.68.0.151339793162.issue2980@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Actually, I was wrong: protocol 0 is the default if you don't specify the protocol. This set the binary flag to false, which should result in ASCII-only data. The Unicode save routine uses the raw-unicode-escape codec, but this only escapes non-Latin-1 characters and allows non-ASCII Latin-1 character to pass through. Not sure what to do about this: we can't change the protocol anymore and all higher protocol levels are binary already. Perhaps we just need to remove the ASCII note from the documentation altogether and only leave the "human readbable form" comment ?! __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 20:31:59 2008 From: report at bugs.python.org (Ismail Donmez) Date: Tue, 27 May 2008 18:31:59 +0000 Subject: [issue2984] test_dbm fails on Darwin In-Reply-To: <1211913119.29.0.969619534727.issue2984@psf.upfronthosting.co.za> Message-ID: <1211913119.29.0.969619534727.issue2984@psf.upfronthosting.co.za> New submission from Ismail Donmez : test test_dbm failed -- Traceback (most recent call last): File "/Users/cartman/Sources/py3k/Lib/test/test_dbm.py", line 121, in test_whichdb self.assertEqual(name, dbm.whichdb(_fname)) AssertionError: 'dbm.gnu' != 'dbm.ndbm' This happened after the dbm unification that happened due to stdlib re- organization. ---------- components: Tests messages: 67423 nosy: cartman severity: normal status: open title: test_dbm fails on Darwin type: behavior versions: Python 3.0 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 20:38:50 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 27 May 2008 18:38:50 +0000 Subject: [issue2940] Building Python fails on SunOS In-Reply-To: <1211447814.19.0.559318035687.issue2940@psf.upfronthosting.co.za> Message-ID: <1211913530.47.0.860692300321.issue2940@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Closing the report as "invalid" then (and I strongly recommend to remove gcc 2.6.3 right away. It obviously cannot be used to compile software on your system). ---------- resolution: -> invalid status: open -> closed __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 21:12:42 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 27 May 2008 19:12:42 +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: <1211915562.47.0.446809898254.issue2980@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think the documentation is fine as it stands. The format is ASCII - even though the payload might not be. ---------- nosy: +loewis __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 21:26:50 2008 From: report at bugs.python.org (Riku Lindblad) Date: Tue, 27 May 2008 19:26:50 +0000 Subject: [issue2985] xmlrpclib doesn't support 64bit integer replies In-Reply-To: <1211916410.6.0.0284106941576.issue2985@psf.upfronthosting.co.za> Message-ID: <1211916410.6.0.0284106941576.issue2985@psf.upfronthosting.co.za> New submission from Riku Lindblad : When querying a XML-RPC server that returns a 64 bit integer, the python interface always returns an empty tuple. When running with verbose=True the response is still intact, the library just can't parse the result between the tags. Example response: body: '\r\n\r\n\r\n1157\r\n\r\n\r\n' ---------- components: Library (Lib) messages: 67426 nosy: shrike severity: normal status: open title: xmlrpclib doesn't support 64bit integer replies versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 21:36:23 2008 From: report at bugs.python.org (Riku Lindblad) Date: Tue, 27 May 2008 19:36:23 +0000 Subject: [issue2985] xmlrpclib doesn't support 64bit integer replies In-Reply-To: <1211916410.6.0.0284106941576.issue2985@psf.upfronthosting.co.za> Message-ID: <1211916983.9.0.0396677080946.issue2985@psf.upfronthosting.co.za> Riku Lindblad added the comment: I attached a patch that seems to fix the problem, needs proper testing though. ---------- keywords: +patch Added file: http://bugs.python.org/file10450/xmlrpclib-64bitsupport.diff __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 22:30:00 2008 From: report at bugs.python.org (Nate) Date: Tue, 27 May 2008 20:30:00 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> New submission from Nate : The following code shows no matches though the strings clearly match. from difflib import * a = '''3904320338155955662857322172779218727992471109386112515279452352973279311752006856588512503244702012502812653160306927721351031250270279878152125021081471125246894603319162986283456469448293252335442814953964029718671705515246437056879456095915444174665464026255415736754542680178373675412998898571410483714801783736754144828361714801783736754133068408714801783736754140859665714801783736754153851004471480178373675415715864371410690714801783736754147488890714801783736205957668017837367545448801783104170539154677705102536314736754477780178373675415217103227148017837367541737811137714801783736754172791151671480178373675417692995271480178373675417575983571480178373675417398965871480178310417055026467770551235573705687945609591544562532964082675415736300610425832914520311514810301595721999571547897879113780178373618951021983280377781981989237498913678981414213198924949892679989164882577810944751102884217048258978791137801783104170511836542073627327981801279360326159714801783736171798080178310415420736447510213871790638471586131412631592131012571210126718031314200414571314893700123874777987006697747115770067074789312578013869801783104120529166337056879456095918495136604565251349544838956219513495753741344870733943253617458316356794745831634651172458316348316144586052838244151360641656349118903581890331689038658903263218549028909605134957536316060''' b = '''4634320338155955662857322172779218727992471109386112515279452352973279311752006856588512503244702012502812653160306927721351031250270279878152125021081471125246894603319162986283456469448293252335442814953964029718671705515246437056879456095915444174665464026255415736754542680178373675412998898571410483714801783736754144828361714801783736754133068408714801783736754140859665714801783736754153851004471480178373675415715864371410690714801783736754147488890714801783736205957668017837367545448801783104170539154677705102536314736754477780178373675413182108117148017837367541737811137714801783736754172791151671480178373675417692995271480178373675417575983571480178373675417398965871480178310417055026467770551235573705687945609591544562532964082675415736300610425832914520311514810301595721999571547897879113780178373618951021983280377781981989237498913678981414213198924949892679989164882577810944751102884217048258978791137801783104170511836542073627327981801279360326159714801783736171798080178310415420736447510213871790638471412131420041457131485122165131466702097131466731723131466741536131466751581131466771649131466761975131467212090131467261974131467231858131467201556131467212538131467221553131467221943131467231748131466711452131467271787131412578013869801783104154307361718482280178373638585436251621338931320893185072980138084820801545115716861861152948618615002682261422349251058108327767521397977810837298017831041205291663370568794560959184951366045652513495448389562195134957537413448707339432536174583163''' lst = [(a,b)] for a, b in lst: print "---------------------------" s = SequenceMatcher(None, a, b) print "length of a is %d" % len(a) print "length of b is %d" % len(b) print s.find_longest_match(0, len(a), 0, len(b)) print s.ratio() for block in s.get_matching_blocks(): m = a[block[0]:block[0]+block[2]] print "a[%d] and b[%d] match for %d elements and it is \"%s\"" % (block[0], block[1], block[2], m) ---------- components: Extension Modules messages: 67428 nosy: hagna severity: normal status: open title: difflib.SequenceMatcher not matching long sequences versions: Python 2.5 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 22:31:18 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 27 May 2008 20:31:18 +0000 Subject: [issue2394] [Py3k] Finish the memoryview object implementation In-Reply-To: <1205855988.24.0.314040259236.issue2394@psf.upfronthosting.co.za> Message-ID: <1211920278.1.0.0965256792902.issue2394@psf.upfronthosting.co.za> Georg Brandl added the comment: Raising priority. ---------- assignee: -> teoliphant nosy: +georg.brandl priority: -> critical __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 22:40:38 2008 From: report at bugs.python.org (Hans Ulrich Niedermann) Date: Tue, 27 May 2008 20:40:38 +0000 Subject: [issue2987] RFC2732 support for urlparse (e.g. http://[::1]:80/) In-Reply-To: <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za> Message-ID: <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za> New submission from Hans Ulrich Niedermann : The urlparse module's ways of splitting the location into hostname and port breaks with RFC2732 style URIs with IPv6 addresses in them: >>> import urlparse >>> urlparse.urlparse('http://[::1]:80/').hostname '[' >>> urlparse.urlparse('http://[::1]:80/').port Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.5/urlparse.py", line 116, in port return int(port, 10) ValueError: invalid literal for int() with base 10: ':1]:80' >>> A simple fix is attached, but probably requires a little more thought. ---------- components: Library (Lib) files: python-urlparse-rfc2732-fix.patch keywords: patch messages: 67430 nosy: ndim severity: normal status: open title: RFC2732 support for urlparse (e.g. http://[::1]:80/) type: feature request versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file10451/python-urlparse-rfc2732-fix.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 22:41:32 2008 From: report at bugs.python.org (Hans Ulrich Niedermann) Date: Tue, 27 May 2008 20:41:32 +0000 Subject: [issue2987] RFC2732 support for urlparse (e.g. http://[::1]:80/) In-Reply-To: <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za> Message-ID: <1211920892.2.0.485921654736.issue2987@psf.upfronthosting.co.za> Changes by Hans Ulrich Niedermann : Added file: http://bugs.python.org/file10452/python-urlparse-rfc2732-rfc-list.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 22:42:08 2008 From: report at bugs.python.org (Hans Ulrich Niedermann) Date: Tue, 27 May 2008 20:42:08 +0000 Subject: [issue2987] RFC2732 support for urlparse (e.g. http://[::1]:80/) In-Reply-To: <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za> Message-ID: <1211920928.36.0.332494033895.issue2987@psf.upfronthosting.co.za> Changes by Hans Ulrich Niedermann : Added file: http://bugs.python.org/file10453/python-urlparse-rfc2732-test.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 22:47:34 2008 From: report at bugs.python.org (Hans Ulrich Niedermann) Date: Tue, 27 May 2008 20:47:34 +0000 Subject: [issue2987] RFC2732 support for urlparse (e.g. http://[::1]:80/) In-Reply-To: <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za> Message-ID: <1211921254.45.0.541702925928.issue2987@psf.upfronthosting.co.za> Hans Ulrich Niedermann added the comment: I have written this patch because urlparse could not retrieve the hostname or port components of URIs such as http://[::ffff:192.168.13.37]/ or http://[dead:beef::1]:8888/ This problem happens with Python 2.5.1 in Fedora 9, and I have also found it in Python's SVN trunk/ and release25-maint/ source code. It still needs some polishing and thinking: See the places marked FIXME, but probably also others. One would not want an inconsistent API feel with respect to IPv6 address handling. Might require some more comprehensive thought about how Python wants to handle networks other-than-IPv4, exceeding the scope of a simple patch to urlparse.py. On a not-totally-unrelated note, someone should examine whether IRIs[1] can fit into urlparse.py, or whether they need e.g. a separate iriparse.py with an adapted API. [1] RFC 3987 - Internationalized Resource Identifiers (IRIs) M. Duerst, M. Suignard, January 2005 __________________________________ Tracker __________________________________ From report at bugs.python.org Tue May 27 23:13:28 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 27 May 2008 21:13:28 +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: <1211922808.59.0.60058169902.issue2980@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: I can't follow you, Martin. How can a data format be printable ASCII and at the same time use non-ASCII characters ? __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 28 00:09:45 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Tue, 27 May 2008 22:09:45 +0000 Subject: [issue2877] Backport UserString move from 3.0 In-Reply-To: <1210913405.95.0.573859631329.issue2877@psf.upfronthosting.co.za> Message-ID: <1211926185.3.0.492993326351.issue2877@psf.upfronthosting.co.za> Quentin Gallet-Gilles added the comment: Attaching a patch for the deprecation warning in 2.6 of the MutableString class. The import fixer for 2to3 is coming next. ---------- keywords: +patch Added file: http://bugs.python.org/file10454/userstring_2.6.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 28 00:09:57 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Tue, 27 May 2008 22:09:57 +0000 Subject: [issue2877] Backport UserString move from 3.0 In-Reply-To: <1210913405.95.0.573859631329.issue2877@psf.upfronthosting.co.za> Message-ID: <1211926197.55.0.509839705288.issue2877@psf.upfronthosting.co.za> Changes by Quentin Gallet-Gilles : Added file: http://bugs.python.org/file10455/userstring_import_fixer.patch __________________________________ Tracker __________________________________ From report at bugs.python.org Wed May 28 00:21:32 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 27 May 2008 22:21:32 +0000 Subject: [issue2980] Pickle stream for unicode object may contain non-ASCII characters. In-Reply-To: <1211922808.59.0.60058169902.issue2980@psf.upfronthosting.co.za> Message-ID: <483C8968.8040602@v.loewis.de> Martin v. L?wis added the comment: > How can a data format be printable ASCII and at the same time use > non-ASCII characters ? The "format" is the frame defining the structure. In the binary formatter, it's a binary format. In the standard pickle format, it's ASCII (I for int, S for string, and so on, line-separated). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 00:26:29 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 27 May 2008 22:26:29 +0000 Subject: [issue2877] Backport UserString move from 3.0 In-Reply-To: <1210913405.95.0.573859631329.issue2877@psf.upfronthosting.co.za> Message-ID: <1211927189.27.0.963919129177.issue2877@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Nice patch. Thanks. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 00:41:32 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 27 May 2008 22:41:32 +0000 Subject: [issue2980] Pickle stream for unicode object may contain non-ASCII characters. In-Reply-To: <483C8968.8040602@v.loewis.de> Message-ID: <483C8E17.90903@egenix.com> Marc-Andre Lemburg added the comment: On 2008-05-28 00:21, Martin v. L?wis wrote: > Martin v. L?wis added the comment: > >> How can a data format be printable ASCII and at the same time use >> non-ASCII characters ? > > The "format" is the frame defining the structure. In the binary > formatter, it's a binary format. In the standard pickle format, > it's ASCII (I for int, S for string, and so on, line-separated). I think there's a misunderstanding there. The pickle version 0 output used to be 7-bit only for both type code and content. While adding the Unicode support I must have forgotten about the fact that raw-unicode-escape does not escape range(128, 256) code points. Unfortunately, there's no way to fix this now, since the bug has been around since Python 1.6. That's why I think we should update the docs. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 00:56:19 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 27 May 2008 22:56:19 +0000 Subject: [issue2980] Pickle stream for unicode object may contain non-ASCII characters. In-Reply-To: <483C8E17.90903@egenix.com> Message-ID: <483C918B.5000705@v.loewis.de> Martin v. L?wis added the comment: > Unfortunately, there's no way to fix this now, since the > bug has been around since Python 1.6. Actually, there is a way to fix that: pickle could start emitting \u escapes for characters in the range 128..256. Older pickle implementations would be able to read that in just fine. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 09:35:58 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Wed, 28 May 2008 07:35:58 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1211960158.17.0.506686165196.issue2898@psf.upfronthosting.co.za> Robert Schuppenies added the comment: I tried to implement a magic method __sizeof__() for the type object which should be callable for type objects and type itself. But calling __sizeof__ results in an error message >>> type.__sizeof__() Traceback (most recent call last): File "", line 1, in TypeError: descriptor '__sizeof__' of 'type' object needs an argument Debugging it I found that type_getattro will (1) look for the attribute in the metatype, (2) look in tp_dict of this type, and (3) use the descriptor from the metatype. I actually want it to perform (3), but since type is its own metatype (2) will be triggered. This then results in the need for an argument. The same behavior occurs for all type instances, i.e. classes. Is my understanding correct? How would it be possible to invoke __sizeof__() on the type 'type' and not on the object 'type'? My first approach did the same for object, that is a magic __sizeof__() method linked to object, but it gets ignored when invoked on classes or types. Now from my understanding everything is an object, thus also classes and types. isinstance seems to agree with me >>> >>> isinstance(int, object) True Any suggestions on that? thanks, robert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 09:39:39 2008 From: report at bugs.python.org (Atsuo Ishimoto) Date: Wed, 28 May 2008 07:39:39 +0000 Subject: [issue2630] repr() should not escape non-ASCII characters In-Reply-To: <1208166864.02.0.788613602223.issue2630@psf.upfronthosting.co.za> Message-ID: <1211960379.28.0.217837379893.issue2630@psf.upfronthosting.co.za> Atsuo Ishimoto added the comment: docdiff1.txt contains a documentation for functions I added. Added file: http://bugs.python.org/file10456/docdiff1.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 09:48:16 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 28 May 2008 07:48:16 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1211960896.95.0.657422293565.issue2898@psf.upfronthosting.co.za> Georg Brandl added the comment: You probably just need to make the method a class method -- see METH_CLASS. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 10:13:55 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Wed, 28 May 2008 08:13:55 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1211962435.57.0.544773555856.issue2898@psf.upfronthosting.co.za> Robert Schuppenies added the comment: thanks, that did the trick. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 10:31:25 2008 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 28 May 2008 08:31:25 +0000 Subject: [issue2988] Invalid cookies crash web applications In-Reply-To: <1211963484.7.0.388679808819.issue2988@psf.upfronthosting.co.za> Message-ID: <1211963484.7.0.388679808819.issue2988@psf.upfronthosting.co.za> New submission from anatoly techtonik : Current BaseCookie and SimpleCookie may crash web-application when running on the same domain with other scripts. Other scripts may create invalid cookies that lead to Cookie.CookieError: Illegal key value in Python. This created problems in: trac: http://trac.edgewall.org/ticket/2256 mailman: http://bugs.python.org/issue472646 roundup: http://svn.python.org/view/tracker/roundup-src/roundup/cgi/client.py?rev=61320&r1=61200&r2=61320 Test case consists of two scripts - one in PHP and one in Python where the former crashes the latter when run on the same domain through IE6: ------[cookie.php] ------------------ ------[cookie.py]- #!/usr/bin/env python import Cookie from os import environ as env C = Cookie.SimpleCookie() C["CUX2"] = 123 C["CUX2"]['expires'] = 60*60*60 print "Content-Type: text/html" print C print # blank line, end of headers print env["HTTP_COOKIE"] G = Cookie.SimpleCookie(env["HTTP_COOKIE"]) print "
Next: " print G ------------------ What would be the pythonic way to avoid people making their own wrappers when stumbling upon the problem? 1. Patch *Cookie classes to display warning about invalid Cookie and continue instead of crashing with CookieError 2. Add SilentCookie that ignores invalid Cookies 3. Patch BaseCookie.load method to include optional attribute to ignore errors. Should it be turned on by default (like in roundup code above) 4. Add warning to BaseCookie.load documentation about the pitfall and the need to catch CookieError here http://docs.python.org/dev/library/cookie.html#Cookie.BaseCookie.load ---------- components: Extension Modules messages: 67443 nosy: techtonik severity: normal status: open title: Invalid cookies crash web applications versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 10:09:38 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 28 May 2008 08:09:38 +0000 Subject: [issue1948] Cant open python gui using VISTA In-Reply-To: <1201462739.88.0.734539859059.issue1948@psf.upfronthosting.co.za> Message-ID: <1211962178.68.0.0493278595852.issue1948@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Please open a Command Prompt, and run the script: c:\Python25\Lib\idlelib\idle.py Do you see any error message there? ---------- nosy: +amaury.forgeotdarc resolution: works for me -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 12:52:39 2008 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 28 May 2008 10:52:39 +0000 Subject: [issue2989] type_modified() in typeobject.c should be public In-Reply-To: <1211971959.25.0.491588550226.issue2989@psf.upfronthosting.co.za> Message-ID: <1211971959.25.0.491588550226.issue2989@psf.upfronthosting.co.za> New submission from Stefan Behnel : Here is a patch that makes this function public. This allows C code to correctly taint a type after updating its attributes or base classes. ---------- components: Interpreter Core files: pytype_modified.patch keywords: patch messages: 67444 nosy: scoder severity: normal status: open title: type_modified() in typeobject.c should be public type: feature request versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10457/pytype_modified.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 13:07:18 2008 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 28 May 2008 11:07:18 +0000 Subject: [issue2990] type cache updates might run cleanup code in an inconsistent state In-Reply-To: <1211972838.31.0.400694776413.issue2990@psf.upfronthosting.co.za> Message-ID: <1211972838.31.0.400694776413.issue2990@psf.upfronthosting.co.za> New submission from Stefan Behnel : Similar to the "decref before set" issue solved by Py_CLEAR(), the code in typeobject.c calls DECREF in the middle of a cache update. This leaves one cache entry in an invalid state during the DECREF call, which might result in running cleanup code in this state. If this code depends on an attribute lookup, this might lead to a cache lookup, which in turn can access the infected part of the cache. In the worst case, such a scenario can lead to a crash as it accesses an already cleaned-up object. Here is a patch that fixes this. ---------- components: Interpreter Core files: possible-decref-before-set-fix.patch keywords: patch messages: 67445 nosy: scoder severity: normal status: open title: type cache updates might run cleanup code in an inconsistent state type: behavior versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file10458/possible-decref-before-set-fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 13:21:55 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 28 May 2008 11:21:55 +0000 Subject: [issue2989] type_modified() in typeobject.c should be public In-Reply-To: <1211971959.25.0.491588550226.issue2989@psf.upfronthosting.co.za> Message-ID: <1211973715.45.0.420691470449.issue2989@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed r63757. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 15:38:48 2008 From: report at bugs.python.org (Mark Summerfield) Date: Wed, 28 May 2008 13:38:48 +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: <1211981927.99.0.906667705305.issue2636@psf.upfronthosting.co.za> Mark Summerfield added the comment: AFAIK if you have a regex with named capture groups there is no direct way to relate them to the capture group numbers. You could do (untested; Python 3 syntax): d = {v: k for k, v in match.groupdict()} for i in range(match.lastindex): print(i, match.group(i), d[match.group(i)]) One possible solution would be a grouptuples() function that returned a tuple of 3-tuples (index, name, captured_text) with the name being None for unnamed groups. Anyway, good luck with all your improvements, I will be especially glad if you manage to do (2) and (8) (and maybe (3)). ---------- nosy: +mark _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 15:57:26 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Wed, 28 May 2008 13:57:26 +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: <1211983046.65.0.24370693459.issue2636@psf.upfronthosting.co.za> Jeffrey C. Jacobs added the comment: Mark scribbled: > One possible solution would be a grouptuples() function that returned > a tuple of 3-tuples (index, name, captured_text) with the name being > None for unnamed groups. Hmm. Well, that's not a bad idea at all IMHO and would, AFAICT probably be easier to do than (2) but I would still do (2) but will try to add that to one of the existing items or spawn another item for it since it is kind of a distinct feature. My preference right now is to finish off the test cases for (7) because it is already coded, then finish the work on (1) as that was the original reason for modification then on to (2) then (3) as they are related and then I don't mind tackling (8) because I think that one shouldn't be too hard. Interestingly, the existing engine code (sre_parse.py) has a place-holder, commented out, for character classes but it was never properly implemented. And I will warn that with Unicode, I THINK all the character classes exist as unicode functions or can be implemented as multiple unicode functions, but I'm not 100% sure so if I run into that problem, some character classes may initially be left out while I work on another item. Anyway, thanks for the input, Mark! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 16:52:21 2008 From: report at bugs.python.org (Scott Dial) Date: Wed, 28 May 2008 14:52:21 +0000 Subject: [issue2975] VS8 include dirs grow without bound In-Reply-To: <1211831796.1.0.811493312376.issue2975@psf.upfronthosting.co.za> Message-ID: <1211986341.22.0.317623666619.issue2975@psf.upfronthosting.co.za> Scott Dial added the comment: I don't believe this is a valid bug. Can you provide a case where it does in fact grow? This issue has previously been addressed in #1685563, and was carried over to the new code as well. Some lines after the path is appended to, there is a call to normalize_and_reduce_paths(...), which removes duplicates almost exactly like you wrote it. ---------- nosy: +scottdial _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 17:57:20 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 28 May 2008 15:57:20 +0000 Subject: [issue2990] type cache updates might run cleanup code in an inconsistent state In-Reply-To: <1211972838.31.0.400694776413.issue2990@psf.upfronthosting.co.za> Message-ID: <1211990240.89.0.816789529618.issue2990@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, committed in r63760. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 18:26:21 2008 From: report at bugs.python.org (Hugh Myers) Date: Wed, 28 May 2008 16:26:21 +0000 Subject: [issue2991] Bad behavior in PythonWin In-Reply-To: <1211991981.32.0.0267592863248.issue2991@psf.upfronthosting.co.za> Message-ID: <1211991981.32.0.0267592863248.issue2991@psf.upfronthosting.co.za> New submission from Hugh Myers : Got this just now: C:\Python25\Lib\site-packages\pythonwin\pywin\scintilla\view.py:641: DeprecationWarning: 'L' format requires 0 <= number <= 4294967295 fr = struct.pack('LLIIIIIIIIll', hdcRender, hdcFormat, rc[0], rc[1], rc[2], rc[3], rc[0], rc[1], rc[2], rc[3], pageStart, lengthDoc) Can't be good... ---------- components: Windows messages: 67451 nosy: hsmyers severity: normal status: open title: Bad behavior in PythonWin type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 18:29:45 2008 From: report at bugs.python.org (Hugh Myers) Date: Wed, 28 May 2008 16:29:45 +0000 Subject: [issue2992] Bad behavior in PythonWin In-Reply-To: <1211992185.54.0.00393701483526.issue2992@psf.upfronthosting.co.za> Message-ID: <1211992185.54.0.00393701483526.issue2992@psf.upfronthosting.co.za> New submission from Hugh Myers : View Whitespace started up enabled when file loaded. Had I left it on when I shut down the editor I would understand(somewhat) the persistence. However I turned it off before I left. This now happens every time I load the file. Shouldn't. ---------- components: Windows messages: 67452 nosy: hsmyers severity: normal status: open title: Bad behavior in PythonWin type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 18:31:01 2008 From: report at bugs.python.org (Hugh Myers) Date: Wed, 28 May 2008 16:31:01 +0000 Subject: [issue2993] Bad behavior in PythonWin In-Reply-To: <1211992261.04.0.186034891848.issue2993@psf.upfronthosting.co.za> Message-ID: <1211992261.04.0.186034891848.issue2993@psf.upfronthosting.co.za> New submission from Hugh Myers : Use of column guides can cause bogus indentation errors. Pattern yet to be determined. ---------- components: Windows messages: 67453 nosy: hsmyers severity: normal status: open title: Bad behavior in PythonWin type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 18:33:57 2008 From: report at bugs.python.org (Hugh Myers) Date: Wed, 28 May 2008 16:33:57 +0000 Subject: [issue2994] Bad behavior in PythonWin In-Reply-To: <1211992437.76.0.620587625462.issue2994@psf.upfronthosting.co.za> Message-ID: <1211992437.76.0.620587625462.issue2994@psf.upfronthosting.co.za> New submission from Hugh Myers : On a 43 line file, printer printed 29 pages, mostly blank(occasional page and title info across top--- somewhat random). Good news is printer performance is consistent with print preview! ---------- components: Windows messages: 67454 nosy: hsmyers severity: normal status: open title: Bad behavior in PythonWin type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 18:36:24 2008 From: report at bugs.python.org (Facundo Batista) Date: Wed, 28 May 2008 16:36:24 +0000 Subject: [issue2991] Bad behavior in PythonWin In-Reply-To: <1211991981.32.0.0267592863248.issue2991@psf.upfronthosting.co.za> Message-ID: <1211992584.46.0.508201309848.issue2991@psf.upfronthosting.co.za> Facundo Batista added the comment: See http://wiki.python.org/moin/PythonWin, PythonWin is not a project from python.org, you should post the bugs in the tracker of that project. ---------- nosy: +facundobatista resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 18:36:30 2008 From: report at bugs.python.org (Facundo Batista) Date: Wed, 28 May 2008 16:36:30 +0000 Subject: [issue2992] Bad behavior in PythonWin In-Reply-To: <1211992185.54.0.00393701483526.issue2992@psf.upfronthosting.co.za> Message-ID: <1211992590.04.0.202722224198.issue2992@psf.upfronthosting.co.za> Facundo Batista added the comment: See http://wiki.python.org/moin/PythonWin, PythonWin is not a project from python.org, you should post the bugs in the tracker of that project. ---------- nosy: +facundobatista resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 18:38:08 2008 From: report at bugs.python.org (Facundo Batista) Date: Wed, 28 May 2008 16:38:08 +0000 Subject: [issue2993] Bad behavior in PythonWin In-Reply-To: <1211992261.04.0.186034891848.issue2993@psf.upfronthosting.co.za> Message-ID: <1211992688.23.0.902513406857.issue2993@psf.upfronthosting.co.za> Facundo Batista added the comment: See http://wiki.python.org/moin/PythonWin, PythonWin is not a project from python.org, you should post the bugs in the tracker of that project. ---------- nosy: +facundobatista resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 18:38:17 2008 From: report at bugs.python.org (Facundo Batista) Date: Wed, 28 May 2008 16:38:17 +0000 Subject: [issue2994] Bad behavior in PythonWin In-Reply-To: <1211992437.76.0.620587625462.issue2994@psf.upfronthosting.co.za> Message-ID: <1211992697.58.0.292301741921.issue2994@psf.upfronthosting.co.za> Facundo Batista added the comment: See http://wiki.python.org/moin/PythonWin, PythonWin is not a project from python.org, you should post the bugs in the tracker of that project. ---------- nosy: +facundobatista resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 18:45:12 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Wed, 28 May 2008 16:45:12 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1211993112.89.0.456088655377.issue2898@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 18:55:23 2008 From: report at bugs.python.org (Franco DiRosa) Date: Wed, 28 May 2008 16:55:23 +0000 Subject: [issue1758146] Crash in PyObject_Malloc Message-ID: <1211993723.54.0.399659700613.issue1758146@psf.upfronthosting.co.za> Franco DiRosa added the comment: The documentation states that thread states are supported within a single interpreter and not supported across other interpreters (specifically for the GIL functions which are just wrapper functions around the PyEval_ functions). So I would have to conclude then that the condition should check to see if the swapping thread is within the current interpreter state otherwise "fatal error", as such... The condition: check->interp == newts->interp should be: check->interp != newts->interp In otherwords if there is a previous thread state and it's interpreter is NOT the same as the one being swapped in then do the fatal error. Just my opinion. I ran into this problem when using the PyThreadState_Swap function directly (low level) to do the thread handling within a single interpreter state (Debug mode only). ---------- nosy: +fdirosa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 19:19:41 2008 From: report at bugs.python.org (Matthias Sommer) Date: Wed, 28 May 2008 17:19:41 +0000 Subject: [issue2995] Idle, some Linuxes, cannot position Cursor by mouseclick In-Reply-To: <1211995180.72.0.174580651078.issue2995@psf.upfronthosting.co.za> Message-ID: <1211995180.72.0.174580651078.issue2995@psf.upfronthosting.co.za> New submission from Matthias Sommer : I'm used to be able to position the cursor by clicking on the desired position. When running Idle (1.2.2 with Python 2.5.2) under Mandriva Linux 2008 (or under Arch Linux 64 or i686 as well as FaunOS a Arch based live distro) this does not work. Running under windows it works, running under Xandros linux on my eee pc it works too, so it's not linux specific. I already asked on the german python ng. There have been reports that it works too on Suse and Ubuntu. But as of yet no hint where to look to make it working under Arch oder Mandriva. Strange enough, i can position the Cursor by Ctrl-clicking. I tried with a tiny Tk program with a single text field - there the positioning does work too. So it seems to be a bug in the distro(s) and regarding only Idle not Tkinter in total. ---------- components: IDLE messages: 67460 nosy: Sunny0815 severity: normal status: open title: Idle, some Linuxes, cannot position Cursor by mouseclick type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 20:57:44 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Wed, 28 May 2008 18:57:44 +0000 Subject: [issue2985] xmlrpclib doesn't support 64bit integer replies In-Reply-To: <1211916410.6.0.0284106941576.issue2985@psf.upfronthosting.co.za> Message-ID: <1212001064.28.0.079364817773.issue2985@psf.upfronthosting.co.za> Ralf Schmitt added the comment: which implementations do support those 64 bit integers? ---------- nosy: +schmir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 20:59:32 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Wed, 28 May 2008 18:59:32 +0000 Subject: [issue2979] use_datetime in SimpleXMLRPCServer In-Reply-To: <1211846989.94.0.031553096454.issue2979@psf.upfronthosting.co.za> Message-ID: <1212001172.91.0.696077056345.issue2979@psf.upfronthosting.co.za> Changes by Ralf Schmitt : ---------- nosy: +schmir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 21:02:41 2008 From: report at bugs.python.org (Riku Lindblad) Date: Wed, 28 May 2008 19:02:41 +0000 Subject: [issue2985] xmlrpclib doesn't support 64bit integer replies In-Reply-To: <1211916410.6.0.0284106941576.issue2985@psf.upfronthosting.co.za> Message-ID: <1212001361.07.0.920582414785.issue2985@psf.upfronthosting.co.za> Riku Lindblad added the comment: I ran into 64bit integer responses with rtorrent's XML-RPC API. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 21:02:54 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Wed, 28 May 2008 19:02:54 +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: <1212001374.94.0.724095232503.issue2936@psf.upfronthosting.co.za> Changes by Ralf Schmitt : ---------- nosy: +schmir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 21:24:47 2008 From: report at bugs.python.org (Ismail Donmez) Date: Wed, 28 May 2008 19:24:47 +0000 Subject: [issue2984] test_dbm fails on Darwin In-Reply-To: <1211913119.29.0.969619534727.issue2984@psf.upfronthosting.co.za> Message-ID: <1212002687.1.0.430257810486.issue2984@psf.upfronthosting.co.za> Ismail Donmez added the comment: Works fine in trunk now. This bug can be closed, thanks. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 21:43:13 2008 From: report at bugs.python.org (Brett Cannon) Date: Wed, 28 May 2008 19:43:13 +0000 Subject: [issue2984] test_dbm fails on Darwin In-Reply-To: <1211913119.29.0.969619534727.issue2984@psf.upfronthosting.co.za> Message-ID: <1212003793.7.0.619776289786.issue2984@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 23:09:06 2008 From: report at bugs.python.org (Russell Blau) Date: Wed, 28 May 2008 21:09:06 +0000 Subject: [issue2996] IDLE "find in files" output not formatted optimally In-Reply-To: <1212008945.94.0.774872087064.issue2996@psf.upfronthosting.co.za> Message-ID: <1212008945.94.0.774872087064.issue2996@psf.upfronthosting.co.za> New submission from Russell Blau : Using the very handy "Find in files" dialog produces an output window that ends with the line "(Hint: right-click to open locations.)" The only problem is, right-clicking on that window currently doesn't work because the output isn't formatted in the way that the right-click action is looking for. Here is a patch that makes the right-click functionality work. ---------- components: Library (Lib) files: grepdialog.diff keywords: patch messages: 67464 nosy: russell.blau severity: normal status: open title: IDLE "find in files" output not formatted optimally type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file10459/grepdialog.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 23:29:56 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 28 May 2008 21:29:56 +0000 Subject: [issue2292] Missing *-unpacking generalizations In-Reply-To: <1205595680.3.0.859525264867.issue2292@psf.upfronthosting.co.za> Message-ID: <1212010196.58.0.352812641772.issue2292@psf.upfronthosting.co.za> Georg Brandl added the comment: What's the status of this? Is it still under consideration for 3.0 -- if yes, that should get decided before the beta. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 23:31:32 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 28 May 2008 21:31:32 +0000 Subject: [issue2996] IDLE "find in files" output not formatted optimally In-Reply-To: <1212008945.94.0.774872087064.issue2996@psf.upfronthosting.co.za> Message-ID: <1212010292.77.0.371696871397.issue2996@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> kbk nosy: +kbk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 28 23:31:41 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 28 May 2008 21:31:41 +0000 Subject: [issue2995] Idle, some Linuxes, cannot position Cursor by mouseclick In-Reply-To: <1211995180.72.0.174580651078.issue2995@psf.upfronthosting.co.za> Message-ID: <1212010301.86.0.118279435851.issue2995@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> kbk nosy: +kbk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 03:25:35 2008 From: report at bugs.python.org (John Stowers) Date: Thu, 29 May 2008 01:25:35 +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: <1212024334.64.0.170496653921.issue2981@psf.upfronthosting.co.za> John Stowers added the comment: I Agree. AIUI the benefit of pascal strings when transmitted is that the decoder does not need to know its length ahead of time. The requirement that the unpack pascal format string be given the length of the string makes the implementation here useless ---------- nosy: +nzjrs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 04:07:01 2008 From: report at bugs.python.org (Jim Kleckner) Date: Thu, 29 May 2008 02:07:01 +0000 Subject: [issue2975] VS8 include dirs grow without bound In-Reply-To: <1211831796.1.0.811493312376.issue2975@psf.upfronthosting.co.za> Message-ID: <1212026819.71.0.481698195506.issue2975@psf.upfronthosting.co.za> Jim Kleckner added the comment: Talk about tunnel vision... The code is right next to it! It is the include paths that are growing without bound (and presumably the LIBPATH as well). The test case is the Cython unit tests. They run until the include variable generates a "line too long" error. The normalize_and_reduce_paths() function needs to be performed on INCLUDE and LIBPATH in addition to the exec path. i.e. os.environ['lib'] and os.environ['include']. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 06:02:39 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 29 May 2008 04:02:39 +0000 Subject: [issue2973] _ssl compiler warnings In-Reply-To: <1211822122.76.0.619319801709.issue2973@psf.upfronthosting.co.za> Message-ID: <1212033759.28.0.622712093099.issue2973@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It looks like this comes from r59493 which purports to fix a warning: ------------------------------------------------------------------------ r59493 | christian.heimes | 2007-12-13 23:38:13 -0500 (Thu, 13 Dec 2007) | 1 line Fixed warning in ssl module ------------------------------------------------------------------------ --- Modules/_ssl.c (revision 59492) +++ Modules/_ssl.c (revision 59493) @@ -660,7 +660,7 @@ char buf[2048]; char *vptr; int len; - unsigned char *p; + const unsigned char *p; if (certificate == NULL) return peer_alt_names; On MacOS 10.4 with OpenSSL 0.9.7i, ASN1_item_d2i is declared without const, so reverting fixes the warning. I guess Christian was developing on a system with a different OpenSSL version, so we need to hear from him before attempting another fix. ---------- nosy: +belopolsky, christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 06:59:27 2008 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 29 May 2008 04:59:27 +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: <1212037167.68.0.867186423309.issue2888@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: The version seen in py3k is the intended formatting; I don't remember anything about a change, but given the time I've not had in following commit messages and discussions, I could easily have missed something. I'm strongly in favor of the output from the Python 3.0 version; the 2.6 version is silly, even if you're not already laughing at the indent parameter. (When I first wrote pprint, I was working with huge nested tuples, for which I found the indentation control useful. Haven't used it since, though I suspect that's the sort of thing that makes others try it out.) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 07:01:53 2008 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 29 May 2008 05:01:53 +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: <1212037313.49.0.280888257631.issue2888@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: I will note that Python 2.5 matches Python 3.0 in this regard. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 07:11:56 2008 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 29 May 2008 05:11:56 +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: <1212037916.64.0.413656665996.issue2888@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: The patch doesn't include a new test to cover this case. That needs to be written and applied to both trunk and py3k. ---------- versions: +Python 2.6 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 07:13:52 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 29 May 2008 05:13:52 +0000 Subject: [issue2877] Backport UserString move from 3.0 In-Reply-To: <1210913405.95.0.573859631329.issue2877@psf.upfronthosting.co.za> Message-ID: <1212038031.97.0.311946476499.issue2877@psf.upfronthosting.co.za> Brett Cannon added the comment: r63767 has the 2.6 changes (with the block in 3.0 in r63768). r63769 has the fixer in 2to3 in the sandbox. Thanks for the patches, Quentin. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 07:38:58 2008 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 29 May 2008 05:38:58 +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: <1212039538.39.0.903277631447.issue2888@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: The attached test_pprint.diff adds a test for this problem. This test passes for the py3k and release25-maint branches and fails for the trunk. Applying Manuel Kaufmann's pprint.diff patch to the trunk causes it to pass as well. I'll leave it for someone else to figure out the right svnmerge dance to keep the trunk and py3k properly in sync. The test should be applied to the py3k, release25-maint, and trunk branches, at any rate. Added file: http://bugs.python.org/file10460/test_pprint.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 08:00:58 2008 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 29 May 2008 06:00:58 +0000 Subject: [issue1005895] curses for win32 Message-ID: <1212040858.87.0.684827950849.issue1005895@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 09:20:21 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 May 2008 07:20:21 +0000 Subject: [issue2906] tkinter, assorted fixes In-Reply-To: <1211125137.99.0.839625810587.issue2906@psf.upfronthosting.co.za> Message-ID: <1212045621.35.0.124896530006.issue2906@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed as r63776, r63777 (3k). ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 09:39:06 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 May 2008 07:39:06 +0000 Subject: [issue2988] Invalid cookies crash web applications In-Reply-To: <1211963484.7.0.388679808819.issue2988@psf.upfronthosting.co.za> Message-ID: <1212046746.49.0.439724045786.issue2988@psf.upfronthosting.co.za> Georg Brandl added the comment: I've added a note in the docs in r63781. In the spirit of "errors should never pass silently", this seems to me like the best thing to do. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 09:45:37 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 May 2008 07:45:37 +0000 Subject: [issue2985] xmlrpclib doesn't support 64bit integer replies In-Reply-To: <1211916410.6.0.0284106941576.issue2985@psf.upfronthosting.co.za> Message-ID: <1212047137.42.0.728779160395.issue2985@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r63782. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 09:55:58 2008 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 29 May 2008 07:55:58 +0000 Subject: [issue2997] PyNumberMethods has left-over fields in Py3 In-Reply-To: <1212047758.76.0.831845847254.issue2997@psf.upfronthosting.co.za> Message-ID: <1212047758.76.0.831845847254.issue2997@psf.upfronthosting.co.za> New submission from Stefan Behnel : Here is a patch that removes three unused fields from the PyNumberMethods struct in Py3. Since two fields were already removed (one even before the ones this patch removes), there is no way existing Py2 C code that uses this struct can work in Py3 without changes, so it doesn't add any problems. ---------- components: Interpreter Core files: pynumbermethods-cleanup.patch keywords: patch messages: 67477 nosy: scoder severity: normal status: open title: PyNumberMethods has left-over fields in Py3 versions: Python 3.0 Added file: http://bugs.python.org/file10461/pynumbermethods-cleanup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 09:58:43 2008 From: report at bugs.python.org (Rahman) Date: Thu, 29 May 2008 07:58:43 +0000 Subject: [issue2998] UnicodeEncodeError: 'ascii' codec can't encode character In-Reply-To: <1212047923.66.0.22448326673.issue2998@psf.upfronthosting.co.za> Message-ID: <1212047923.66.0.22448326673.issue2998@psf.upfronthosting.co.za> New submission from Rahman : Hi i Rahman Yazgan. I live in Turkey. I am pyhton(pyqt) programmer. I found a bug : UnicodeEncodeError: 'ascii' codec can't encode character QLineEdit.text(),... UnicodeEncodeError so ascii codecs, can't encoding. python version 2.5(windows) python25/lib/site.py line 381-383 : if encoding != "ascii": # On Non-Unicode builds this will raise an AttributeError... sys.setdefaultencoding(encoding) # Needs Python Unicode build ! UnicodeEncodeError: 'ascii' codec can't encode character so resoluble: if encoding != "ascii": # On Non-Unicode builds this will raise an AttributeError... sys.setdefaultencoding(encoding) # Needs Python Unicode build ! if encoding == "ascii": sys.setdefaultencoding("utf-8") ---------- components: Unicode files: site.py messages: 67478 nosy: Muallim-i ?li severity: normal status: open title: UnicodeEncodeError: 'ascii' codec can't encode character versions: Python 2.5 Added file: http://bugs.python.org/file10462/site.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 10:01:10 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 29 May 2008 08:01:10 +0000 Subject: [issue2975] VS8 include dirs grow without bound In-Reply-To: <1211831796.1.0.811493312376.issue2975@psf.upfronthosting.co.za> Message-ID: <1212048070.62.0.503879045276.issue2975@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I don't understand where the problem comes from: query_vcvarsall() is called only once, when the distutils.msvc9compiler module is imported. Or is the module somehow reloaded or removed from sys.modules? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 10:07:16 2008 From: report at bugs.python.org (Armin Rigo) Date: Thu, 29 May 2008 08:07:16 +0000 Subject: [issue2990] type cache updates might run cleanup code in an inconsistent state In-Reply-To: <1211972838.31.0.400694776413.issue2990@psf.upfronthosting.co.za> Message-ID: <1212048436.33.0.50358235809.issue2990@psf.upfronthosting.co.za> Armin Rigo added the comment: This was actually not a bug because the object being decref'ed is guaranteed to be exactly a string or None, as told in the comment about the 'name' field. So no user code could possibly run during this Py_DECREF() call. ---------- nosy: +arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 10:11:27 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Thu, 29 May 2008 08:11:27 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1212048687.43.0.462683009326.issue2898@psf.upfronthosting.co.za> Robert Schuppenies added the comment: The attached patch implements the sizeof functionality as a sys module function. __sizeof__ is implemented by object as a instance method, by type as a class method as well as by types which's size cannot be computed from basicsize, itemsize and ob_size. sys.getsizeof() has some work-arounds to deal with type instances and old-style classes. Added file: http://bugs.python.org/file10463/sizeof.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 10:13:55 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Thu, 29 May 2008 08:13:55 +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: <1212048835.08.0.732897048126.issue2419@psf.upfronthosting.co.za> Quentin Gallet-Gilles added the comment: I think this issue should be closed as a duplicate of issue 2847. ---------- nosy: +quentin.gallet-gilles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 10:14:26 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Thu, 29 May 2008 08:14:26 +0000 Subject: [issue2985] xmlrpclib doesn't support 64bit integer replies In-Reply-To: <1211916410.6.0.0284106941576.issue2985@psf.upfronthosting.co.za> Message-ID: <1212048866.01.0.547245243019.issue2985@psf.upfronthosting.co.za> Ralf Schmitt added the comment: I think it's also a bug that xmlrpclib just ignores unknown tags (without even printing a warning). and: wouldn't it be nice if we could also write back those integers? >>> import xmlrpclib >>> xmlrpclib.dumps((2**40,)) Traceback (most recent call last): File "", line 1, in File "/home/ralf/pydev/trunk/Lib/xmlrpclib.py", line 1126, in dumps data = m.dumps(params) File "/home/ralf/pydev/trunk/Lib/xmlrpclib.py", line 671, in dumps dump(v, write) File "/home/ralf/pydev/trunk/Lib/xmlrpclib.py", line 693, in __dump f(self, value, write) File "/home/ralf/pydev/trunk/Lib/xmlrpclib.py", line 704, in dump_int raise OverflowError, "int exceeds XML-RPC limits" OverflowError: int exceeds XML-RPC limits I asked about the implementations supporting this as this i8 tag does not conform to the xmlrpc spec (but I would be happy if there was an de facto standard for sending large integers and would also help implement it). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 10:17:17 2008 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 29 May 2008 08:17:17 +0000 Subject: [issue2990] type cache updates might run cleanup code in an inconsistent state In-Reply-To: <1211972838.31.0.400694776413.issue2990@psf.upfronthosting.co.za> Message-ID: <1212049037.54.0.409892472438.issue2990@psf.upfronthosting.co.za> Stefan Behnel added the comment: Ok, I buy that argument. The patch may be considered a code uglification then. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 10:50:32 2008 From: report at bugs.python.org (Riku Lindblad) Date: Thu, 29 May 2008 08:50:32 +0000 Subject: [issue2985] xmlrpclib doesn't support 64bit integer replies In-Reply-To: <1211916410.6.0.0284106941576.issue2985@psf.upfronthosting.co.za> Message-ID: <1212051031.93.0.64864419299.issue2985@psf.upfronthosting.co.za> Riku Lindblad added the comment: The I8 tag is an extension by xmlrpc-c: http://xmlrpc-c.sourceforge.net/doc/libxmlrpc.html#extensiontype (XMLRPC_TYPE_I8) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 13:15:53 2008 From: report at bugs.python.org (Manuel Kaufmann) Date: Thu, 29 May 2008 11:15:53 +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: <1212059753.07.0.841443685087.issue2888@psf.upfronthosting.co.za> Manuel Kaufmann added the comment: Documentation fix. Added file: http://bugs.python.org/file10464/pprint.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 13:47:34 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Thu, 29 May 2008 11:47:34 +0000 Subject: [issue2887] bsddb3 needs to be ported to Python 3.0 In-Reply-To: <1210915662.48.0.494614370174.issue2887@psf.upfronthosting.co.za> Message-ID: <1212061653.97.0.562874828968.issue2887@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Yes. My idea is to port the python code as-is, using "2to3", and update the C code with conditional compilation, to keep a single codebase. I'm having issues with the compatibility. In particular, my code has the following line: """ staticforward PyTypeObject DB_Type, DBCursor_Type, DBEnv_Type, DBTxn_Type, DBLock_Type; """ Compiling this code fails with the following error (when compiling against Python 3.0): """ Modules/_bsddb.c:241: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PyTypeObject' """ Compiling the same code against Python 2.x, works. Ideas welcomed :). ---------- title: bsddb 4.6.4 needs to be ported to Python 3.0 -> bsddb3 needs to be ported to Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 14:26:08 2008 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 29 May 2008 12:26:08 +0000 Subject: [issue2873] Remove htmllib use in the stdlib In-Reply-To: <1210913045.12.0.944933316665.issue2873@psf.upfronthosting.co.za> Message-ID: <1212063967.74.0.722017141348.issue2873@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: I'd be happy to see both htmllib and pydoc be removed; documentation tools do quite well as separate applications. Not as convenient for interactive use, but easy enough to hook in via PYTHONSTARTUP. ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 15:08:31 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Thu, 29 May 2008 13:08:31 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1212066511.97.0.329016265209.issue2898@psf.upfronthosting.co.za> Changes by Robert Schuppenies : Removed file: http://bugs.python.org/file10463/sizeof.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 15:09:46 2008 From: report at bugs.python.org (Robert Schuppenies) Date: Thu, 29 May 2008 13:09:46 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1212066586.46.0.43463596515.issue2898@psf.upfronthosting.co.za> Robert Schuppenies added the comment: Nick Coghlan helped me to clear my 'metaclass confusion' so here is a patch without an additional __sizeof__ for type objects. Added file: http://bugs.python.org/file10465/sizeof.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 15:49:51 2008 From: report at bugs.python.org (Scott Dial) Date: Thu, 29 May 2008 13:49:51 +0000 Subject: [issue2975] VS8 include dirs grow without bound In-Reply-To: <1211831796.1.0.811493312376.issue2975@psf.upfronthosting.co.za> Message-ID: <1212068991.79.0.751204955161.issue2975@psf.upfronthosting.co.za> Scott Dial added the comment: The path gets changed everytime a MSVCCompiler is instantiated. I've seen the same problem with PATH before with PyPy. I agree this is a bug, but I don't see how it can be fixed. The problem exists inside of vcvarsall.bat if I understand this correctly. Furthermore, I don't understand how an exception could actually be thrown; the vc_env values are sourced from the environment after running vcvarsall.bat, so how could they be too long? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 16:08:44 2008 From: report at bugs.python.org (Mark Summerfield) Date: Thu, 29 May 2008 14:08:44 +0000 Subject: [issue2999] Py30a5: str.replace() tiny doc error In-Reply-To: <1212070124.26.0.110608739832.issue2999@psf.upfronthosting.co.za> Message-ID: <1212070124.26.0.110608739832.issue2999@psf.upfronthosting.co.za> New submission from Mark Summerfield : >>> help(str.replace) Help on method_descriptor: replace(...) S.replace (old, new[, maxsplit]) -> unicode Return a copy of S with all occurrences of substring old replaced by new. If the optional argument maxsplit is given, only the first maxsplit occurrences are replaced. The variable name maxsplit should be "maxreplacements" or similar. Also "-> unicode" should be "-> str" ---------- assignee: georg.brandl components: Documentation messages: 67491 nosy: georg.brandl, mark severity: normal status: open title: Py30a5: str.replace() tiny doc error versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 16:16:04 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Thu, 29 May 2008 14:16:04 +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: <1212070564.48.0.956449611689.issue2936@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Would be useful, too, to add an optional parameter to the call with a list of directories where to search?. ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 16:21:31 2008 From: report at bugs.python.org (Mark Summerfield) Date: Thu, 29 May 2008 14:21:31 +0000 Subject: [issue3000] 2to3 doesn't handle print(whatever); print nor string.* functions In-Reply-To: <1212070891.46.0.168640128737.issue3000@psf.upfronthosting.co.za> Message-ID: <1212070891.46.0.168640128737.issue3000@psf.upfronthosting.co.za> New submission from Mark Summerfield : Py30a5 2to3 currently does not cope correctly with this: print whatever; print which it converts to: print(whatever); print This is a subtle error since "print" on its own is valid. Nor does it replace the deprecated string functions, string.capitalize(), string.count(), string.join(), string.lower(), string.replace(), string.split(), and string.strip(). ---------- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) messages: 67493 nosy: collinwinter, mark severity: normal status: open title: 2to3 doesn't handle print(whatever); print nor string.* functions versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 16:34:52 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 May 2008 14:34:52 +0000 Subject: [issue2998] UnicodeEncodeError: 'ascii' codec can't encode character In-Reply-To: <1212047923.66.0.22448326673.issue2998@psf.upfronthosting.co.za> Message-ID: <1212071691.87.0.36891006992.issue2998@psf.upfronthosting.co.za> Georg Brandl added the comment: Sorry, but you have to be more specific about what you think is a bug. That the default encoding is ascii does have its reasons, and will not change. You're likely to be missing an explicit .encode() call when converting from unicode to str; consult a Python mailing list or newsgroup with details. ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 16:35:51 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 May 2008 14:35:51 +0000 Subject: [issue2990] type cache updates might run cleanup code in an inconsistent state In-Reply-To: <1211972838.31.0.400694776413.issue2990@psf.upfronthosting.co.za> Message-ID: <1212071751.62.0.378454732216.issue2990@psf.upfronthosting.co.za> Georg Brandl added the comment: Reverted in r63787. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 17:14:16 2008 From: report at bugs.python.org (Quentin Gallet-Gilles) Date: Thu, 29 May 2008 15:14:16 +0000 Subject: [issue2847] Remove cl usage from aifc In-Reply-To: <1210726634.74.0.297516553516.issue2847@psf.upfronthosting.co.za> Message-ID: <1212074056.16.0.91406471111.issue2847@psf.upfronthosting.co.za> Quentin Gallet-Gilles added the comment: I'm working on this one. ---------- nosy: +quentin.gallet-gilles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 17:28:12 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Thu, 29 May 2008 15:28:12 +0000 Subject: [issue3001] RLock's are SLOW In-Reply-To: <1212074891.45.0.23606216758.issue3001@psf.upfronthosting.co.za> Message-ID: <1212074891.45.0.23606216758.issue3001@psf.upfronthosting.co.za> New submission from Jes?s Cea Avi?n : threading.RLock acquire/release is very slow. A order of magnitude higher than no reentrant threading.Lock: """ def RLockSpeed() : import time, threading t=time.time() result={} for i in xrange(1000000) : pass result["empty loop"]=time.time()-t l=threading.Lock() t=time.time() for i in xrange(1000000) : l.acquire() l.release() result["Lock"]=time.time()-t l=threading.RLock() t=time.time() for i in xrange(1000000) : l.acquire() l.release() result["RLock"]=time.time()-t return result if __name__=="__main__" : print RLockSpeed() """ Result: {'empty loop': 0.074212074279785156, 'RLock': 10.144084215164185, 'Lock': 1.2489800453186035} ---------- messages: 67497 nosy: jcea severity: normal status: open title: RLock's are SLOW type: performance versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 17:32:30 2008 From: report at bugs.python.org (albert hofkamp) Date: Thu, 29 May 2008 15:32:30 +0000 Subject: [issue3002] shutil.copyfile blocks indefinitely on named pipes In-Reply-To: <1212075150.42.0.761610345558.issue3002@psf.upfronthosting.co.za> Message-ID: <1212075150.42.0.761610345558.issue3002@psf.upfronthosting.co.za> New submission from albert hofkamp : shutil.copytree() uses shutil.copyfile() to copy files recursively. shutil.copyfile() opens the source file for reading, and the destination file for writing, followed by a call to shutil.copyfileobj(). If the file happens to be a named pipe rather than a normal file, opening for read blocks the copying function, since the Unix OS needs a writer process to attach to the same named pipe before the open-for-read succeeds. Rather than opening the file for reading, the correct action would probably be to simply create a new named pipe with the same name at the destination. Looking at the Python2.3 code, the same type of problem seem to exist for other non-normal file-types other than symlinks (eg device files, sockets, and possibly a few others). ---------- components: Library (Lib) messages: 67498 nosy: aioryi severity: normal status: open title: shutil.copyfile blocks indefinitely on named pipes type: behavior versions: Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 17:45:47 2008 From: report at bugs.python.org (Raghuram Devarakonda) Date: Thu, 29 May 2008 15:45: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: <1212075947.33.0.18492902362.issue3002@psf.upfronthosting.co.za> Raghuram Devarakonda added the comment: I am not sure if copyfile() should be trying to copy named pipes (or any other special files for that matter). The best way is perhaps to check and skip such files. ---------- nosy: +draghuram _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 17:54:32 2008 From: report at bugs.python.org (Bill Janssen) Date: Thu, 29 May 2008 15:54:32 +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: <1212076472.78.0.324452986921.issue2936@psf.upfronthosting.co.za> Bill Janssen added the comment: You could do that, I can see how that would be useful, but I think it might be less confusing to just use the platform's way of doing that. For instance, on OS X, you can set DYLD_LIBRARY_PATH environment variable to put directories in front of the normal search path, and DYLD_FALLBACK_LIBRARY_PATH to put directories in back of the normal search path. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 18:16:02 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Thu, 29 May 2008 16:16:02 +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: <1212077762.37.0.604746154605.issue2936@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Sometimes the program knows better :). Supporting LD_LIBRARY_PATH and friends, the incremental cost of supporting an additional parameter seems trivial. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 18:42:31 2008 From: report at bugs.python.org (Facundo Batista) Date: Thu, 29 May 2008 16:42:31 +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: <1212079351.23.0.446420911959.issue2451@psf.upfronthosting.co.za> Facundo Batista added the comment: Commited (part of this) patch on r63788. A lot of small details weren't commited, in a big change like this, the best is to minimize the changes. What I have left from this commit, but plan to do it later is a fix to test_urllib2net.py (this is why I'm not closing this issue). Thank you!! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 18:43:56 2008 From: report at bugs.python.org (Mark Veldhuis) Date: Thu, 29 May 2008 16:43:56 +0000 Subject: [issue3003] sys.stdin.fileno() gives attribute error in IDLE In-Reply-To: <1212079435.96.0.611621924039.issue3003@psf.upfronthosting.co.za> Message-ID: <1212079435.96.0.611621924039.issue3003@psf.upfronthosting.co.za> New submission from Mark Veldhuis : I am using IDLE on Ubuntu Hardy (8.04) and all in all very content to use it. Today I got an AttributeError using sys.stdin.fileno(). A closer look revealed this: in IDLE: Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "copyright", "credits" or "license()" for more information. **************************************************************** Personal firewall software may warn about the connection IDLE makes to its subprocess using this computer's internal loopback interface. This connection is not visible on any external interface and no data is sent to or received from the Internet. **************************************************************** IDLE 1.2.2 >>> import sys >>> dir(sys.stdin) ['_RPCProxy__attributes', '_RPCProxy__getattributes', '_RPCProxy__getmethods', '_RPCProxy__methods', '__class__', '__delattr__', '__dict__', '__doc__', '__getattr__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__weakref__', 'encoding', 'oid', 'sockio'] >>> in terminal: :~$ python 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. >>> import sys >>> dir(sys.stdin) ['__class__', '__delattr__', '__doc__', '__enter__', '__exit__', '__getattribute__', '__hash__', '__init__', '__iter__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'close', 'closed', 'encoding', 'fileno', 'flush', 'isatty', 'mode', 'name', 'newlines', 'next', 'read', 'readinto', 'readline', 'readlines', 'seek', 'softspace', 'tell', 'truncate', 'write', 'writelines', 'xreadlines'] >>> I expected to see more or less the same output, is that right? I could not find information on this online, so I report it as a bug. greetings, Mark ---------- components: IDLE messages: 67503 nosy: mooz123 severity: normal status: open title: sys.stdin.fileno() gives attribute error in IDLE versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 19:20:20 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 29 May 2008 17:20:20 +0000 Subject: [issue2873] Remove htmllib use in the stdlib In-Reply-To: <1212063967.74.0.722017141348.issue2873@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Thu, May 29, 2008 at 5:26 AM, Fred L. Drake, Jr. wrote: > > Fred L. Drake, Jr. added the comment: > > I'd be happy to see both htmllib and pydoc be removed; documentation > tools do quite well as separate applications. Not as convenient for > interactive use, but easy enough to hook in via PYTHONSTARTUP. > I have no objections, but would python-3000 go for this? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 20:24:24 2008 From: report at bugs.python.org (Thomas Heller) Date: Thu, 29 May 2008 18:24:24 +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: <1212085463.91.0.216097866229.issue2936@psf.upfronthosting.co.za> Thomas Heller added the comment: To be honest, I do not understand this request and the discussion. ctypes.util.find_library(), as dcumented, is supposed to simulate what the linker does: find the name of a shared library. For example, it returns 'libc.so.6' when called as ctypes.util.find_library('c'). AFAIK (and I don't know very much about posix shared libs or linkers) the linker does not pay attention to (DY)LD_LIBRARY_PATH env var. dlopen(shared-lib-name) does use this env vars, but this behaviour is already built into dlopen. ---------- assignee: -> theller nosy: +theller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 20:35:55 2008 From: report at bugs.python.org (Arnaud Bergeron) Date: Thu, 29 May 2008 18:35:55 +0000 Subject: [issue3004] Bug in slice.indices() In-Reply-To: <1212086155.65.0.0693111742843.issue3004@psf.upfronthosting.co.za> Message-ID: <1212086155.65.0.0693111742843.issue3004@psf.upfronthosting.co.za> New submission from Arnaud Bergeron : When calling the indices method of a slice object with a negative stop larger in absolute value than the length passed, the returned stop value is always -1. It should be 0 when the step is positive. Current behavior: >>> slice(-10).indices(11) (0, 1, 1) >>> slice(-10).indices(10) (0, 0, 1) >>> slice(-10).indices(9) (0, -1, 1) >>> slice(-10).indices(8) (0, -1, 1) Expected behavior: >>> slice(-10).indices(11) (0, 1, 1) >>> slice(-10).indices(10) (0, 0, 1) >>> slice(-10).indices(9) (0, 0, 1) >>> slice(-10).indices(8) (0, 0, 1) The patch I submit trivially fixes this while preserving the expected -1 when the step is negative like in: >>> slice(None, -10, -1).indices(8) (7, -1, -1) This issue affects python 2.5 and 2.6 at least. I did not test with other versions. ---------- components: Interpreter Core files: slice.patch keywords: patch messages: 67506 nosy: anakha severity: normal status: open title: Bug in slice.indices() type: behavior versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file10466/slice.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 20:43:46 2008 From: report at bugs.python.org (kee nethery) Date: Thu, 29 May 2008 18:43:46 +0000 Subject: [issue3005] EasyDialogs - documentation enhancement In-Reply-To: <1212086626.42.0.0907184132146.issue3005@psf.upfronthosting.co.za> Message-ID: <1212086626.42.0.0907184132146.issue3005@psf.upfronthosting.co.za> New submission from kee nethery : issue: We spent quite a bit of time trying to figure out why EasyDialogs was not working, no dialogs were appearing. Eventually I had to check an AIM and noticed several icons bouncing in the dock. Scrolled over one and it claimed it was Python, and when selected, displayed the dialog we had been trying to get to appear. A simple sentence explaining how to make the dialog appear would be a useful addition to the documentation. URL for the docs shown below. Existing intro paragraph shown below. Suggested additional sentence shown below. url: http://docs.python.org/mac/module-EasyDialogs.html existing: The EasyDialogs module contains some simple dialogs for the Macintosh. All routines take an optional resource ID parameter id with which one can override the DLOG resource used for the dialog, provided that the dialog items correspond (both type and item number) to those in the default DLOG resource. See source code for details. suggested: The EasyDialogs module contains some simple dialogs for the Macintosh. The dialogs get launched in a separate application which appears in the dock and must be clicked on for the dialogs be displayed. All routines take an optional resource ID parameter id with which one can override the DLOG resource used for the dialog, provided that the dialog items correspond (both type and item number) to those in the default DLOG resource. See source code for details. Thanks, kee nethery ---------- assignee: georg.brandl components: Documentation messages: 67507 nosy: georg.brandl, keenethery severity: normal status: open title: EasyDialogs - documentation enhancement type: feature request versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 20:56:29 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Thu, 29 May 2008 18:56:29 +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: <1212087389.84.0.61840753517.issue2636@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Added file: http://bugs.python.org/file10467/issue2636.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 20:57:00 2008 From: report at bugs.python.org (Thomas Heller) Date: Thu, 29 May 2008 18:57:00 +0000 Subject: [issue1798] Add ctypes calling convention that allows safe access of errno In-Reply-To: <1211615936.19.0.658697602591.issue1798@psf.upfronthosting.co.za> Message-ID: <483EFC77.1060704@ctypes.org> Thomas Heller added the comment: Ok, here is the plan (basically Armin's proposal): ctypes maintains a gloabl, but thread-local, variable that contains an error number; called 'ctypes_errno' for this discussion. ctypes.set_errno(value) copies 'value' into ctypes_errno, and returns the old value. ctypes.get_errno() returns the current ctypes_errno value. Foreign functions created with CDLL(..., use_errno=True), when called, copy the ctypes_errno value into the real errno just before they are called, and copy the real errno value into ctypes_errno. The 'use_errno' parameter defaults to False, in this case ctypes_errno is not touched. The same scheme is implemented on Windows for GetLastError() and SetLastError(), the variable is named 'ctypes_LastError', and the CDLL and WinDLL optional parameter is named 'use_LastError', and also defaults to False. Armin Rigo schrieb: > (Another note: the C-level errno and the TLS copy should also be > synchronized when the C code invokes a Python callback.) Not sure what this is for, please proofread the patch when I attach one. Even better, someone could supply test-cases for all this, either as executable code or as prosa. > (A related issue that we may or may not care about: it's more than > likely that various people have already come up with various workarounds > to handle errno, and these workarounds will probably stop working after > ctypes is changed...) Since the new behaviour will only be invoked when use_errno or use_LastError is used, they should be able to still use their workarounds. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 20:57:34 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 29 May 2008 18:57:34 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1212087454.35.0.200840936694.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: -Backport UserString move from 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 20:57:34 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Thu, 29 May 2008 18:57:34 +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: <1212087454.83.0.118716299701.issue2636@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Removed file: http://bugs.python.org/file10427/issue2636.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 20:58:22 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Thu, 29 May 2008 18:58:22 +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: <1212087502.53.0.334474828264.issue2636@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Added file: http://bugs.python.org/file10468/issue2636-05.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 20:58:37 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Thu, 29 May 2008 18:58:37 +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: <1212087517.99.0.678964214457.issue2636@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Removed file: http://bugs.python.org/file10429/issue2636-05.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 20:59:39 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Thu, 29 May 2008 18:59:39 +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: <1212087579.1.0.5149309312.issue2636@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Added file: http://bugs.python.org/file10469/issue2636-07.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 21:00:25 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Thu, 29 May 2008 19:00:25 +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: <1212087625.79.0.171973269423.issue2636@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Added file: http://bugs.python.org/file10470/issue2636-07-only.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 21:00:39 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Thu, 29 May 2008 19:00:39 +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: <1212087639.91.0.964274128348.issue2636@psf.upfronthosting.co.za> Changes by Jeffrey C. Jacobs : Removed file: http://bugs.python.org/file10053/issue2636-07.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 21:04:43 2008 From: report at bugs.python.org (Thomas Heller) Date: Thu, 29 May 2008 19:04:43 +0000 Subject: [issue1779233] PyThreadState_SetAsyncExc and the main thread Message-ID: <1212087883.17.0.443790628587.issue1779233@psf.upfronthosting.co.za> Changes by Thomas Heller : ---------- assignee: theller -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 21:14:11 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 29 May 2008 19:14:11 +0000 Subject: [issue2878] Backport UserList move in 3.0 In-Reply-To: <1210913470.53.0.764611269723.issue2878@psf.upfronthosting.co.za> Message-ID: <1212088451.39.0.472346336415.issue2878@psf.upfronthosting.co.za> Brett Cannon added the comment: Committed in r63790. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 21:14:18 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 29 May 2008 19:14:18 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1212088458.42.0.417719175155.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- dependencies: -Backport UserList move in 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 21:34:10 2008 From: report at bugs.python.org (Thomas Heller) Date: Thu, 29 May 2008 19:34:10 +0000 Subject: [issue1797] ctypes function pointer enhancements In-Reply-To: <1200083698.65.0.997886461661.issue1797@psf.upfronthosting.co.za> Message-ID: <1212089650.42.0.904044884933.issue1797@psf.upfronthosting.co.za> Changes by Thomas Heller : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 21:57:45 2008 From: report at bugs.python.org (Thomas Heller) Date: Thu, 29 May 2008 19:57:45 +0000 Subject: [issue1797] ctypes function pointer enhancements In-Reply-To: <1200083698.65.0.997886461661.issue1797@psf.upfronthosting.co.za> Message-ID: <1212091065.83.0.976816869873.issue1797@psf.upfronthosting.co.za> Thomas Heller added the comment: NULL function pointers are have a boolean False value now; svn rev 63792 (trunk) and rev 63793 (py3k). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 22:06:21 2008 From: report at bugs.python.org (Adam Olsen) Date: Thu, 29 May 2008 20:06:21 +0000 Subject: [issue3001] RLock's are SLOW In-Reply-To: <1212074891.45.0.23606216758.issue3001@psf.upfronthosting.co.za> Message-ID: <1212091581.07.0.911735383265.issue3001@psf.upfronthosting.co.za> Changes by Adam Olsen : ---------- nosy: +Rhamphoryncus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 23:02:39 2008 From: report at bugs.python.org (Matt Mulsow) Date: Thu, 29 May 2008 21:02:39 +0000 Subject: [issue3006] subprocess.Popen causes socket to remain open after close In-Reply-To: <1212094958.77.0.0391223554576.issue3006@psf.upfronthosting.co.za> Message-ID: <1212094958.77.0.0391223554576.issue3006@psf.upfronthosting.co.za> New submission from Matt Mulsow : On Windows, when a suprocess.Popen command is issued while a socket connection is being handled the socket connection will not close until the output of the subprocess is consumed. The connection remains open even though the request.close() command returns successfully and the program starts listening for the next connection. On Windows, the request.close() call translates to the C function closesocket. The closesocket function by default attempts to do a graceful close in the background. By changing the linger structure, the closesocket function can be made to do a hard close. That fixes my problem, but then queued data may not be flushed before the socket closes. I cannot figure out why the closesocket's graceful shutdown is waiting for the Popen command to complete. This problem does not show up with the equivalent os.popen command. To reproduce: run socketTest.py use telnet to connect on port 6288 watch for connection to close or not ---------- components: Library (Lib) files: socketTest.py messages: 67511 nosy: mamulsow severity: normal status: open title: subprocess.Popen causes socket to remain open after close type: resource usage versions: Python 2.5 Added file: http://bugs.python.org/file10471/socketTest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 23:25:49 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 29 May 2008 21:25:49 +0000 Subject: [issue2854] Add gestalt back into Python 3.0 In-Reply-To: <1210795778.91.0.672202960486.issue2854@psf.upfronthosting.co.za> Message-ID: <1212096349.41.0.456531029802.issue2854@psf.upfronthosting.co.za> Benjamin Peterson added the comment: _gestalt was added in 63795. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 23:27:20 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 29 May 2008 21:27:20 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1212096440.35.0.258443477477.issue2775@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- dependencies: -Add gestalt back into Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 23:43:17 2008 From: report at bugs.python.org (Jim Kleckner) Date: Thu, 29 May 2008 21:43:17 +0000 Subject: [issue2975] VS8 include dirs grow without bound In-Reply-To: <1211831796.1.0.811493312376.issue2975@psf.upfronthosting.co.za> Message-ID: <1212097397.15.0.46521959482.issue2975@psf.upfronthosting.co.za> Jim Kleckner added the comment: In this file: http://svn.python.org/view/python/trunk/Lib/distutils/msvc9compiler.py?rev=62636&view=auto Notice the line containing: os.environ['include'] = vc_env['include'] This causes the process environment variables to acquire the value returned by vcvars.bat. Since vcvars.bat appends it's values to the environment variable, it grows each time called. Note that the submitted patch does make this problem go away. A better patch could combine the two functions or and treat them consistently. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 29 23:47:15 2008 From: report at bugs.python.org (Jim Kleckner) Date: Thu, 29 May 2008 21:47:15 +0000 Subject: [issue2975] VS8 include dirs grow without bound In-Reply-To: <1211831796.1.0.811493312376.issue2975@psf.upfronthosting.co.za> Message-ID: <1212097635.34.0.949601743061.issue2975@psf.upfronthosting.co.za> Jim Kleckner added the comment: Actually, now that I think about it a little more, it seems like "very bad practice" to change the process environment variables as a side effect. A better solution would be to keep a variable for the required ones that is modified as necessary. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 00:20:50 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 29 May 2008 22:20:50 +0000 Subject: [issue1779233] PyThreadState_SetAsyncExc and the main thread Message-ID: <1212099650.48.0.000811601072475.issue1779233@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 00:26:33 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Thu, 29 May 2008 22:26:33 +0000 Subject: [issue3007] Remove old StringIO docs In-Reply-To: <1212099992.88.0.316581826794.issue3007@psf.upfronthosting.co.za> Message-ID: <1212099992.88.0.316581826794.issue3007@psf.upfronthosting.co.za> New submission from Humberto Diogenes : StringIO was merged into the `io` module, but the old stringio.rst docs are still there. ---------- assignee: georg.brandl components: Documentation files: io.stringio-docs.patch keywords: patch messages: 67515 nosy: georg.brandl, hdiogenes severity: normal status: open title: Remove old StringIO docs versions: Python 3.0 Added file: http://bugs.python.org/file10472/io.stringio-docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 00:35:09 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Thu, 29 May 2008 22:35:09 +0000 Subject: [issue3007] Remove old StringIO docs In-Reply-To: <1212099992.88.0.316581826794.issue3007@psf.upfronthosting.co.za> Message-ID: <1212100509.56.0.297149345695.issue3007@psf.upfronthosting.co.za> Changes by Humberto Diogenes : Added file: http://bugs.python.org/file10473/remove-stringio.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 00:35:36 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Thu, 29 May 2008 22:35:36 +0000 Subject: [issue2918] Merge StringIO/cStringIO in 3.0 In-Reply-To: <1211227262.27.0.176120683389.issue2918@psf.upfronthosting.co.za> Message-ID: <1212100536.98.0.364318732618.issue2918@psf.upfronthosting.co.za> Changes by Humberto Diogenes : ---------- nosy: +hdiogenes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 02:38:27 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 30 May 2008 00:38:27 +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: <1212107907.32.0.613810474616.issue2065@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file9885/ocean.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 02:38:37 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 30 May 2008 00:38:37 +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: <1212107917.19.0.474430077095.issue2065@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file9957/ocean.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 02:39:00 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 30 May 2008 00:39:00 +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: <1212107940.73.0.480514044723.issue2065@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file10474/ocean.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 02:39:44 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 30 May 2008 00:39:44 +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: <1212107984.2.0.273435198143.issue2065@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file10474/ocean.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 02:40:04 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 30 May 2008 00:40:04 +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: <1212108004.75.0.609000602154.issue2065@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file10475/ocean.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 03:08:51 2008 From: report at bugs.python.org (Bill Janssen) Date: Fri, 30 May 2008 01:08:51 +0000 Subject: [issue2936] ctypes.util.find_library() doesn't consult LD_LIBRARY_PATH In-Reply-To: <1212085463.91.0.216097866229.issue2936@psf.upfronthosting.co.za> Message-ID: <4b3e516a0805291808h2200dd4bj223532c7f7ee61da@mail.gmail.com> Bill Janssen added the comment: The question is, which linker? I think it should be ld.so, which links "on demand", and does pay attention to LD_LIBRARY_PATH. I'm not sure what the point of find_library() is, otherwise. Bill On Thu, May 29, 2008 at 11:24 AM, Thomas Heller wrote: > > Thomas Heller added the comment: > > To be honest, I do not understand this request and the discussion. > ctypes.util.find_library(), as dcumented, is supposed to simulate what > the linker does: find the name of a shared library. For example, > it returns 'libc.so.6' when called as ctypes.util.find_library('c'). > AFAIK (and I don't know very much about posix shared libs or linkers) > the linker does not pay attention to (DY)LD_LIBRARY_PATH env var. > > dlopen(shared-lib-name) does use this env vars, but this behaviour is > already built into dlopen. > > ---------- > assignee: -> theller > nosy: +theller > > _______________________________________ > Python tracker > > _______________________________________ > Added file: http://bugs.python.org/file10476/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Fri May 30 03:17:12 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 30 May 2008 01:17:12 +0000 Subject: [issue708007] TelnetPopen3, TelnetBase, Expect split Message-ID: <1212110232.29.0.086222461524.issue708007@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: out of date -> status: closed -> open versions: +Python 2.6 -Python 2.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 04:02:50 2008 From: report at bugs.python.org (Facundo Batista) Date: Fri, 30 May 2008 02:02:50 +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: <1212112970.46.0.667924573249.issue2888@psf.upfronthosting.co.za> Changes by Facundo Batista : ---------- assignee: fdrake -> facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 04:14:12 2008 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 30 May 2008 02:14:12 +0000 Subject: [issue1658] "RuntimeError: dictionary changed size during iteration" in Tkinter In-Reply-To: <1198069697.21.0.802905521155.issue1658@psf.upfronthosting.co.za> Message-ID: <1212113652.01.0.793316395269.issue1658@psf.upfronthosting.co.za> Guilherme Polo added the comment: There is this same problem at scrolledtext.py (new name). I'm attaching a patch that is a bit different that correct both cases. ---------- nosy: +gpolo Added file: http://bugs.python.org/file10477/tkinter_issue1658.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 05:36:48 2008 From: report at bugs.python.org (safe alattar) Date: Fri, 30 May 2008 03:36:48 +0000 Subject: [issue1948] Cant open python gui using VISTA In-Reply-To: <1211962178.68.0.0493278595852.issue1948@psf.upfronthosting.co.za> Message-ID: safe alattar added the comment: Ok I figured out what happened once I got the error message on the command prompt. Since I installed Python on another account, I could not run it on the current account Im using now. To solve this I had to disable the UAC option. P.S. vista sucks. Oh and you can close this bug. On Wed, May 28, 2008 at 1:09 AM, Amaury Forgeot d'Arc < report at bugs.python.org> wrote: > > Amaury Forgeot d'Arc added the comment: > > Please open a Command Prompt, and run the script: > > c:\Python25\Lib\idlelib\idle.py > > Do you see any error message there? > > ---------- > nosy: +amaury.forgeotdarc > resolution: works for me -> > status: closed -> open > > _______________________________________ > Python tracker > > _______________________________________ > Added file: http://bugs.python.org/file10478/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Fri May 30 07:01:40 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 30 May 2008 05:01:40 +0000 Subject: [issue1948] Cant open python gui using VISTA In-Reply-To: <1201462739.88.0.734539859059.issue1948@psf.upfronthosting.co.za> Message-ID: <1212123700.91.0.108837903555.issue1948@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 08:03:08 2008 From: report at bugs.python.org (Rahman) Date: Fri, 30 May 2008 06:03:08 +0000 Subject: [issue2998] UnicodeEncodeError: 'ascii' codec can't encode character In-Reply-To: <1212047923.66.0.22448326673.issue2998@psf.upfronthosting.co.za> Message-ID: <1212127388.73.0.749085806527.issue2998@psf.upfronthosting.co.za> Rahman added the comment: Thank you. Turkish characters no problem : unicode(self.ui.lineEdit.text()).encode(utf-8) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 08:27:33 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 May 2008 06:27:33 +0000 Subject: [issue3007] Remove old StringIO docs In-Reply-To: <1212099992.88.0.316581826794.issue3007@psf.upfronthosting.co.za> Message-ID: <1212128853.16.0.250943683903.issue3007@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, committed in r63803. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 08:37:50 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 30 May 2008 06:37:50 +0000 Subject: [issue2784] fast builtin sum may leak In-Reply-To: <1210189539.52.0.670446684288.issue2784@psf.upfronthosting.co.za> Message-ID: <1212129469.95.0.0831734111664.issue2784@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed in r63805. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 08:52:36 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 30 May 2008 06:52:36 +0000 Subject: [issue2855] lookkey should INCREF/DECREF startkey around PyObject_RichCompareBool In-Reply-To: <1210795797.23.0.868433377408.issue2855@psf.upfronthosting.co.za> Message-ID: <1212130356.39.0.721058087357.issue2855@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed r63806. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 09:19:20 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 30 May 2008 07:19:20 +0000 Subject: [issue2903] Add __name__ in globals of generated namedtuple namespace In-Reply-To: <1211080350.94.0.662865007097.issue2903@psf.upfronthosting.co.za> Message-ID: <1212131959.7.0.837670019303.issue2903@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Added the simpler first part of the patch in r63807. Thanks for the submission. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 09:35:50 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 30 May 2008 07:35:50 +0000 Subject: [issue2954] [PATCH] Make bisect module functions accept an optional comparison callable In-Reply-To: <1211579587.7.0.195890795343.issue2954@psf.upfronthosting.co.za> Message-ID: <1212132950.01.0.0476137045614.issue2954@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for the submission. This duplicated some previous feature requests which were discussed and ultimately rejected. ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 09:47:45 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 30 May 2008 07:47:45 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> New submission from Raymond Hettinger : Let bin() show floating point values. This would contribute quite a bit to people's understanding of floating point arithmetic. It has a nice education value and it makes it easier to diagnose floating point mysteries. def vis(f): """ Show binary representation of a floating point number: >>> vis(math.pi) '0b11.001001000011111101101010100010001000010110100011' >>> vis(-0.375) '-0b0.011' """ f, sign = (f, '') if f >= 0 else (-f, '-') n, d = f.as_integer_ratio() if isinstance(f, float) else (f, 1) n, d = map(lambda x: bin(x)[2:], (n, d)) n = n.rjust(len(d), '0') s = list(n) s.insert(len(n) - len(d) + 1, '.') return sign + '0b' + ''.join(s) ---------- components: Interpreter Core messages: 67525 nosy: rhettinger severity: normal status: open title: Let bin() show floats type: feature request versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 09:55:20 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 May 2008 07:55:20 +0000 Subject: [issue2999] Py30a5: str.replace() tiny doc error In-Reply-To: <1212070124.26.0.110608739832.issue2999@psf.upfronthosting.co.za> Message-ID: <1212134120.26.0.738250455446.issue2999@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r63808. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 10:20:26 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 May 2008 08:20:26 +0000 Subject: [issue2999] Py30a5: str.replace() tiny doc error In-Reply-To: <1212070124.26.0.110608739832.issue2999@psf.upfronthosting.co.za> Message-ID: <1212135625.97.0.44927443104.issue2999@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed all return types in docstrings of str, bytes, bytearray in r63809. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 12:33:17 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 30 May 2008 10:33:17 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212143597.04.0.0109031388329.issue3008@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure about the educational value of letting obscure bugs creeping in when someone passes a float where an int is expected :-) Your vis() function looks appropriate for the task of educating people, why should its behaviour be folded into bin()? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 12:35:52 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 30 May 2008 10:35:52 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212143751.98.0.447055676366.issue3008@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Or, if you want to educate people at all cost, the TypeError raised by bin() when trying it on a float object could include in its message the binary representation of the float object "for edification". :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 14:13:54 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 30 May 2008 12:13:54 +0000 Subject: [issue3009] 3.0a5 tarballs contain the code twice In-Reply-To: <1212149632.97.0.414084166273.issue3009@psf.upfronthosting.co.za> Message-ID: <1212149632.97.0.414084166273.issue3009@psf.upfronthosting.co.za> New submission from Barry A. Warsaw : As reported by Matthias Klose, the 3.0a5 tarball contains an extra py3k ssubdir with the whole source included again. He says a4 was okay. Check the release scripts before 3.0b1. ---------- assignee: barry components: Installation messages: 67530 nosy: barry priority: release blocker severity: normal status: open title: 3.0a5 tarballs contain the code twice type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 14:21:39 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 May 2008 12:21:39 +0000 Subject: [issue2985] xmlrpclib doesn't support 64bit integer replies In-Reply-To: <1211916410.6.0.0284106941576.issue2985@psf.upfronthosting.co.za> Message-ID: <1212150098.99.0.402919815201.issue2985@psf.upfronthosting.co.za> Georg Brandl added the comment: As long as long integers aren't in the official spec, the current status is fine - liberal in accepting, and strict in sending. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 14:27:22 2008 From: report at bugs.python.org (Leandro Lucarella) Date: Fri, 30 May 2008 12:27:22 +0000 Subject: [issue2954] [PATCH] Make bisect module functions accept an optional comparison callable In-Reply-To: <1211579587.7.0.195890795343.issue2954@psf.upfronthosting.co.za> Message-ID: <1212150442.32.0.900931512762.issue2954@psf.upfronthosting.co.za> Leandro Lucarella added the comment: Is there any way to find the duplicated issue to see the resolution and find out why it has been rejected? Thank you. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 15:55:25 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 30 May 2008 13:55:25 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212155724.85.0.878421784499.issue3008@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I like the idea in general. It is way too common for people to be confused by decimal representation of floats, so an obvious mechanism to display the true value will be helpful. I don't think a promiscuous bin() will lead to obscure bugs. Antoine will have to give a specific example to convince me otherwise. I can see, that extending :b format to floats may be a problem, but this is not being proposed. As far as the proposed implementation goes, I don't like the fact that it always returns a fixed rather than floating point notation. (Try vis(1e100)). I think it should behave somewhat like "%g" format. If bin() is extended to floats, it may become confusing that hex() and oct() are not similarly extended. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 15:56:57 2008 From: report at bugs.python.org (Diez B. Roggisch) Date: Fri, 30 May 2008 13:56:57 +0000 Subject: [issue3010] Module cmd documentation enhancement In-Reply-To: <1212155817.24.0.228459769095.issue3010@psf.upfronthosting.co.za> Message-ID: <1212155817.24.0.228459769095.issue3010@psf.upfronthosting.co.za> New submission from Diez B. Roggisch : Please consider applying the attached patch - it should prevent some confusion because the semantics of a passed stdin aren't clear otherwise. ---------- assignee: georg.brandl components: Documentation files: python2.5-libcmd.patch keywords: patch messages: 67534 nosy: deets, georg.brandl severity: normal status: open title: Module cmd documentation enhancement versions: Python 2.5 Added file: http://bugs.python.org/file10479/python2.5-libcmd.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 16:52:41 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 30 May 2008 14:52:41 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212159161.32.0.36323637599.issue3008@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well it's quite simple. Imagine you have a function f() which takes an integer parameter named x, and somewhere applies bin() to this parameters. Right now, if you call f(1.0) instead of f(1), you will get a TypeError, which is easy to detect: you then fix the call to f(1), and bin() produces the expected result ('0b1'). With Raymond's suggestion, if you call f(1.0) instead of f(1), no exception will tell you your mistake, and bin() will produce a completely bogus result compared to the expected one. If you notice the bogus function output and find out that it contains a strange-looking string (something like '0b11.001001000011111101101010100010001000010110100011'), it is still not obvious from it that the problem stems from passing a float instead of an int. Especially if f() is a library function which you didn't write yourself. There is a reason Python recently introduced a stronger distinction between ints and floats (for instance the __index__ method, which bin() seems to use currently), I don't see the logic behind trying to undo it. And it's not like printing the bin() representation of a float has any actually use (besides education, but education can use its own tools rather than builtin functions). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 18:51:57 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 30 May 2008 16:51:57 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212159161.32.0.36323637599.issue3008@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, May 30, 2008 at 10:52 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Well it's quite simple. Imagine you have a function f() which takes an > integer parameter named x, and somewhere applies bin() to this parameters. This is too abstract. Depending on what f() is designed to do, accepting floats may or may not be the right thing. For example, if bin is used inside f() only to produce some log output, but otherwise f() works on any number, promiscuous bin() will actually make an application using f() more robust. > > > Right now, if you call f(1.0) instead of f(1), you will get a TypeError, > which is easy to detect: you then fix the call to f(1), and bin() > produces the expected result ('0b1'). There is no "right now". Builtin bin is new in 2.6. > > .. > > There is a reason Python recently introduced a stronger distinction > between ints and floats (for instance the __index__ method, which bin() > seems to use currently), I don't see the logic behind trying to undo it. I think you are mistaken. Python always distinguished between floats and integers Traceback (most recent call last): File "", line 1, in ? TypeError: list indices must be integers >>> int.__index__ Traceback (most recent call last): File "", line 1, in ? AttributeError: type object 'int' has no attribute '__index__' __index__ was introduced in order to allow user-defined class instances to be used as indices without affecting the way floats are treated. > > > And it's not like printing the bin() representation of a float has any > actually use (besides education, but education can use its own tools > rather than builtin functions). That's exactly my point. Builtin bin being new, I cannot comment on its actual use, but I've only used hex() in interactive sessions as an easy to type alternative to the finger-twisting "0x%x" % incantation. (IMO, "{0:b}".format(..) is even worse.) In the scripts, however, you would rarely need to create a string representation of single number. More often you will need to embed a number in a larger message and thus you will use % or str.format instead of bin/hex/oct anyways. BTW, google code search quickly revealed the following antipattern: log.msg("real checksum: %s"%hex(hdr[19])) (twisted-Zope-3.2.2/twisted/words/protocols/toc.py) Surely "real checksum: %x" % hdr[19] would be a better choice. (The 0x prefix generated by hex is just noise in the log output.) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 19:35:31 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 30 May 2008 17:35:31 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212168931.31.0.271969910347.issue3008@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: While writing my previous comments I did not realize that '%x' % accepts floats: >>> "%x" % 3.1415 '3' Float support has been even improved somewhat since 2.5: Python 2.5 (r25:51908, Nov 24 2006, 11:03:50) >>> '%x' % 1e10 Traceback (most recent call last): File "", line 1, in TypeError: int argument required The new stile formatting, however does not allow floats with either :x or :b formats: >>> "{0:x}".format(1.) Traceback (most recent call last): File "", line 1, in ValueError: Unknown conversion type x >>> "{0:b}".format(1.) Traceback (most recent call last): File "", line 1, in ValueError: Unknown conversion type b I don't think anything needs to be done about it given that % formatting is being deprecated while new style format is doing the right thing IMO. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 19:47:38 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 30 May 2008 17:47:38 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212169658.25.0.300440049705.issue3008@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I think you are mistaken. Python always distinguished between floats > and integers Sorry, my bad. > For example, if > bin is used inside f() only to produce some log output, but > otherwise f() works on any number, promiscuous bin() will actually > make an application using f() more robust. First I'm not sure bizarre log output should be considered "more robust". Second if you are outputting the bin() of an integer as part of a log output, it probably means the integer should be understood as a kind of bitfield, and then I don't see how accepting float values is "more robust" (again). Anyway Python doesn't accept floats for bit-wise operators (e.g. "1.0&128" raises TypeError). I still find this proposal undesirable, for several reasons: 1. while taking the binary representation of an integer has a real meaning, taking the binary representation of a float only exposes an implementation detail, that is the internal layout of float numbers. 2. if two numbers (one integer and one float) are equal, it sounds expectable that calling a function on them will produce similar output (or fail). Of course, this is not always the case, str(1) and str(1.0) are different. But they are not wildly different and the difference is still easily understood. While getting something like '0b11.001001000011111101101010100010001000010110100011' while you were waiting for '0b11' is disturbing. 3. I'm skeptical about the educational value. People who don't know about the internal layout of float numbers won't very likely feel enlightened by a string of 1s and 0s. Showing a bunch of bits does not really explain a structure. One related feature, though, would be to know whether a string representation of a float is exact or not. If we allowed repr() to lose its round-trippability, this could be implemented by making repr(0.5) return "0.5 (exact)" and repr(0.1) return "0.10000000000000001 (inexact)". Or this could be a dedicated method. > While writing my previous comments I did not realize that '%x' % > accepts floats: And witness how it does something rather intuitive (convert the argument to int) rather than show the internal layout of the float number in hexadecimal form :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 20:07:20 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 30 May 2008 18:07:20 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212169658.25.0.300440049705.issue3008@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, May 30, 2008 at 1:47 PM, Antoine Pitrou wrote: .. > 2. if two numbers (one integer and one float) are equal, it sounds > expectable that calling a function on them will produce similar output > (or fail). .. While getting something like > '0b11.001001000011111101101010100010001000010110100011' while you were > waiting for '0b11' is disturbing. I fail to see how the proposed bin(..) can produce '0b11.00100..' from a float that compares equal to 3. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 20:13:26 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 30 May 2008 18:13:26 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212169658.25.0.300440049705.issue3008@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, May 30, 2008 at 1:47 PM, Antoine Pitrou wrote: .. > 1. while taking the binary representation of an integer has a real > meaning, taking the binary representation of a float only exposes an > implementation detail, that is the internal layout of float numbers. > You may have misunderstood the proposal. I read the proposal as producing the true mathematical radix 2 representation of a float rather than its 64-bit memory layout. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 20:24:39 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 30 May 2008 18:24:39 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212171879.18.0.915568922735.issue3008@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: What would you say to adding float-capable bin/oct/hex (+ maybe tobase) to the math module? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 20:27:48 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 30 May 2008 18:27:48 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212172068.31.0.92307380949.issue3008@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I read the proposal as > producing the true mathematical radix 2 representation of a float > rather than its 64-bit memory layout. The term "layout" was probably badly chosen. Still, the explicit motivation for producing that representation is that it it supposed to educate people about the actual implementation of floats. Other than that, a radix 2 representation is quite an obscure (and almost never used) way of representing float objects. Binary representation of integers in comparison is more widely understood and more frequently used, which -- I suppose -- justifies the existence of a builtin function to obtain it. > I fail to see how the proposed bin(..) can produce '0b11.00100..' from > a float that compares equal to 3. Oops, you are right. bin(3.0) would produce '0b11.', which is indeed more readable. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 20:32:07 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 30 May 2008 18:32:07 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212172326.86.0.781573181822.issue3008@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > What would you say to adding float-capable bin/oct/hex (+ maybe tobase) > to the math module? Why not indeed. However, as I said, if the intent is float-specific (and it is, unless there is another inexact numeric type which warrants a specific bin() output), then why not make it a method of float? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 20:34:14 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 30 May 2008 18:34:14 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212172454.7.0.273992347953.issue3008@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Better to just build-out bin() and be done with it. FWIW, the action on ints and floats is similar to how str() handles numeric inputs: str(3) --> '3' str(3.0) --> '3.0' bin(3) --> '0b11' bin(3.0) --> '0b11.0' ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 20:38:48 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 30 May 2008 18:38:48 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212172728.52.0.546828263492.issue3008@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Better to just build-out bin() and be done with it. Ok, someone has to take a decision anyway. However, if you do that, it should be probably decided first what happens for hex() and oct(). Do they still disallow floats (which is semantically reasonable but makes things slightly inconsistent)? Or are they also changed in order to return the same kind of things as bin() does (which would probably give awful results)? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 20:52:39 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 30 May 2008 18:52:39 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212173559.49.0.218480069478.issue3008@psf.upfronthosting.co.za> Raymond Hettinger added the comment: AFAICT, there is no good use case for showing floats in in hex or oct, so those should not chance. Also, since bin() is new, no existing code is affected. Thanks for the comments. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 20:53:40 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 30 May 2008 18:53:40 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212133665.79.0.610497521222.issue3008@psf.upfronthosting.co.za> Message-ID: <1212173619.94.0.158501348078.issue3008@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Another problem with bin() on floats is that it will be a one-way street because as far as I know, there is no function to convert a binary string back to a float. My last thought on this issue is that it will be helpful to add tobase(f, n) and frombase(s,n) functions to math module (and I withdraw my suggestion of using %g-like notation due to the conflict between E for exponent and E for 0xE). On the other hand, there is no need to mess up with builtin bin/oct/hex because with math.tobase float-capable extensions will be trivially implementable. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 21:07:18 2008 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 30 May 2008 19:07:18 +0000 Subject: [issue708007] TelnetPopen3, TelnetBase, Expect split Message-ID: <1212174438.35.0.327292242844.issue708007@psf.upfronthosting.co.za> Guido van Rossum added the comment: Since Pexpect is alive and well, doesn't it satisfy your needs? What's the point of trying to push an alternative implementation that has lingered for 7 years now? ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 21:11:01 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 30 May 2008 19:11:01 +0000 Subject: [issue3008] Let bin() show floats In-Reply-To: <1212172326.86.0.781573181822.issue3008@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, May 30, 2008 at 2:32 PM, Antoine Pitrou wrote: > then why not make it a method of float? .. because you rarely want to make your functions accept 1.0, but reject 1 and using f.bin() in your function will give it this property. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 22:33:14 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 30 May 2008 20:33:14 +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: <1212179594.96.0.510067728898.issue2507@psf.upfronthosting.co.za> Changes by Adam Olsen : ---------- nosy: +Rhamphoryncus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 22:33:37 2008 From: report at bugs.python.org (Adam Olsen) Date: Fri, 30 May 2008 20:33:37 +0000 Subject: [issue2833] __exit__ silences the active exception In-Reply-To: <1210576013.94.0.462684443177.issue2833@psf.upfronthosting.co.za> Message-ID: <1212179617.57.0.338734996524.issue2833@psf.upfronthosting.co.za> Changes by Adam Olsen : ---------- nosy: +Rhamphoryncus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 22:40:26 2008 From: report at bugs.python.org (Thomas Heller) Date: Fri, 30 May 2008 20:40:26 +0000 Subject: [issue1798] Add ctypes calling convention that allows safe access of errno In-Reply-To: <483EFC77.1060704@ctypes.org> Message-ID: <4840662F.8040701@ctypes.org> Thomas Heller added the comment: Here is a patch implementing the plan. This text could serve as a start for the documentation, but it also describes the current implementation. Usage recipes should probably be added: /* ctypes maintains a module-global, but thread-local, variable that contains an error number; called 'ctypes_errno' for this discussion. This variable is a private copy of the stdlib 'errno' value; it is swapped with the 'errno' variable on several occasions. Foreign functions created with CDLL(..., use_errno=True), when called, swap the values just before they are actual function call, and swapped again afterwards. The 'use_errno' parameter defaults to False, in this case ctypes_errno is not touched. The values are also swapped immeditately before and after ctypes callback functions are called, if the callbacks are constructed using the new optional use_errno parameter for CFUNCTYPE(..., use_errno=TRUE) or WINFUNCTYPE(..., use_errno=True). Two new ctypes functions are provided to access the 'ctypes_errno' value from Python: - ctypes.set_errno(value) sets ctypes_errno to 'value', the previous ctypes_errno value is returned. - ctypes.get_errno() returns the current ctypes_errno value. The same scheme is implemented on Windows for GetLastError() and SetLastError(), and the CDLL and WinDLL optional parameter is named 'use_LastError', and also defaults to False. On Windows, TlsSetValue and TlsGetValue calls are used to provide thread local storage for the variables; ctypes compiled with __GNUC__ uses __thread variables. */ Added file: http://bugs.python.org/file10480/ctypes-errno-3.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ctypes-errno-3.patch URL: From report at bugs.python.org Fri May 30 22:43:52 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 30 May 2008 20:43:52 +0000 Subject: [issue3011] locale module alias table needs to be updated In-Reply-To: <1212180231.64.0.423770380897.issue3011@psf.upfronthosting.co.za> Message-ID: <1212180231.64.0.423770380897.issue3011@psf.upfronthosting.co.za> New submission from Marc-Andre Lemburg : It's missing a lot of entries of the type "de_DE.utf at euro" and was last updated in 2004. ---------- assignee: lemburg components: Library (Lib) messages: 67551 nosy: lemburg severity: normal status: open title: locale module alias table needs to be updated type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 22:46:53 2008 From: report at bugs.python.org (Thomas Heller) Date: Fri, 30 May 2008 20:46:53 +0000 Subject: [issue1798] Add ctypes calling convention that allows safe access of errno In-Reply-To: <4840662F.8040701@ctypes.org> Message-ID: <484067BB.4040802@ctypes.org> Thomas Heller added the comment: Thomas Heller schrieb: > Here is a patch implementing the plan. ctypes-errno-3.patch, in case of doubt. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 22:52:59 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 30 May 2008 20:52:59 +0000 Subject: [issue3011] locale module alias table needs to be updated In-Reply-To: <1212180231.64.0.423770380897.issue3011@psf.upfronthosting.co.za> Message-ID: <1212180779.67.0.859708996497.issue3011@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Committed as r63824. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 22:54:05 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 30 May 2008 20:54:05 +0000 Subject: [issue3011] locale module alias table needs to be updated In-Reply-To: <1212180231.64.0.423770380897.issue3011@psf.upfronthosting.co.za> Message-ID: <1212180845.94.0.079524773135.issue3011@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: It may be worth to backport the change to 2.5, since it causes problems with current Linux distributions that use the "@euro" extension as default. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 22:58:23 2008 From: report at bugs.python.org (Thomas Heller) Date: Fri, 30 May 2008 20:58:23 +0000 Subject: [issue2936] ctypes.util.find_library() doesn't consult LD_LIBRARY_PATH In-Reply-To: <4b3e516a0805291808h2200dd4bj223532c7f7ee61da@mail.gmail.com> Message-ID: <48406A6B.6000208@ctypes.org> Thomas Heller added the comment: > The question is, which linker? I think it should be ld.so, which links "on > demand", and does pay attention to LD_LIBRARY_PATH. I'm not sure what the > point of find_library() is, otherwise. The best explanation is in the python docs: http://docs.python.org/lib/ctypes-finding-shared-libraries.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 23:33:52 2008 From: report at bugs.python.org (John Arbash Meinel) Date: Fri, 30 May 2008 21:33:52 +0000 Subject: [issue3012] disutils fails with GNU ld (GNU Binutils) 2.18.50.20080523 In-Reply-To: <1212183232.04.0.848357706047.issue3012@psf.upfronthosting.co.za> Message-ID: <1212183232.04.0.848357706047.issue3012@psf.upfronthosting.co.za> New submission from John Arbash Meinel : I just upgraded my cygwin installation to the latest versions. Which seems to include GNU ld (GNU Binutils) 2.18.50.20080523 and GNU dllwrap (GNU Binutils) 2.18.50.20080523 It seems that their version notation is now Major.Minor.Micro.Date The problem is that in 'cygwincompiler.py' it does: result = re.search('(\d+\.\d+(\.\d+)*)',out_string) if result: ld_version = StrictVersion(result.group(1)) Which matches the full version string. However "StrictVersion" only supports A.B.CdE formats. So the .Date breaks the parser. My workaround was to change the regex to be: result = re.search('(\d+\.\d+(\.\d+)?)(\.\d+)*',out_string) So it will still match an unlimited number of '.DDD' as it used to, but now it only preserves the first 3 to pass to StrictVersion. This may not be the correct fix, as a better fix might be to use something else instead of StrictVersion (since these version numbers explicitly *don't* match what StrictVersion expects.) ---------- messages: 67556 nosy: jameinel severity: normal status: open title: disutils fails with GNU ld (GNU Binutils) 2.18.50.20080523 type: compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 23:33:54 2008 From: report at bugs.python.org (John Arbash Meinel) Date: Fri, 30 May 2008 21:33:54 +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: <1212183234.85.0.030546530082.issue3013@psf.upfronthosting.co.za> New submission from John Arbash Meinel : I just upgraded my cygwin installation to the latest versions. Which seems to include GNU ld (GNU Binutils) 2.18.50.20080523 and GNU dllwrap (GNU Binutils) 2.18.50.20080523 It seems that their version notation is now Major.Minor.Micro.Date The problem is that in 'cygwincompiler.py' it does: result = re.search('(\d+\.\d+(\.\d+)*)',out_string) if result: ld_version = StrictVersion(result.group(1)) Which matches the full version string. However "StrictVersion" only supports A.B.CdE formats. So the .Date breaks the parser. My workaround was to change the regex to be: result = re.search('(\d+\.\d+(\.\d+)?)(\.\d+)*',out_string) So it will still match an unlimited number of '.DDD' as it used to, but now it only preserves the first 3 to pass to StrictVersion. This may not be the correct fix, as a better fix might be to use something else instead of StrictVersion (since these version numbers explicitly *don't* match what StrictVersion expects.) ---------- messages: 67557 nosy: jameinel severity: normal status: open title: disutils fails with GNU ld (GNU Binutils) 2.18.50.20080523 type: compile error versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 23:34:06 2008 From: report at bugs.python.org (John Arbash Meinel) Date: Fri, 30 May 2008 21:34:06 +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: <1212183246.76.0.755481930648.issue3013@psf.upfronthosting.co.za> Changes by John Arbash Meinel : ---------- components: +Distutils _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 23:35:10 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 30 May 2008 21:35:10 +0000 Subject: [issue3012] disutils fails with GNU ld (GNU Binutils) 2.18.50.20080523 In-Reply-To: <1212183232.04.0.848357706047.issue3012@psf.upfronthosting.co.za> Message-ID: <1212183310.93.0.371850108443.issue3012@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 23:36:08 2008 From: report at bugs.python.org (John Arbash Meinel) Date: Fri, 30 May 2008 21:36:08 +0000 Subject: [issue3012] disutils fails with GNU ld (GNU Binutils) 2.18.50.20080523 In-Reply-To: <1212183232.04.0.848357706047.issue3012@psf.upfronthosting.co.za> Message-ID: <1212183368.39.0.644884100771.issue3012@psf.upfronthosting.co.za> John Arbash Meinel added the comment: can you link the bug that this is a dupe of? I did a search and didn't find anything. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 23:36:57 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 30 May 2008 21:36:57 +0000 Subject: [issue3012] disutils fails with GNU ld (GNU Binutils) 2.18.50.20080523 In-Reply-To: <1212183232.04.0.848357706047.issue3012@psf.upfronthosting.co.za> Message-ID: <1212183417.06.0.613045869293.issue3012@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Your own: #3013. :) ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 23:50:53 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 30 May 2008 21:50:53 +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: <1212184253.46.0.462809471028.issue3013@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- keywords: +easy priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 23:54:11 2008 From: report at bugs.python.org (johansen) Date: Fri, 30 May 2008 21:54:11 +0000 Subject: [issue3014] file_dealloc() assumes errno is set when EOF is returned In-Reply-To: <1212184451.2.0.27521352304.issue3014@psf.upfronthosting.co.za> Message-ID: <1212184451.2.0.27521352304.issue3014@psf.upfronthosting.co.za> New submission from johansen : We're using Python to build the new packaging system for OpenSolaris. Yesterday, a user reported that when they ran the pkg command, piped the output to grep, and then typed ^C, sometimes they'd get this error: $ pkg list | grep office ^Cclose failed: [Errno 11] Resource temporarily unavailable We assumed that this might be a problem in the signal handling we've employed to catch SIGPIPE; however, it turns out that the problem is in the file_dealloc() code. For the perversely curious, additional details may be found in the original bug located here: http://defect.opensolaris.org/bz/show_bug.cgi?id=2083 Essentially we found the following: The error message is emitted from fileobject.c: file_dealloc() The relevant portion of the routine looks like this: static void file_dealloc(PyFileObject *f) { int sts = 0; if (f->weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) f); if (f->f_fp != NULL && f->f_close != NULL) { Py_BEGIN_ALLOW_THREADS sts = (*f->f_close)(f->f_fp); Py_END_ALLOW_THREADS if (sts == EOF) #ifdef HAVE_STRERROR PySys_WriteStderr("close failed: [Errno %d] %s\n", errno, strerror(errno)); In the cases we encountered, the function pointer f_close is actually a call to sysmodule.c: _check_and_flush() That routine looks like this: static int _check_and_flush (FILE *stream) { int prev_fail = ferror (stream); return fflush (stream) || prev_fail ? EOF : 0; } check_and_flush calls ferror(3C) and then fflush(3C) on the FILE stream associated with the file object. There's just one problem here. If it finds an error that was previously encountered on the file stream, there's no guarantee that errno will be valid. Should an error be encountered in fflush(3C), errno will get set; however, the contents of errno are undefined should fflush() return successfully. Here's what happens in the code I observed: I set a write watchpoint on errno and observed the different times it was accessed. After sifting through a bunch of red-herrings, I found that a call to PyThread_acquire_lock() that sets errno to 11 (EAGAIN). This occurs when PyThread_acquire_lock() calls sem_trywait(3C) and finds the semaphore already locked. Errno doesn't get accessed again until a call to libc.so.1`isseekable() that simply saves and restores the existing errno. Since we've taken a ^C (SIGINT), the interpreter begins the finalization process and eventually calls file_dealloc(). This routine calls _check_and_flush(). In the case that I observed, ferror(3C) returns a non-zero value but fflush(3C) completes successfully. This causes the routine to return EOF to the caller. file_dealloc() assumes that since it received an EOF an error occurred and it should call strerror(errno). However, since this is just returning the state of a previous error, errno is invalid. This is what causes the spurious EAGAIN message. Just to be sure, I traced the return value and errno of failed syscalls that were invoked by the interpreter. I was unable to observe any syscalls returning EAGAIN. This is because (at least on OpenSolaris) sem_trywait(3C) calls sema_trywait(3C). The sema_trywait returns EBUSY if the semaphore is held and sem_trywait converts this to EAGAIN. None of these errors are passed out of the kernel. It's not clear to me whether _check_and_flush(), file_dealloc(), or both need modification. At a minimum, it's not safe for file_dealloc() to assume that errno is set correctly if the function underneath it is using ferror(3C) to find the presence of an error on the stream. ---------- components: Interpreter Core messages: 67560 nosy: johansen severity: normal status: open title: file_dealloc() assumes errno is set when EOF is returned type: behavior versions: Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 30 23:58:41 2008 From: report at bugs.python.org (John Arbash Meinel) Date: Fri, 30 May 2008 21:58:41 +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: <1212184721.23.0.624347248037.issue3013@psf.upfronthosting.co.za> John Arbash Meinel added the comment: Quick patch that changes the regex ---------- keywords: +patch Added file: http://bugs.python.org/file10481/cygwinccompiler.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 00:51:39 2008 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 30 May 2008 22:51:39 +0000 Subject: [issue3015] tkinter with wantobjects=False has been broken for some time In-Reply-To: <1212187898.67.0.391803496997.issue3015@psf.upfronthosting.co.za> Message-ID: <1212187898.67.0.391803496997.issue3015@psf.upfronthosting.co.za> New submission from Guilherme Polo : This affects only py3k, but apparently tkinter has been in this situation for more than 9 months now. I see these lines at _tkinter.c: const char *s = Tcl_GetStringResult(self->interp); const char *p = s; res = PyUnicode_FromStringAndSize(s, (int)(p-s)); and I was wondering how could res not end up being an empty string always ? Then I did some quick tests here and the return is always an empty string, when wantobjects is set to False. Maybe the second line should be: const char *p = strchr(s, '\0'); I've attached this correction. Not sure if it is the best way to solve the problem. ---------- components: Tkinter files: tkinter_wantobjects.diff keywords: patch messages: 67562 nosy: gpolo severity: normal status: open title: tkinter with wantobjects=False has been broken for some time versions: Python 3.0 Added file: http://bugs.python.org/file10482/tkinter_wantobjects.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 00:54:54 2008 From: report at bugs.python.org (Zooko O'Whielacronx) Date: Fri, 30 May 2008 22:54:54 +0000 Subject: [issue3016] tarfile.py incurs exception from self.chmod() when tarball has g+s In-Reply-To: <1212188094.34.0.115070485446.issue3016@psf.upfronthosting.co.za> Message-ID: <1212188094.34.0.115070485446.issue3016@psf.upfronthosting.co.za> New submission from Zooko O'Whielacronx : As reported at https://bugs.launchpad.net/pyopenssl/+bug/236190 , tarfile.py incurs an "Operation not permitted" exception (on Mac OS 10.4) when it tries to untar the pyOpenSSL-0.6.tar.gz tarball, because that tarball has directories in it marked as having the "g+s" bit. (Why this leads to an "Operation not permitted" exception, I don't know.) ---------- messages: 67563 nosy: zooko severity: normal status: open title: tarfile.py incurs exception from self.chmod() when tarball has g+s type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 06:53:02 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 31 May 2008 04:53:02 +0000 Subject: [issue1764087] tiny addition to peephole optimizer Message-ID: <1212209581.81.0.887154206689.issue1764087@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This was previously rejected for two reasons. 1) It provided almost no measureable speed-up (the code for LOAD_FAST and DUP_TOP is substantially the same, the only real difference is the time to fetch the oparg). 2) The optimization typically crosses lines of source code, making it difficult to follow in a trace or disassembly. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 06:59:31 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 31 May 2008 04:59:31 +0000 Subject: [issue1764986] generic and more efficient removal of unreachable code Message-ID: <1212209971.09.0.433130500559.issue1764986@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Not too excited about this. It adds to compilation time but doesn't save any runtime. It's not at all common for production code to have unreachable code at RAISE_VARARGS or BREAK_LOOP, so I see no reason to complexify to the peepholer to handle this case. ---------- nosy: +rhettinger resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 07:21:05 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 31 May 2008 05:21:05 +0000 Subject: [issue1765558] small improvement for peephole conditional jump optimizer Message-ID: <1212211265.66.0.0821887602414.issue1765558@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This one does give a real speedup in the case of jumping to a UNARY_NOT followed by another conditional jump. My only issue is that it doesn't make it's transformation all at once. It relies on a subsequent pass to not change its assumptions. This tightly couples two pieces of peephole logic that are best left fully orthogonal lest we introduct maintenance problems. The fragility is compounded because a new basic block is formed and that is not recorded in the structure designed to track the blocks. At some point, many of the peephole optimizations are going to be moved upstream into a AST optimizer. That is a more appropriate place for this kind of transformation. Am closing this because it makes the code too fragile, but I think the idea was inspired and the implementation was clever. Thanks for the patch. ---------- nosy: +rhettinger resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 07:59:22 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 31 May 2008 05:59:22 +0000 Subject: [issue3015] tkinter with wantobjects=False has been broken for some time In-Reply-To: <1212187898.67.0.391803496997.issue3015@psf.upfronthosting.co.za> Message-ID: <1212213562.18.0.887827683432.issue3015@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think in Python 3, the whole wantobjects=False case should go. It was a compatibility measure to support applications that didn't expect Tcl objects; for Python 3, only a single case should be supported. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 08:14:31 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 31 May 2008 06:14:31 +0000 Subject: [issue3016] tarfile.py incurs exception from self.chmod() when tarball has g+s In-Reply-To: <1212188094.34.0.115070485446.issue3016@psf.upfronthosting.co.za> Message-ID: <1212214471.04.0.343014537057.issue3016@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I can't reproduce this. If I do py> import tarfile py> t=tarfile.open("pyOpenSSL-0.6.tar.gz","r:*") py> t.extractall() py> it extracts just fine, and sets the s-bits. I've used the file at http://downloads.sourceforge.net/pyopenssl/pyOpenSSL-0.6.tar.gz?modtime=1092355200&big_mirror=0 ---------- assignee: -> lars.gustaebel nosy: +lars.gustaebel, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 08:51:13 2008 From: report at bugs.python.org (Humberto Diogenes) Date: Sat, 31 May 2008 06:51:13 +0000 Subject: [issue2849] Remove usage of rfc822 from the stdlib In-Reply-To: <1210726924.82.0.902490265063.issue2849@psf.upfronthosting.co.za> Message-ID: <1212216672.92.0.0888295374382.issue2849@psf.upfronthosting.co.za> Humberto Diogenes added the comment: Seems that removing rfc822 from `cgi` is not an easy task -- please see issue 1112856. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 12:07:07 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 31 May 2008 10:07:07 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1212228427.33.0.115856047382.issue2898@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch looks fine to me, please apply. Don't forget to add a Misc/NEWS entry. ---------- assignee: gvanrossum -> schuppenies resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 12:33:34 2008 From: report at bugs.python.org (Joshua Uziel) Date: Sat, 31 May 2008 10:33:34 +0000 Subject: [issue2138] Add a factorial function In-Reply-To: <1203329368.91.0.915653416666.issue2138@psf.upfronthosting.co.za> Message-ID: <1212230014.09.0.0274904920507.issue2138@psf.upfronthosting.co.za> Joshua Uziel added the comment: It's a simplified version, but why not something like this: import operator def factorial(num): return reduce(operator.mul, range(1, num+1)) A product() function could also be done similarly. ---------- nosy: +uzi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 12:40:52 2008 From: report at bugs.python.org (Joshua Uziel) Date: Sat, 31 May 2008 10:40:52 +0000 Subject: [issue2138] Add a factorial function In-Reply-To: <1203329368.91.0.915653416666.issue2138@psf.upfronthosting.co.za> Message-ID: <1212230452.47.0.392090770882.issue2138@psf.upfronthosting.co.za> Joshua Uziel added the comment: Or slightly better: from operator import mul def factorial(num): return reduce(mul, range(2, num+1), 1) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 13:01:27 2008 From: report at bugs.python.org (Thomas Herve) Date: Sat, 31 May 2008 11:01:27 +0000 Subject: [issue2982] more tests for pyexpat In-Reply-To: <1211905628.44.0.670797216201.issue2982@psf.upfronthosting.co.za> Message-ID: <1212231687.14.0.19724680894.issue2982@psf.upfronthosting.co.za> Thomas Herve added the comment: I attach a first try adding tests for the handlers you mentioned. ---------- keywords: +patch Added file: http://bugs.python.org/file10483/2922.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 13:06:58 2008 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Sat, 31 May 2008 11:06:58 +0000 Subject: [issue3016] tarfile.py incurs exception from self.chmod() when tarball has g+s In-Reply-To: <1212188094.34.0.115070485446.issue3016@psf.upfronthosting.co.za> Message-ID: <1212232018.28.0.113197477711.issue3016@psf.upfronthosting.co.za> Lars Gust?bel added the comment: With some effort I could reproduce the problem (on a FAT32 filesystem), but what we have here is clearly a usage problem. In unpack_tarfile() in setuptools/archive_util.py TarFile's internal _extract_member() method is used to extract the contents. For every non-fatal error (like a failing chmod()) _extract_member() raises an ExtractError exception. In TarFile.extract() these ExtractErrors are normally ignored. The unpack_tarfile() function in setuptools needs some fixing, it should either act more like TarFile.extract() or better use the public API. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 14:18:40 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 31 May 2008 12:18:40 +0000 Subject: [issue3015] tkinter with wantobjects=False has been broken for some time In-Reply-To: <1212187898.67.0.391803496997.issue3015@psf.upfronthosting.co.za> Message-ID: <1212236320.31.0.692251487503.issue3015@psf.upfronthosting.co.za> Guilherme Polo added the comment: I will agree that wantobjects=False should go, it is also discouraged to use Tcl_GetStringResult because it may lose information. But something should be done at FromObj since it accesses Tcl_Obj fields directly, and it may end up not using the current object representation which may cause weird things like in issue1447222. Said that, I'm not sure how to fix it for now. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 14:29:28 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 31 May 2008 12:29:28 +0000 Subject: [issue3017] Verify doc updates for the decimal module In-Reply-To: <1212236968.69.0.449256777548.issue3017@psf.upfronthosting.co.za> Message-ID: <1212236968.69.0.449256777548.issue3017@psf.upfronthosting.co.za> New submission from Raymond Hettinger : Some of the doc updates were inaccurate. For instance, r58154 adds documentation for a trim() method, but there is no such method in decimal.py. ---------- assignee: facundobatista components: Documentation messages: 67576 nosy: facundobatista, rhettinger priority: high severity: normal status: open title: Verify doc updates for the decimal module versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 15:29:46 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 31 May 2008 13:29:46 +0000 Subject: [issue3015] tkinter with wantobjects=False has been broken for some time In-Reply-To: <1212187898.67.0.391803496997.issue3015@psf.upfronthosting.co.za> Message-ID: <1212240586.43.0.0859604635271.issue3015@psf.upfronthosting.co.za> Guilherme Polo added the comment: I've removed wantobjects and substituted some internalRep usage too. Added file: http://bugs.python.org/file10484/remove_wantobjects_internalRep.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 15:37:37 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 31 May 2008 13:37:37 +0000 Subject: [issue1447222] tkinter Dialog fails when more than four buttons are used Message-ID: <1212241057.9.0.00262504743474.issue1447222@psf.upfronthosting.co.za> Guilherme Polo added the comment: This is a workaround and seems to be the way to go. ---------- keywords: +patch Added file: http://bugs.python.org/file10485/Dialog_workaround.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 15:49:20 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 31 May 2008 13:49:20 +0000 Subject: [issue3018] tkinter demos fixed In-Reply-To: <1212241760.64.0.0978196091903.issue3018@psf.upfronthosting.co.za> Message-ID: <1212241760.64.0.0978196091903.issue3018@psf.upfronthosting.co.za> New submission from Guilherme Polo : I've fixed the tkinter demos at py3k. And excluding the import fixes, most of these could be backported to python 2.x too. ---------- components: Tkinter files: tkinter_demo_fixes.diff keywords: patch messages: 67579 nosy: gpolo severity: normal status: open title: tkinter demos fixed versions: Python 3.0 Added file: http://bugs.python.org/file10486/tkinter_demo_fixes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 15:53:26 2008 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 31 May 2008 13:53:26 +0000 Subject: [issue3018] tkinter demos fixed In-Reply-To: <1212241760.64.0.0978196091903.issue3018@psf.upfronthosting.co.za> Message-ID: <1212242006.04.0.657768302614.issue3018@psf.upfronthosting.co.za> Guilherme Polo added the comment: I forgot to say that some demos weren't fixed by the previous patch, demo/reasons below: guido/ss1 rexec is gone guido/MimeViewer can't test it right now guido/mbox can't test it right now guido/ManPage partly fixed, may contain UnicodeDecodeError issues _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 16:40:24 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 May 2008 14:40:24 +0000 Subject: [issue3010] Module cmd documentation enhancement In-Reply-To: <1212155817.24.0.228459769095.issue3010@psf.upfronthosting.co.za> Message-ID: <1212244824.9.0.551307123121.issue3010@psf.upfronthosting.co.za> Georg Brandl added the comment: Converted to reST and applied in r63830. Thanks! ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 16:48:46 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 May 2008 14:48:46 +0000 Subject: [issue3005] EasyDialogs - documentation enhancement In-Reply-To: <1212086626.42.0.0907184132146.issue3005@psf.upfronthosting.co.za> Message-ID: <1212245326.78.0.799875608136.issue3005@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, added the sentence in r63831. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 17:34:52 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 31 May 2008 15:34:52 +0000 Subject: [issue2138] Add a factorial function In-Reply-To: <1203329368.91.0.915653416666.issue2138@psf.upfronthosting.co.za> Message-ID: <1212248092.14.0.124159680427.issue2138@psf.upfronthosting.co.za> Mark Dickinson added the comment: Contrary to what I said above, I'm not going to find time for this before the beta. Anyone else want to have a go at producing a patch? A simple implementation would be fine---the algorithm could be tweaked for speed later. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 17:37:32 2008 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 31 May 2008 15:37:32 +0000 Subject: [issue2138] Add a factorial function In-Reply-To: <1203329368.91.0.915653416666.issue2138@psf.upfronthosting.co.za> Message-ID: <1212248252.13.0.145415871385.issue2138@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 20:31:55 2008 From: report at bugs.python.org (Bill Janssen) Date: Sat, 31 May 2008 18:31:55 +0000 Subject: [issue2936] ctypes.util.find_library() doesn't consult LD_LIBRARY_PATH In-Reply-To: <48406A6B.6000208@ctypes.org> Message-ID: <4b3e516a0805311131o7f9d539fybd9b6fee13fc15bd@mail.gmail.com> Bill Janssen added the comment: Yes, I've read that explanation, but I still don't see what the point of find_library() is. Are you trying to resolve a possibly ambiguous reference to a shared library to the one which is used by the Python interpreter? If that's the case (and that's what the code seems to do), how about calling it "find_library_used_by_python", and have another function, perhaps called "find_library", which, given a partial name like "foo", searches the LD_LIBRARY_PATH (or, on Darwin, the DYLD_LIBRARY_PATH), if set, then the standard system locations, the, on Darwin, the DYLD_FALLBACK_LIBRARY_PATH, to find a library called "libfoo.so.N" (or, on Darwin, "libfoo.N.dylib")? That would be very useful. Right now, I don't see the use case for find_library(). Bill On Fri, May 30, 2008 at 1:58 PM, Thomas Heller wrote: > > Thomas Heller added the comment: > > > The question is, which linker? I think it should be ld.so, which links > "on > > demand", and does pay attention to LD_LIBRARY_PATH. I'm not sure what > the > > point of find_library() is, otherwise. > > The best explanation is in the python docs: > http://docs.python.org/lib/ctypes-finding-shared-libraries.html > > _______________________________________ > Python tracker > > _______________________________________ > Added file: http://bugs.python.org/file10487/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Sat May 31 20:32:50 2008 From: report at bugs.python.org (Florian Mayer) Date: Sat, 31 May 2008 18:32:50 +0000 Subject: [issue3019] Python3a5 compile failing due to high memory usage In-Reply-To: <1212258770.12.0.665769337301.issue3019@psf.upfronthosting.co.za> Message-ID: <1212258770.12.0.665769337301.issue3019@psf.upfronthosting.co.za> New submission from Florian Mayer : I have tried building Python3a5 today using the tarball offered on your internet site. The process './python -E setup.py build' keeps on allocating my memory using more than 80% of my RAM, I am certain that it would have used more if I had not cancelled it. When I use ltrace to track the system calls and put it into the Makefile, the resource usage still raises but much slower, if I use ltrace and supply it a PID, the memory usage raises as fast as normal. I think this is due to something in ltrace, it's understandable because it produced a file of more than 600MB. I attached an excerpt of the output of ltrace, showing you how the system calls seem to repeat, and the output of './configure', 'make', 'uname -a', 'lspci' and 'lsmod' so you have some data about my system. I also got a screenshot showing the output of htop, make and strace together: http://img516.imageshack.us/img516/2275/screenshot1ab8.png. Maybe the output of two different programs(ltrace and strace) will help you too. I tried out building the current SVN py3k branch, resulting in a similar problem. PS: It would help if you allowed uploading of multiple files to bug reports ---------- components: Build files: output messages: 67585 nosy: segfaulthunter severity: normal status: open title: Python3a5 compile failing due to high memory usage type: compile error versions: Python 3.0 Added file: http://bugs.python.org/file10488/output _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 20:53:12 2008 From: report at bugs.python.org (Bill Janssen) Date: Sat, 31 May 2008 18:53:12 +0000 Subject: [issue2936] ctypes.util.find_library() doesn't consult LD_LIBRARY_PATH In-Reply-To: <48406A6B.6000208@ctypes.org> Message-ID: <4b3e516a0805311152m3674dfafg2ada5c3d20ec0ba0@mail.gmail.com> Bill Janssen added the comment: OK, I went back and read the code. What I should be using is "ctypes.cdll.LoadLibrary("libgoodstuff.1.dylib")". Thanks -- I think you can close this issue. Bill On Fri, May 30, 2008 at 1:58 PM, Thomas Heller wrote: > > Thomas Heller added the comment: > > > The question is, which linker? I think it should be ld.so, which links > "on > > demand", and does pay attention to LD_LIBRARY_PATH. I'm not sure what > the > > point of find_library() is, otherwise. > > The best explanation is in the python docs: > http://docs.python.org/lib/ctypes-finding-shared-libraries.html > > _______________________________________ > Python tracker > > _______________________________________ > Added file: http://bugs.python.org/file10489/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Sat May 31 21:34:49 2008 From: report at bugs.python.org (Florian Mayer) Date: Sat, 31 May 2008 19:34:49 +0000 Subject: [issue3019] Python3a5 compile failing due to high memory usage In-Reply-To: <1212258770.12.0.665769337301.issue3019@psf.upfronthosting.co.za> Message-ID: <1212262489.25.0.264209718546.issue3019@psf.upfronthosting.co.za> Florian Mayer added the comment: Added the output of GDB as the memory usage was nearing 70%. Hope it helps. Added file: http://bugs.python.org/file10490/gdb_output _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 22:22:05 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 31 May 2008 20:22:05 +0000 Subject: [issue2138] Add a factorial function In-Reply-To: <1203329368.91.0.915653416666.issue2138@psf.upfronthosting.co.za> Message-ID: <1212265325.32.0.131247636792.issue2138@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I've got in from here. ---------- assignee: marketdickinson -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 23:29:20 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 May 2008 21:29:20 +0000 Subject: [issue3019] Python3a5 compile failing due to high memory usage In-Reply-To: <1212258770.12.0.665769337301.issue3019@psf.upfronthosting.co.za> Message-ID: <1212269360.0.0.643120850042.issue3019@psf.upfronthosting.co.za> Georg Brandl added the comment: Turns out this is due to GCC 4.3 being used. Dupe of #2626. ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 31 23:57:52 2008 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sat, 31 May 2008 21:57:52 +0000 Subject: [issue2584] numeric overflow in IDLE In-Reply-To: <1207667953.02.0.926823971175.issue2584@psf.upfronthosting.co.za> Message-ID: <1212271072.91.0.762591664212.issue2584@psf.upfronthosting.co.za> Changes by Kurt B. Kaiser : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________