From report at bugs.python.org Wed Apr 1 00:03:53 2009 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 31 Mar 2009 22:03:53 +0000 Subject: [issue5337] Scanner class in re module undocumented In-Reply-To: <1235235366.45.0.579114073683.issue5337@psf.upfronthosting.co.za> Message-ID: <1238537033.09.0.728425979857.issue5337@psf.upfronthosting.co.za> Matthew Barnett added the comment: One of the limitations is that it identifies what matched by using capture groups, so if the expressions provided contain captures then it gets confused! :-) I handled that by 1) rejecting named captures and 2) changing unnamed captures into non-captures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 00:03:53 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 22:03:53 +0000 Subject: [issue5563] Document bdist_msi In-Reply-To: <1238023978.65.0.898272761153.issue5563@psf.upfronthosting.co.za> Message-ID: <1238537033.77.0.640375057239.issue5563@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r70905. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 00:06:40 2009 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 31 Mar 2009 22:06:40 +0000 Subject: [issue909005] asyncore fixes and improvements Message-ID: <1238537200.97.0.460878119265.issue909005@psf.upfronthosting.co.za> Josiah Carlson added the comment: Just to make this clear, Aleksi is proposing close() should be called automatically by some higher-level functionality whether a user has overridden handle_close() or not. With the updated asyncore warning suppression stuff, overriding handle_close() for the sake of suppressing the warnings should no longer be necessary. While I can see that it would be *convenient* if close() was automatically called, the method is called "handle_close()", and there is an expectation about the implementation thereof. For example, you call socket.recv() in handle_read(), you call socket.send() in handle_write(), call socket.accept() in handle_accept(). Is it too much to expect that a user will call .close() inside handle_close()? The answer to that last question is a "no", btw. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 00:07:47 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 22:07:47 +0000 Subject: [issue5633] fix for timeit when the statment is a string and the setup is not (and tests) In-Reply-To: <1238533299.21.0.751134071386.issue5633@psf.upfronthosting.co.za> Message-ID: <1238537267.62.0.183879764605.issue5633@psf.upfronthosting.co.za> Georg Brandl added the comment: I'll look at it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 00:12:05 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 22:12:05 +0000 Subject: [issue1651995] sgmllib _convert_ref UnicodeDecodeError exception, new in 2.5 Message-ID: <1238537525.95.0.495451026831.issue1651995@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r70906. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 00:18:38 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 22:18:38 +0000 Subject: [issue3427] urllib documentation: urlopen().info() return type In-Reply-To: <1216746335.31.0.451776222673.issue3427@psf.upfronthosting.co.za> Message-ID: <1238537918.92.0.737249033994.issue3427@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r70907. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 00:26:51 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 31 Mar 2009 22:26:51 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1238538411.22.0.747089518867.issue1161031@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: If you're talking about r70904 then you did a different thing than the one I suggested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 00:36:04 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 22:36:04 +0000 Subject: [issue5617] Unicode printing in gdb post-mortem sessions In-Reply-To: <1238462770.71.0.542276550689.issue5617@psf.upfronthosting.co.za> Message-ID: <1238538964.76.0.910631822426.issue5617@psf.upfronthosting.co.za> Georg Brandl added the comment: Added in r70912. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Wed Apr 1 00:38:32 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Tue, 31 Mar 2009 22:38:32 +0000 Subject: [issue5583] Optional extensions in setup.py In-Reply-To: <1238200962.29.0.771243104654.issue5583@psf.upfronthosting.co.za> Message-ID: <1238539112.03.0.845264781316.issue5583@psf.upfronthosting.co.za> Tarek Ziad? added the comment: done in r70910 and r70914 ---------- priority: -> normal status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 00:41:11 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 31 Mar 2009 22:41:11 +0000 Subject: [issue5018] Overly general claim about sequence unpacking in tutorial In-Reply-To: <1232502866.59.0.0196070815621.issue5018@psf.upfronthosting.co.za> Message-ID: <1238539271.55.0.925330952801.issue5018@psf.upfronthosting.co.za> Georg Brandl added the comment: I've just removed the paragraph about the asymmetry in r70915. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 00:45:01 2009 From: report at bugs.python.org (Jesse Noller) Date: Tue, 31 Mar 2009 22:45:01 +0000 Subject: [issue5619] Pass MS CRT debug flags into subprocesses In-Reply-To: <1238472783.0.0.132667741337.issue5619@psf.upfronthosting.co.za> Message-ID: <1238539501.4.0.3973851873.issue5619@psf.upfronthosting.co.za> Jesse Noller added the comment: Committed to py3k, 26 maint, trunk, 3k maint r70908 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 00:58:59 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 31 Mar 2009 22:58:59 +0000 Subject: [issue909005] asyncore fixes and improvements Message-ID: <1238540339.28.0.855027243211.issue909005@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I agree with Josiah but I must say that the handle_close() documentation is a bit misleading. Currently it states: > handle_close() > Called when the socket is closed. I'd change it with something like this: "Called when the asynchronous loop detects that the connection on a selectable object has been closed. When overridden the user is supposed to explicitly call the close() method to actually remove the channel from the global map ." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 01:00:31 2009 From: report at bugs.python.org (Brett Cannon) Date: Tue, 31 Mar 2009 23:00:31 +0000 Subject: [issue3087] Clean up Demos and Tools In-Reply-To: <1213238540.5.0.535212077097.issue3087@psf.upfronthosting.co.za> Message-ID: <1238540431.78.0.765512395466.issue3087@psf.upfronthosting.co.za> Brett Cannon added the comment: This is not really a bug so closing. ---------- nosy: +brett.cannon resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 01:03:35 2009 From: report at bugs.python.org (Brett Cannon) Date: Tue, 31 Mar 2009 23:03:35 +0000 Subject: [issue1665206] Hangup when using cgitb in a thread while still in import Message-ID: <1238540615.1.0.807412290364.issue1665206@psf.upfronthosting.co.za> Brett Cannon added the comment: The freeze is occurring from cgitb importing from within the html function. That is hitting the import lock that is being held in bar. Moving the imports out of the functions to the top of the module should fix this. ---------- priority: normal -> low stage: -> needs patch type: -> performance versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 01:11:24 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 31 Mar 2009 23:11:24 +0000 Subject: [issue978604] wait_variable hangs at exit Message-ID: <1238541084.43.0.983554742565.issue978604@psf.upfronthosting.co.za> Guilherme Polo added the comment: Using this patch I noticed two problems appeared when running WaitTest.py 1) Closing the window results in: "_tkinter.TclError: can't invoke "tkwait" command: application has been destroyed" which I'm not considering as a bug, maybe the user can get confused about this but if the application were doing something like WaitTest.py does then it should also be aware that this could happen. 2) Pressing Ctrl-c hits a different problem, causing ::tkerror to be called, which I'm considering a bug that I still have to check. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 01:11:56 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 31 Mar 2009 23:11:56 +0000 Subject: [issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse In-Reply-To: <1238519324.96.0.24578067817.issue5628@psf.upfronthosting.co.za> Message-ID: <1238541116.84.0.768276990165.issue5628@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70928. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 01:22:10 2009 From: report at bugs.python.org (David Christian) Date: Tue, 31 Mar 2009 23:22:10 +0000 Subject: [issue5635] test_sys reference counting fails while tracing In-Reply-To: <1238541730.73.0.292702158526.issue5635@psf.upfronthosting.co.za> Message-ID: <1238541730.73.0.292702158526.issue5635@psf.upfronthosting.co.za> New submission from David Christian : test_sys refcount test checks that assigning None to a local variable n increases the references to None by exactly 1. However sys.settrace is set, then the frame object must be instantiated to be passed to the trace object. This increments the reference count to None again. Since the locals are not then removed from the frame object after the sys.settrace call, the number of references remains increased after the settrace function is exited. This problem can be avoided by making n a global. ---------- files: refcount.patch keywords: patch messages: 84946 nosy: dugan severity: normal status: open title: test_sys reference counting fails while tracing Added file: http://bugs.python.org/file13530/refcount.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 01:23:08 2009 From: report at bugs.python.org (Beau Butler) Date: Tue, 31 Mar 2009 23:23:08 +0000 Subject: [issue5155] Multiprocessing.Queue created by sub-process fails when used in sub-sub-process ("bad file descriptor" in q.get()) In-Reply-To: <1233798773.64.0.357189782395.issue5155@psf.upfronthosting.co.za> Message-ID: <1238541788.36.0.0241269106433.issue5155@psf.upfronthosting.co.za> Beau Butler added the comment: Quick note: Have tracked this down to what appears to be buggy behaviour on the part of os.pipe() when called from within a Process. First invocation of os.pipe() in a Process returns (0,x) - stdin(?) resulting in the 'bad file descriptor' error. Interactive prompt test follows: >>> import multiprocessing as MP, os >>> def r(): print os.pipe(), os.pipe(), os.pipe() ... >>> r() (9, 10) (11, 12) (13, 14) >>> MP.Process(target=r).start() (0, 15) (16, 17) (18, 19) >>> MP.Process(target=r).start() (0, 15) (16, 17) (18, 19) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 01:33:36 2009 From: report at bugs.python.org (Frank Chu) Date: Tue, 31 Mar 2009 23:33:36 +0000 Subject: [issue3392] subprocess fails in select when descriptors are large In-Reply-To: <1216293940.59.0.136491841956.issue3392@psf.upfronthosting.co.za> Message-ID: <1238542416.5.0.315537199917.issue3392@psf.upfronthosting.co.za> Frank Chu added the comment: Updated with new patch. I moved the try: except logic in the module initialization step so I get a global has_poll, similar to the global mswindows already there. I now use a try/except/else to be more robust (not needed now since it's only "has_poll = True", but I think it's better code. ---------- Added file: http://bugs.python.org/file13531/subprocess_with_poll3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 01:48:07 2009 From: report at bugs.python.org (Jack Diederich) Date: Tue, 31 Mar 2009 23:48:07 +0000 Subject: [issue5228] multiprocessing not compatible with functools.partial In-Reply-To: <1234448790.05.0.305625917638.issue5228@psf.upfronthosting.co.za> Message-ID: <1238543287.93.0.66852287449.issue5228@psf.upfronthosting.co.za> Jack Diederich added the comment: Fixed rev 70931. Happy pickling! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 02:02:35 2009 From: report at bugs.python.org (Jack Diederich) Date: Wed, 01 Apr 2009 00:02:35 +0000 Subject: [issue1730959] telnetlib: A callback for monitoring the telnet session Message-ID: <1238544155.97.0.789312101636.issue1730959@psf.upfronthosting.co.za> Jack Diederich added the comment: class MyTelnet(Telnet): def read_until(self, *args) txt = Telnet.read_until(self, *args) sys.stdout.write(txt) return txt Hope that helps, closing the bug. ---------- nosy: +jackdied resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 02:04:29 2009 From: report at bugs.python.org (Senthil) Date: Wed, 01 Apr 2009 00:04:29 +0000 Subject: [issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse In-Reply-To: <1238519324.96.0.24578067817.issue5628@psf.upfronthosting.co.za> Message-ID: <1238544269.99.0.274865209164.issue5628@psf.upfronthosting.co.za> Senthil added the comment: Nope, this is not yet fixed. $ ./python Python 3.1a1+ (py3k:70929, Mar 31 2009, 19:18:12) [GCC 4.3.2] on linux2 ... ... >>> f_bytes = urllib.request.urlopen("http://www.python.org") >>> f_string = io.TextIOWrapper(f_bytes,"iso-8859-1") >>> print(f_string.read()) Traceback (most recent call last): File "", line 1, in IOError: not readable ---------- nosy: +orsenthil resolution: fixed -> accepted status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 02:04:42 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 00:04:42 +0000 Subject: [issue5635] test_sys reference counting fails while tracing In-Reply-To: <1238541730.73.0.292702158526.issue5635@psf.upfronthosting.co.za> Message-ID: <1238544282.32.0.491357132985.issue5635@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r70933. Thanks! ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 02:36:08 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 01 Apr 2009 00:36:08 +0000 Subject: [issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse In-Reply-To: <1238519324.96.0.24578067817.issue5628@psf.upfronthosting.co.za> Message-ID: <1238546168.57.0.136066179911.issue5628@psf.upfronthosting.co.za> Antoine Pitrou added the comment: urllib.response.addinfourl doesn't seem to implement the required ABC (BufferedIOBase) properly. It misses the read1() method. Also, it claims not to be readable: >>> f_bytes = urllib.request.urlopen("http://www.python.org/") >>> f_bytes.readable() False ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 02:38:17 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 01 Apr 2009 00:38:17 +0000 Subject: [issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse In-Reply-To: <1238519324.96.0.24578067817.issue5628@psf.upfronthosting.co.za> Message-ID: <1238546297.31.0.447373925933.issue5628@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- priority: -> high resolution: accepted -> type: -> behavior versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 03:14:36 2009 From: report at bugs.python.org (Tony Joblin) Date: Wed, 01 Apr 2009 01:14:36 +0000 Subject: [issue5636] csv.reader next() method missing In-Reply-To: <1238548476.16.0.332919263338.issue5636@psf.upfronthosting.co.za> Message-ID: <1238548476.16.0.332919263338.issue5636@psf.upfronthosting.co.za> New submission from Tony Joblin : On windows using 3.0.1 the csv.reader.next() public method is missing. The documentation says that this method should exist and it does exist in previous versions. There is a __next__ method available and constructs like: for row in reader print(row) still work. ---------- components: Windows messages: 84954 nosy: tonyjoblin severity: normal status: open title: csv.reader next() method missing type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 03:39:36 2009 From: report at bugs.python.org (R. David Murray) Date: Wed, 01 Apr 2009 01:39:36 +0000 Subject: [issue4886] test/regrtest.py contains error on __import__ In-Reply-To: <1231449686.43.0.781017317614.issue4886@psf.upfronthosting.co.za> Message-ID: <1238549976.56.0.184246937566.issue4886@psf.upfronthosting.co.za> R. David Murray added the comment: regrtest is an internal tool for testing python, and is not suited to be used as a general testing framework. You would be far better off using one of the 3rd party packages designed for that task. We don't have the resources to support use of regrtest for anything except testing of python itself. ---------- nosy: +bitdancer resolution: -> rejected stage: -> committed/rejected status: open -> closed type: behavior -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 03:46:15 2009 From: report at bugs.python.org (R David Murray) Date: Wed, 01 Apr 2009 01:46:15 +0000 Subject: [issue5353] Improve IndexError messages with actual values In-Reply-To: <1235414311.83.0.833112713041.issue5353@psf.upfronthosting.co.za> Message-ID: <1238550375.3.0.665185918126.issue5353@psf.upfronthosting.co.za> Changes by R David Murray : ---------- nosy: +r.david.murray -bitdancer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 03:57:02 2009 From: report at bugs.python.org (Senthil) Date: Wed, 01 Apr 2009 01:57:02 +0000 Subject: [issue5637] 2to3 does not convert urllib.urlopen to urllib.request.urlopen In-Reply-To: <1238551022.24.0.463432313749.issue5637@psf.upfronthosting.co.za> Message-ID: <1238551022.24.0.463432313749.issue5637@psf.upfronthosting.co.za> New submission from Senthil : In Py2x, have this code: import urllib s = urllib.urlopen('http://www.python.org') print s Run 2to3, on this, refactoring works only on import urllib and print statements. @@ -1,3 +1,3 @@ -import urllib +import urllib.request, urllib.parse, urllib.error s = urllib.urlopen('http://www.python.org') -print s +print(s) There urllib.urlopen, needs to be refactored into urllib.request.urlopen ---------- messages: 84956 nosy: orsenthil severity: normal status: open title: 2to3 does not convert urllib.urlopen to urllib.request.urlopen type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 03:57:24 2009 From: report at bugs.python.org (R. David Murray) Date: Wed, 01 Apr 2009 01:57:24 +0000 Subject: [issue2409] regrtest should not just skip imports that fail In-Reply-To: <1205875348.54.0.487257679211.issue2409@psf.upfronthosting.co.za> Message-ID: <1238551044.42.0.579101059181.issue2409@psf.upfronthosting.co.za> Changes by R. David Murray : Removed file: http://bugs.python.org/file9760/issue2409.diff _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Wed Apr 1 04:03:59 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Wed, 01 Apr 2009 02:03:59 +0000 Subject: [issue5636] csv.reader next() method missing In-Reply-To: <1238548476.16.0.332919263338.issue5636@psf.upfronthosting.co.za> Message-ID: <1238551439.72.0.291142352364.issue5636@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't think that's a bug in the code, but in the documentation. Iterators in 3.x are implemented with __next__ methods, and the next() builtin. ---------- assignee: -> georg.brandl components: +Documentation -Windows nosy: +georg.brandl, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 04:06:30 2009 From: report at bugs.python.org (R. David Murray) Date: Wed, 01 Apr 2009 02:06:30 +0000 Subject: [issue2409] regrtest should not just skip imports that fail In-Reply-To: <1205875348.54.0.487257679211.issue2409@psf.upfronthosting.co.za> Message-ID: <1238551590.84.0.557180400096.issue2409@psf.upfronthosting.co.za> R. David Murray added the comment: Fixed as of r70930 on trunk and shortly thereafter on the py3k branch. I did this at the pycon sprint, and unfortunately I only discovered this issue and your patches after I was done. So thank you for your work and I'm sorry it didn't actually get used (it would have allowed me to get done faster if I'd known about it). The solution implemented is very similar to yours, though different in a few details. ---------- nosy: +bitdancer resolution: -> fixed status: open -> closed versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 04:06:58 2009 From: report at bugs.python.org (Guilherme Polo) Date: Wed, 01 Apr 2009 02:06:58 +0000 Subject: [issue978604] wait_variable hangs at exit Message-ID: <1238551618.21.0.770416287171.issue978604@psf.upfronthosting.co.za> Guilherme Polo added the comment: Ah.. number 2 is problematic. Before continuing lets reduce the previous WaitTest.py to this (which shows the same problems): import Tkinter root = Tkinter.Tk() waitVar = Tkinter.BooleanVar() root.after(3000, lambda: waitVar.set(True)) root.wait_variable(waitVar) When you run this, it will schedule the call to this lambda to happen 3 seconds later, and will block on the wait_variable call. Now suppose you hit Ctrl-c while you are stuck into a Tcl_EvalObjv call (Tcl_EvalObjv will end up being called after invoking wait_variable). Python will not notice this Ctrl-c for now (we are on Tcl land now), but eventually the event you scheduled earlier is fired. PythonCmd is called to handle it, which will then call the anonymous func, but since you pressed Ctrl-c it will return NULL and PythonCmd will call PythonCmd_Error to handle it. PythonCmd_Error sets errInCmd to 1, saves the exception and returns an TCL_ERROR indicator, this causes tkerror to be called. tkerror is a function created in Tkinter.py, which does nothing so that previous saved exception is not used. Next what happens is that the lambda function didn't execute, the tk variable didn't change and you are still blocked on wait_variable (this situation seems normal to me). So what I did here, and I'm not sure if it would be accepted or not, was create a new function in _tkinter.c called Tkinter_PrintError (accessible through _tkinter._print_error) that restores the saved exception and prints it. Now you might ask why not raise it instead ? Martin that is on the nosy list will agree with me, I think. Raising an error at this point will cause an Tk dialog to popup and it won't contain a proper traceback (if done this way I did), which is annoying. Note that even though PythonCmd_Error set errInCmd to 1, it was never used because the mainloop wasn't running (it also wouldn't make much difference to put a root.mainloop() after wait_variable since we would be blocked before the mainloop started). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 04:12:26 2009 From: report at bugs.python.org (R. David Murray) Date: Wed, 01 Apr 2009 02:12:26 +0000 Subject: [issue2259] Poor support other than 44.1khz, 16bit audio files? In-Reply-To: <1205075207.56.0.203597492215.issue2259@psf.upfronthosting.co.za> Message-ID: <1238551946.81.0.928600801613.issue2259@psf.upfronthosting.co.za> R. David Murray added the comment: If you can provide a small audio file that demonstrates the problem that might be enough to get both of these issues moving, since I could write a test using that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 04:26:50 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Wed, 01 Apr 2009 02:26:50 +0000 Subject: [issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse In-Reply-To: <1238519324.96.0.24578067817.issue5628@psf.upfronthosting.co.za> Message-ID: <1238552810.08.0.327074889225.issue5628@psf.upfronthosting.co.za> Jeremy Hylton added the comment: I just wanted to mention that the current head of py3k returns an http.client.HTTPResponse and not a urllib.respone.addinfourl. That doesn't mean it is the right thing to pass to TextIOWrapper. It's an instance of RawIOBase. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 04:26:57 2009 From: report at bugs.python.org (Senthil) Date: Wed, 01 Apr 2009 02:26:57 +0000 Subject: [issue4535] Build / Test Py3K failed on Ubuntu 8.10 In-Reply-To: <1228423046.58.0.110673745829.issue4535@psf.upfronthosting.co.za> Message-ID: <1238552817.01.0.468292905034.issue4535@psf.upfronthosting.co.za> Senthil added the comment: Ubuntu 8.10; On Python 3.0.1 (r301:69556, Mar 31 2009, 22:18:10) [GCC 4.3.2] on linux2 297 tests OK. 26 tests skipped: test_bz2 test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses test_dbm_gnu test_dbm_ndbm test_kqueue test_nis test_normalization test_ossaudiodev test_pep277 test_socketserver test_sqlite test_ssl test_startfile test_tcl test_timeout test_urllib2net test_urllibnet test_winreg test_winsound test_xmlrpc_net test_zipfile64 5 skips unexpected on linux2: test_tcl test_dbm_ndbm test_ssl test_bz2 test_dbm_gnu No failures. Closing this issue. ---------- assignee: -> orsenthil nosy: +orsenthil resolution: -> works for me status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 04:34:33 2009 From: report at bugs.python.org (Senthil) Date: Wed, 01 Apr 2009 02:34:33 +0000 Subject: [issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse In-Reply-To: <1238552810.08.0.327074889225.issue5628@psf.upfronthosting.co.za> Message-ID: <7c42eba10903311934w6449b50erb4ac05688f88d6c5@mail.gmail.com> Senthil added the comment: Jeremy Hylton wrote: > ?That doesn't mean it is the right thing to pass to TextIOWrapper. ?It's an > instance of RawIOBase. I guess, you meant " That doesn't mean it is *not* the right thing to pass to TextIOWrapper". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 04:37:03 2009 From: report at bugs.python.org (Mitchell Model) Date: Wed, 01 Apr 2009 02:37:03 +0000 Subject: [issue5601] webbrowser doesn't just open browsers In-Reply-To: <1238533794.61.0.39715369046.issue5601@psf.upfronthosting.co.za> Message-ID: Mitchell Model added the comment: The problem is not so much that I think people should use it for file URLs, it's that the behavior when they do can be quite confusing. Perhaps a note that webbrowser is not meant for file URLs and that it's behavior is undefined if it is? -- -- --- Mitchell ---------- Added file: http://bugs.python.org/file13532/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Re: [issue5601] webbrowser doesn't just open browsers
The problem is not so much that I think people should use it for file URLs, it's that the behavior when they do can be quite confusing. Perhaps a note that webbrowser is not meant for file URLs and that it's behavior is undefined if it is?
--
--

        --- Mitchell
From report at bugs.python.org Wed Apr 1 04:40:25 2009 From: report at bugs.python.org (R. David Murray) Date: Wed, 01 Apr 2009 02:40:25 +0000 Subject: [issue5353] Improve IndexError messages with actual values In-Reply-To: <1235414311.83.0.833112713041.issue5353@psf.upfronthosting.co.za> Message-ID: <1238553625.14.0.0780038357756.issue5353@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray -r.david.murray-old _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 04:42:04 2009 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 01 Apr 2009 02:42:04 +0000 Subject: [issue5110] Printing Unicode chars from the interpreter in a non-UTF8 terminal raises an error (Py3) In-Reply-To: <1233329209.55.0.55287436123.issue5110@psf.upfronthosting.co.za> Message-ID: <1238553724.68.0.824866155045.issue5110@psf.upfronthosting.co.za> Ezio Melotti added the comment: In the first message I said that this breaks the PEP3138 because I thought that the solution was to change the default error-handler to 'backslashreplace', but this was already proposed and refused. sys.displayhook provides a way to change the behavior of the interactive interpreter only when ">>> foo" is used. The PEP doesn't seem to say anything about how ">>> foo" should behave. Moreover, in the alternate solutions [1] they considered to use sys.displayhook (and sys.excepthook) but they didn't because "these hooks are called only when printing the result of evaluating an expression entered in an interactive Python session, and doesn't work for the print() function, for non-interactive sessions or for logging.debug("%r", ...), etc." This is exactly the behavior I intended to have, and, being a unique feature of the interactive interpreter, it doesn't lead to inconsistence with other situations. [1]: http://www.python.org/dev/peps/pep-3138/#alternate-solutions ---------- nosy: +atsuoi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 04:49:59 2009 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 01 Apr 2009 02:49:59 +0000 Subject: [issue992389] attribute error after non-from import Message-ID: <1238554199.23.0.400543083132.issue992389@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'm sorely tempted to apply the Van Lindberg clause to the last two responses by Torsten and Nick. If there was an easy solution it wouldn't have been open for five years. If you don't believe me, post a fix. I'll even accept a fix for the importlib package, which should lower the bar quite a bit compared to a fix for import.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 05:01:16 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 03:01:16 +0000 Subject: [issue5601] webbrowser doesn't just open browsers In-Reply-To: <1238384777.3.0.774822780209.issue5601@psf.upfronthosting.co.za> Message-ID: <1238554876.96.0.189292746529.issue5601@psf.upfronthosting.co.za> Georg Brandl added the comment: That would be nice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 05:04:30 2009 From: report at bugs.python.org (Senthil) Date: Wed, 01 Apr 2009 03:04:30 +0000 Subject: [issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse In-Reply-To: <1238519324.96.0.24578067817.issue5628@psf.upfronthosting.co.za> Message-ID: <1238555070.46.0.0597258770788.issue5628@psf.upfronthosting.co.za> Senthil added the comment: With the changes r70935, this works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 05:07:22 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 01 Apr 2009 03:07:22 +0000 Subject: [issue5630] Update CObject API so it is safe and regular In-Reply-To: <1238526469.89.0.691687509266.issue5630@psf.upfronthosting.co.za> Message-ID: <1238555242.66.0.762092748038.issue5630@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +ajaksu2 type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 05:11:19 2009 From: report at bugs.python.org (Tony Nelson) Date: Wed, 01 Apr 2009 03:11:19 +0000 Subject: [issue5638] test_httpservers fails CGI tests if --enable-shared In-Reply-To: <1238555479.53.0.0126068485544.issue5638@psf.upfronthosting.co.za> Message-ID: <1238555479.53.0.0126068485544.issue5638@psf.upfronthosting.co.za> New submission from Tony Nelson : test_httpservers fails the CGI tests if Python was built as a shared library (./config --enable-shared) and not yet installed. To run such a Python without installing it, the command line must define LD_LIBRARY_PATH to point to the build directory. I see that the new environment for the child CGI process still has LD_LIBRARY_PATH set. The child process is not using that when the CGI is invoked. After the new shared Python (or one like it) is installed, the test passes, but the CGIs aren't using the correct copy of Python. I'm doing this with Python 2.6.1, but the version probably doesn't matter. ---------- components: Tests messages: 84969 nosy: tony_nelson severity: normal status: open title: test_httpservers fails CGI tests if --enable-shared type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 05:17:06 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 01 Apr 2009 03:17:06 +0000 Subject: [issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse In-Reply-To: <1238555070.46.0.0597258770788.issue5628@psf.upfronthosting.co.za> Message-ID: <1afaf6160903312017v63d1c2u2434fdb4e6cef92b@mail.gmail.com> Benjamin Peterson added the comment: Please note that passing a instance of RawIOBase (as HTTPResponse) is to TextIOWrapper is *not* supported. You must first wrap the raw IO in a BufferIOBase instance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 05:20:17 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 01 Apr 2009 03:20:17 +0000 Subject: [issue4535] Build / Test Py3K failed on Ubuntu 8.10 In-Reply-To: <1228423046.58.0.110673745829.issue4535@psf.upfronthosting.co.za> Message-ID: <1238556017.44.0.706205912485.issue4535@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 05:22:30 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 01 Apr 2009 03:22:30 +0000 Subject: [issue1659171] Calling tparm from extension lib fails in Python 2.5 Message-ID: <1238556150.61.0.401296164744.issue1659171@psf.upfronthosting.co.za> Daniel Diniz added the comment: Thanks, Richard! If someone confirms it, please reopen. ---------- resolution: -> out of date stage: test needed -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 05:36:42 2009 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 01 Apr 2009 03:36:42 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238557002.38.0.779036749599.issue1641@psf.upfronthosting.co.za> Guido van Rossum added the comment: At the language summit last Thursday there was widespread disappointment with the changes to asyncore.py in 2.6, which broke almost all code that actually uses it. Unfortunately, the documented API is lame, so everybody depended on undocumented internals, and those were changed without respect for established use. I'd like to prevent more problems like that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 05:42:14 2009 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 01 Apr 2009 03:42:14 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238557334.38.0.625840394604.issue2578@psf.upfronthosting.co.za> Guido van Rossum added the comment: I absolutely do not want it to warn by default in 3.1. PendingDeprecationError is fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 05:51:15 2009 From: report at bugs.python.org (R. David Murray) Date: Wed, 01 Apr 2009 03:51:15 +0000 Subject: [issue2522] locale.format() problems with decimal separator In-Reply-To: <1206983289.11.0.844443108334.issue2522@psf.upfronthosting.co.za> Message-ID: <1238557875.46.0.0503787566037.issue2522@psf.upfronthosting.co.za> R. David Murray added the comment: Fixed in r70936/r70938. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 05:55:02 2009 From: report at bugs.python.org (Mitchell Model) Date: Wed, 01 Apr 2009 03:55:02 +0000 Subject: [issue5601] webbrowser doesn't just open browsers In-Reply-To: Message-ID: Mitchell Model added the comment: whoops Sorry for the garbage in the previous message. -- -- --- Mitchell ---------- Added file: http://bugs.python.org/file13533/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Re: [issue5601] webbrowser doesn't just open browsers
whoops

Sorry for the garbage in the previous message.
--
--

        --- Mitchell
From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Wed Apr 1 06:15:23 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Wed, 01 Apr 2009 04:15:23 +0000 Subject: [issue5578] unqualified exec in class body In-Reply-To: <1238164857.67.0.53034733648.issue5578@psf.upfronthosting.co.za> Message-ID: <1238559323.92.0.189844080922.issue5578@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Reopening. The following piece of code changed it behavior between 2.5 and 2.6: def f(): a = 2 class C: exec 'a = 42' abc = a return C print f().abc In 2.6, this returns 2, because static analysis determines that the read of 'a' comes from f's closure, yet the exec gets a new set of locals for the body of C where it stores into. This is highly counter-intuitive. For functions, the issue is resolved by banning exec; the same should (now) happen for classes. ---------- nosy: +loewis status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 06:28:58 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 04:28:58 +0000 Subject: [issue5624] Py3K branch import _winreg instead of winreg In-Reply-To: <1238513640.75.0.770010391975.issue5624@psf.upfronthosting.co.za> Message-ID: <1238560138.33.0.375060819585.issue5624@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r70943. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 06:30:58 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 04:30:58 +0000 Subject: [issue5627] PyDict_SetItemString() fails when the second argument is null In-Reply-To: <1238518033.32.0.364685297824.issue5627@psf.upfronthosting.co.za> Message-ID: <1238560258.8.0.546889690075.issue5627@psf.upfronthosting.co.za> Georg Brandl added the comment: I am not sure why you consider this a bug. You should certainly not pass NULL pointers around where the docs do not explicitly allow this. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 06:33:02 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 04:33:02 +0000 Subject: [issue5631] Distutils "upload" command does not show up in --help-commands output. In-Reply-To: <1238529670.22.0.992833360277.issue5631@psf.upfronthosting.co.za> Message-ID: <1238560382.16.0.981529588282.issue5631@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r70944. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 06:39:06 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 04:39:06 +0000 Subject: [issue1725295] Line ending bug SimpleXMLRPCServer Message-ID: <1238560746.75.0.196068835585.issue1725295@psf.upfronthosting.co.za> Georg Brandl added the comment: CGI specifies \r\n line ends anyway, so this patch goes in the wrong direction. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 07:03:00 2009 From: report at bugs.python.org (Senthil) Date: Wed, 01 Apr 2009 05:03:00 +0000 Subject: [issue3763] Python 3.0 beta 2 : json and urllib not working together? In-Reply-To: <1220433349.91.0.388298659355.issue3763@psf.upfronthosting.co.za> Message-ID: <1238562180.51.0.569899632364.issue3763@psf.upfronthosting.co.za> Senthil added the comment: This is superseded by issue4136. ---------- resolution: -> wont fix superseder: -> merge json library with latest simplejson 2.0.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 07:04:42 2009 From: report at bugs.python.org (Senthil) Date: Wed, 01 Apr 2009 05:04:42 +0000 Subject: [issue3763] Python 3.0 beta 2 : json and urllib not working together? In-Reply-To: <1220433349.91.0.388298659355.issue3763@psf.upfronthosting.co.za> Message-ID: <1238562282.46.0.196726493319.issue3763@psf.upfronthosting.co.za> Senthil added the comment: This is superseded by issue4136. ---------- nosy: +bob.ippolito status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 07:33:14 2009 From: report at bugs.python.org (Euler Taveira de Oliveira) Date: Wed, 01 Apr 2009 05:33:14 +0000 Subject: [issue5627] PyDict_SetItemString() fails when the second argument is null In-Reply-To: <1238518033.32.0.364685297824.issue5627@psf.upfronthosting.co.za> Message-ID: <1238563994.48.0.0573765347896.issue5627@psf.upfronthosting.co.za> Euler Taveira de Oliveira added the comment: I know that it is a good programming practice checking null pointers but sometimes programmers are lazy. ;) I still think that high level functions should check for null pointers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 08:38:25 2009 From: report at bugs.python.org (Phil Pennock) Date: Wed, 01 Apr 2009 06:38:25 +0000 Subject: [issue5639] Support TLS SNI extension in ssl module In-Reply-To: <1238567905.09.0.139467917453.issue5639@psf.upfronthosting.co.za> Message-ID: <1238567905.09.0.139467917453.issue5639@psf.upfronthosting.co.za> New submission from Phil Pennock : With TLS it is possible to have the client use an extension (defined in RFC 4366, and RFC 3546 before that) to indicate to the server which hostname it believes it is talking to. The server can then choose TLS certificates accordingly. This makes virtual-hosting possible. Most modern GUI web-browsers support making use of this extension, Server Name Indication (SNI). OpenSSL 0.9.8f onwards have optional support for this; OpenSSL needs to have been built with "enable-tlsext" in EXTRACONFIGURE. If that is not present, then there's a guard macro defined to say it's absent. This patch, against Python 2.6.1, adds to the standard ssl module the ability to set the extension, using server_hostname as a arg in relevant places. This is only set for client connections and will silently be ignored if the OpenSSL library does not support it. I have tested this on FreeBSD 7.0/amd64 with OpenSSL 0.9.8k when talking to Apache 2.2.x with the SNI patches from https://sni.velox.ch/. Below is my simple test program, to dump raw HTTP results back. With this, I can connect to various local https vhosts and get the correct content back. I am not a Python core dev and not too enthusiastic at the thought of grabbing latest svn to port this across; I hope that it's still of use. ============= import socket import ssl import sys def dump_https_page(hostname, uri='/'): sock = socket.socket(socket.AF_INET) s = ssl.SSLSocket(sock=sock, ca_certs='/etc/ssl/certs', server_hostname=hostname) print 'have socket' s.connect((hostname, 443)) print 'connected' print >>s, 'GET %s HTTP/1.0\r\nHost: %s\r\nConnection: close\r\n\r\n' % ( uri, hostname), t = s.read() while t: print t, t = s.read() if __name__ == '__main__': for x in sys.argv[1:]: dump_https_page(hostname=x) ---------- components: Library (Lib) files: python-2.6.1-tlssni.patch keywords: patch messages: 84984 nosy: pdp severity: normal status: open title: Support TLS SNI extension in ssl module versions: Python 2.6 Added file: http://bugs.python.org/file13534/python-2.6.1-tlssni.patch _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Markus_Niemist=C3=B6_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Wed Apr 1 08:45:31 2009 From: =?utf-8?q?Markus_Niemist=C3=B6_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Markus_Niemist=C3=B6_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Wed, 01 Apr 2009 06:45:31 +0000 Subject: [issue1681974] mkdtemp fails on Windows if username has non-ASCII character Message-ID: <1238568331.53.0.0785288860305.issue1681974@psf.upfronthosting.co.za> Markus Niemist? added the comment: Well, it's not me. As I stated in the problem description, Windows (2000 at least) uses path c:\documents and settings\\local settings\temp as default temp dir, where also python tries to make temp dirs. Now for example if user name is "niemist?", then the temp dir will be ...\niemist?\local settings\temp, which won't work. I'll try do test the latest versions of python soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 09:15:13 2009 From: report at bugs.python.org (Atsuo Ishimoto) Date: Wed, 01 Apr 2009 07:15:13 +0000 Subject: [issue5110] Printing Unicode chars from the interpreter in a non-UTF8 terminal raises an error (Py3) In-Reply-To: <1233329209.55.0.55287436123.issue5110@psf.upfronthosting.co.za> Message-ID: <1238570113.41.0.278947973445.issue5110@psf.upfronthosting.co.za> Atsuo Ishimoto added the comment: My proposal to make backslashreplace a default error handler for interactive session was rejected by Guido [1]. Does something like PYTHONIOENCODING=ascii:backslashreplace work for you? With PYTHONIOENCODING, you can effectively make backslashreplace a default error handler for your environment. [1]: http://mail.python.org/pipermail/python-3000/2008-May/013928.html ---------- nosy: +ishimoto _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 09:35:03 2009 From: report at bugs.python.org (Atsuo Ishimoto) Date: Wed, 01 Apr 2009 07:35:03 +0000 Subject: [issue5640] Wrong print() result when unicode error handler is not 'strict' In-Reply-To: <1238571303.14.0.143713902199.issue5640@psf.upfronthosting.co.za> Message-ID: <1238571303.14.0.143713902199.issue5640@psf.upfronthosting.co.za> New submission from Atsuo Ishimoto : In Python 3(both 3.0.1 and SVN repo), if I set PYTHONIOENCODING=ShiftJIS:backslashreplace, print() outputs wrong result. >>> print("\xff") \xff\xff Obviously, '\xff' should be printed instead of '\xff\xff'. Following is what io module does to print string. >>> import codecs >>> e=codecs.getincrementalencoder("ShiftJIS")("backslashreplace") >>> e.encode("\xff") b'\\xff' >>> e.encode("\n") b'\\xff\n' io module never supply final=True to the encoder. ---------- components: Unicode messages: 84987 nosy: ishimoto severity: normal status: open title: Wrong print() result when unicode error handler is not 'strict' type: behavior versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 10:37:20 2009 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 01 Apr 2009 08:37:20 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1238575040.43.0.842248110997.issue4015@psf.upfronthosting.co.za> anatoly techtonik added the comment: The point is not in generating .bat files. The point is to make scripts executable with exactly the same version of Python the script was installed. It works well on POSIX, but doesn't work on windows at all. There is no other way to fix this on windows than generating separate .exe or .bat launcher. The patch for .bat is ready. Embedding python code inside of .bat is not a good idea, because runner script may be complicated, and additional code in header adds probems with patch submissions and debugging. Not all editors know about magic -x option. KISS, you know. =) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 10:49:38 2009 From: report at bugs.python.org (Glin) Date: Wed, 01 Apr 2009 08:49:38 +0000 Subject: [issue5641] Local variables not freed when Exception raises in function called from cycle In-Reply-To: <1238575778.52.0.687578256719.issue5641@psf.upfronthosting.co.za> Message-ID: <1238575778.52.0.687578256719.issue5641@psf.upfronthosting.co.za> New submission from Glin : Situation: You have a while cycle. inside of it a try-except block and in this try-except block calling a function. Inside of this function raises an exception, with is caught in the try-except block. What happens: Local variables of the function are not freed. (OK, they are freed when the program leaves a function inside of which is the while cycle, or when another exception raises and is caught, but it's not helpful when you have some server program based on infinite while loop or working with a large amount of data). Example: Example program is attached. Output of the example program: While start job() start Creating 1 Catched AttributeError While end While start job() start Creating 2 job() end Deleting 2 While end While start job() start Creating 3 job() end Deleting 3 While end ... As you can see, a variable 'a' created in the first call (which throws an exception) of the 'job' function will never get freed. Imagine that in 'job' function you create a large amount of data, or worse you create a database connection, which will be opened forever. Tested on Python 2.5.2 and 2.7(svn). On the contrary, Python 3.0 does not have this issue (it frees variables of the 'job' function at the end of except: block.) As Python 2.X will be another long time with us, I think it should be fixed to behave correctly (that is as in Python 3.) ---------- components: Interpreter Core files: notfreed.py messages: 84989 nosy: Glin severity: normal status: open title: Local variables not freed when Exception raises in function called from cycle type: resource usage versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7 Added file: http://bugs.python.org/file13535/notfreed.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 10:59:01 2009 From: report at bugs.python.org (Attila Soki) Date: Wed, 01 Apr 2009 08:59:01 +0000 Subject: [issue5413] urllib ctypes error on Mac OS X Server 10.5 In-Reply-To: <1236124544.96.0.577290884621.issue5413@psf.upfronthosting.co.za> Message-ID: <1238576341.18.0.860035938185.issue5413@psf.upfronthosting.co.za> Attila Soki added the comment: no luck. output for t.py: Traceback (most recent call last): File "t.py", line 3, in f = urllib.urlopen("http://www.musi-cal.com/cgi-bin/query", params) File "/var/root/pytest/python/lib/python2.6/urllib.py", line 82, in urlopen opener = FancyURLopener() File "/var/root/pytest/python/lib/python2.6/urllib.py", line 611, in __init__ URLopener.__init__(self, *args, **kwargs) File "/var/root/pytest/python/lib/python2.6/urllib.py", line 129, in __init__ proxies = getproxies() File "/var/root/pytest/python/lib/python2.6/urllib.py", line 1558, in getproxies return getproxies_environment() or getproxies_macosx_sysconf() File "/var/root/pytest/python/lib/python2.6/urllib.py", line 1452, in getproxies_macosx_sysconf _CFSetup(sc) TypeError: _CFSetup() takes exactly 2 arguments (1 given) Exception AttributeError: "FancyURLopener instance has no attribute 'tempcache'" in > ignored output for tt.py: Traceback (most recent call last): File "tt.py", line 4, in x = sc.CFStringCreateWithCString(0, "HTTPEnable", 0) File "/var/root/pytest/python/lib/python2.6/ctypes/__init__.py", line 366, in __getattr__ func = self.__getitem__(name) File "/var/root/pytest/python/lib/python2.6/ctypes/__init__.py", line 371, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: dlsym(RTLD_DEFAULT, CFStringCreateWithCString): symbol not found notes: t.py fails on both with the same error tt.py runs on Intel/Mac OS X and fails on PPC/Mac OS X Server ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 11:49:48 2009 From: report at bugs.python.org (James McDermott) Date: Wed, 01 Apr 2009 09:49:48 +0000 Subject: [issue5642] multiprocessing.Pool.map() docs slightly misleading In-Reply-To: <1238579388.2.0.737750854681.issue5642@psf.upfronthosting.co.za> Message-ID: <1238579388.2.0.737750854681.issue5642@psf.upfronthosting.co.za> New submission from James McDermott : I found the documentation for the multiprocessing.Pool.map() method to be a little misleading, because it claims to be equivalent to the built- in map(), but it's not quite. When the function to be applied takes just one argument, both map()s behave the same. But built-in map() allows the function to take multiple arguments (taking them from multiple iterables) whereas multiprocessing.Pool.map() requires it to have only a single argument, and if necessary its iterable argument must be composed of tuples to be unpacked inside the function. From http://docs.python.org/library/multiprocessing.html#multiprocessing.pool .multiprocessing.Pool.map map(func, iterable[, chunksize]) A parallel equivalent of the map() builtin function. >From http://docs.python.org/library/functions.html#map map(function, iterable, ...) Apply function to every item of iterable and return a list of the results. If additional iterable arguments are passed, function must take that many arguments and is applied to the items from all iterables in parallel. ---------- assignee: georg.brandl components: Documentation messages: 84991 nosy: georg.brandl, jmmcd severity: normal status: open title: multiprocessing.Pool.map() docs slightly misleading type: feature request versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 11:58:07 2009 From: report at bugs.python.org (Jean-Michel Fauth) Date: Wed, 01 Apr 2009 09:58:07 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1238579887.12.0.0522234913561.issue4015@psf.upfronthosting.co.za> Jean-Michel Fauth added the comment: It is true, that on Windows the "mime types", .py, .pyw point to a specific version of Python. Having Python 2.4, 2.5, 2.6, 3.0, 3.1 installed on my hd and applications using these (different) versions, I am *very glad* on that system, all versions, including \site-packages, are isolated from each other. Technically, one can argue a Python developer/user should be able to write a one line batch file if necessary. Compared to *x systems, I have always found the Windows way as being very clean and flexible. ---------- nosy: +jmfauth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 12:38:25 2009 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 01 Apr 2009 10:38:25 +0000 Subject: [issue992389] attribute error after non-from import Message-ID: <1238582305.71.0.0294301476281.issue992389@psf.upfronthosting.co.za> Nick Coghlan added the comment: No argument from me that my suggestion is a mere glimmering of an idea, rather than a fully worked out definitely viable solution. It was just an angle of attack I hadn't seen suggested before, so I figured it was worth mentioning - the fact that a module is allowed to exist in sys.modules while only half constructed is the reason "import a.b.c" can work while "from a.b import c" or an explicit relative import will fail - the first approach gets a hit in sys.modules and succeeds, while the latter two approaches fail because the a.b package doesn't have a 'c' attribute yet. Figuring out a way to set the attribute in the parent package and then roll it back later if the import fails is still likely to be the more robust approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 13:30:49 2009 From: report at bugs.python.org (Steven Bethard) Date: Wed, 01 Apr 2009 11:30:49 +0000 Subject: [issue5311] bdist_msi generates version number for pure Python packages In-Reply-To: <1235016969.03.0.818386696301.issue5311@psf.upfronthosting.co.za> Message-ID: <1238585449.06.0.511746217579.issue5311@psf.upfronthosting.co.za> Steven Bethard added the comment: Thanks for the link. I did play around with that code for quite a while, and while I'm convinced there's a way to get it to work, I'm still struggling with it. I believe the attached .vbs file does about what we need to do, but I think I'm attaching it at the wrong location in the .msi file because things seem to die at the "Session.Database.OpenView" line with an error saying the object doesn't have that method (or no error message but still at that line, depending on how I've attached the action.) Anyway, I'll probably keep playing around with this, but some food for thought on why we may not want to implement this as a .vbs: http://blogs.msdn.com/robmen/archive/2004/05/20/136530.aspx In particular, some anti-virus products will silently keep them from working. That said, I probably need to figure out how to write the .vbs code in order to (eventually) write the C or whatever else code. ---------- Added file: http://bugs.python.org/file13536/PythonVersions.vbs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 13:38:09 2009 From: report at bugs.python.org (Maksim Kozyarchuk) Date: Wed, 01 Apr 2009 11:38:09 +0000 Subject: [issue5631] Distutils "upload" command does not show up in--help-commands output. In-Reply-To: <1238529670.22.0.992833360277.issue5631@psf.upfronthosting.co.za> Message-ID: <307319072-1238585884-cardhu_decombobulator_blackberry.rim.net-404892378-@bxe1038.bisx.prod.on.blackberry> Maksim Kozyarchuk added the comment: Thanks georg. Do you mind adding my name to the contrib file? Sent via BlackBerry by AT&T ---------- title: Distutils "upload" command does not show up in --help-commands output. -> Distutils "upload" command does not show up in--help-commands output. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 13:45:11 2009 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 01 Apr 2009 11:45:11 +0000 Subject: [issue5640] Wrong print() result when unicode error handler is not 'strict' In-Reply-To: <1238571303.14.0.143713902199.issue5640@psf.upfronthosting.co.za> Message-ID: <1238586311.27.0.673137361207.issue5640@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 13:48:06 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 01 Apr 2009 11:48:06 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1238586486.46.0.841891539676.issue4015@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > on Windows the "mime types", .py, .pyw point to a > specific version of Python. It could also point to a "python launcher", which reads the first line of the file and starts the corresponding version of the interpreter. Visual Studio does this for .sln files. It even displays different icons depending on the file contents. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 14:01:10 2009 From: report at bugs.python.org (Mark Hammond) Date: Wed, 01 Apr 2009 12:01:10 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1238587270.84.0.551629772701.issue4015@psf.upfronthosting.co.za> Mark Hammond added the comment: > It could also point to a "python launcher", which reads the first line What would that first line look like on Windows? o:\src\python-2.6-svn\PCBuild\python.exe would be appropriate for my machine, but I wouldn't really be happy with installed scripts embedding this in their first line - if for no better reason than depending on the Virtual Machine I am using at the time, that exact same directory will be seen as being on a completely different device, and potentially under a different 'root' directory too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 14:26:15 2009 From: report at bugs.python.org (Steven Bethard) Date: Wed, 01 Apr 2009 12:26:15 +0000 Subject: [issue5311] bdist_msi generates version number for pure Python packages In-Reply-To: <1235016969.03.0.818386696301.issue5311@psf.upfronthosting.co.za> Message-ID: <1238588775.89.0.724386802363.issue5311@psf.upfronthosting.co.za> Steven Bethard added the comment: My OpenView bug was just a missing "Set". The CustomAction does seem to be correctly gathering the Python paths from the registry and filling the ListView now. I've still got a couple of errors showing up later in the process, but I expect I'll probably have a patch within a week or two. ---------- assignee: tarek -> bethard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 15:05:30 2009 From: report at bugs.python.org (edmundy) Date: Wed, 01 Apr 2009 13:05:30 +0000 Subject: [issue5620] The attribute's action of an object is not correct. In-Reply-To: <1238498845.56.0.843345010323.issue5620@psf.upfronthosting.co.za> Message-ID: <1238591130.04.0.294183028559.issue5620@psf.upfronthosting.co.za> edmundy added the comment: Thanks a lot! Kozyarchuk. I have thought the self.myurl should be the object variable, not class variable. The class variable really is confusing. Why do they like that? ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 15:32:48 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 01 Apr 2009 13:32:48 +0000 Subject: [issue5413] urllib ctypes error on Mac OS X Server 10.5 In-Reply-To: <1236124544.96.0.577290884621.issue5413@psf.upfronthosting.co.za> Message-ID: <1238592768.37.0.448673597598.issue5413@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'll install 10.5 server on my PPC test machine when I'm back from PyCon, this seem to need some serious debugging. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 15:35:54 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 01 Apr 2009 13:35:54 +0000 Subject: [issue5623] test_fdopen fails with vs2005, release build on Windows 2000 In-Reply-To: <1238513083.42.0.065691454167.issue5623@psf.upfronthosting.co.za> Message-ID: <1238592954.71.0.520730816385.issue5623@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I found a correction using the _msize() function, which returns the size of a malloc'ed block. It is used to compute sizeof(ioinfo) at runtime. The exact definition of the structure is no longer important; only the first two fields are needed, which is a good thing IMO. Now the code seems really independent from changes in the CRT. Patch is attached. The test (info->osfhnd == _get_osfhandle(fd)) is not really needed, I left it outside an assert() because I wanted to test it on release builds. Tested (only) with VS2005, sizeof_ioinfo is correctly computed when presented to different versions of MSVCR80.dll. ---------- keywords: +patch Added file: http://bugs.python.org/file13537/verify_fd.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 15:43:22 2009 From: report at bugs.python.org (Matteo Dell'Amico) Date: Wed, 01 Apr 2009 13:43:22 +0000 Subject: [issue5647] MutableSet.__iand__ implementation calls self.discard while iterating on self In-Reply-To: <1238593402.02.0.427774935909.issue5647@psf.upfronthosting.co.za> Message-ID: <1238593402.02.0.427774935909.issue5647@psf.upfronthosting.co.za> New submission from Matteo Dell'Amico : The current MutableSet.__iand__ implementation calls self.discard while iterating on self. This creates strange problems while implementing MutableSet with simple choices. For example, consider the attached file which implements set by delegating either to a set or a list. In the first cases, an exception is raised; in the second, the result is not what is expected. Python 2.6+ (r26:66714, Oct 22 2008, 09:21:39) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from simpleset import WithSet, WithList >>> s = WithSet([1,2]) >>> s &= () Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/_abcoll.py", line 290, in __iand__ for value in self: RuntimeError: Set changed size during iteration >>> s = WithList([1,2]) >>> s &= () >>> list(s) [2] ---------- components: Library (Lib) files: simpleset.py messages: 85006 nosy: della severity: normal status: open title: MutableSet.__iand__ implementation calls self.discard while iterating on self versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13538/simpleset.py _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Walter_D=C3=B6rwald_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Wed Apr 1 15:43:59 2009 From: =?utf-8?q?Walter_D=C3=B6rwald_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Walter_D=C3=B6rwald_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Wed, 01 Apr 2009 13:43:59 +0000 Subject: [issue5640] Wrong print() result when unicode error handler is not 'strict' In-Reply-To: <1238571303.14.0.143713902199.issue5640@psf.upfronthosting.co.za> Message-ID: <1238593439.85.0.0433771453399.issue5640@psf.upfronthosting.co.za> Walter D?rwald added the comment: I can confirm this problem in the current version in the py3k branch. This seems to be a problem in the CJK codecs. Assigning to Hye Shik Chang. ---------- assignee: -> hyeshik.chang nosy: +doerwalter, hyeshik.chang stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 15:45:34 2009 From: report at bugs.python.org (Matteo Dell'Amico) Date: Wed, 01 Apr 2009 13:45:34 +0000 Subject: [issue5647] MutableSet.__iand__ implementation calls self.discard while iterating on self In-Reply-To: <1238593402.02.0.427774935909.issue5647@psf.upfronthosting.co.za> Message-ID: <1238593534.88.0.9161465567.issue5647@psf.upfronthosting.co.za> Matteo Dell'Amico added the comment: I suggest solving the problem by changing the implementation to: def __iand__(self, c): self -= self - c: or to def __iand__(self, c): for item in self - c: self.discard(item) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 15:51:28 2009 From: report at bugs.python.org (Jeremy Hylton) Date: Wed, 01 Apr 2009 13:51:28 +0000 Subject: [issue5578] unqualified exec in class body In-Reply-To: <1238164857.67.0.53034733648.issue5578@psf.upfronthosting.co.za> Message-ID: <1238593888.23.0.494919914497.issue5578@psf.upfronthosting.co.za> Jeremy Hylton added the comment: Why did it change from 2.5 to 2.6? I'm not sure that the change makes any sense. (Dreading the answer that I changed it...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 15:57:42 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 01 Apr 2009 13:57:42 +0000 Subject: [issue1544102] ctypes unit test fails (test_macholib.py) under MacOS 10.4.7 Message-ID: <1238594262.58.0.412763905333.issue1544102@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Setting issue back to "open". I'm going to install a 10.4 PPC test machine over the weekend to try to reproduce the problem there. Issue5413 might be related to this one, that one also seems to be about some ctypes code that doesn't work on a PPC system (10.5 server in that case). ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 16:02:39 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 14:02:39 +0000 Subject: [issue5631] Distutils "upload" command does not show up in--help-commands output. In-Reply-To: <1238529670.22.0.992833360277.issue5631@psf.upfronthosting.co.za> Message-ID: <1238594559.56.0.332505115615.issue5631@psf.upfronthosting.co.za> Georg Brandl added the comment: Done! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 16:03:32 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Wed, 01 Apr 2009 14:03:32 +0000 Subject: [issue1529142] Allowing multiple instances of IDLE with sub-processes Message-ID: <1238594612.11.0.817411786103.issue1529142@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: The hooks for the IP address will be needed if we add remote debugging to IDLE, so I'd like to keep them. Otherwise, David Scherer's idea re using an ephemeral port assignment looks very promising. I'll check something in. ---------- assignee: rhettinger -> kbk status: open -> pending versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 16:03:43 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 14:03:43 +0000 Subject: [issue5647] MutableSet.__iand__ implementation calls self.discard while iterating on self In-Reply-To: <1238593402.02.0.427774935909.issue5647@psf.upfronthosting.co.za> Message-ID: <1238594623.98.0.30938191997.issue5647@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 16:20:39 2009 From: report at bugs.python.org (Mitchell Model) Date: Wed, 01 Apr 2009 14:20:39 +0000 Subject: [issue5601] webbrowser doesn't just open browsers In-Reply-To: Message-ID: Mitchell Model added the comment: Never mind about the garbage -- I was looking at weird HTML in the copy of the message I received but it didn't make it into the entry on this page. I should have looked first. -- -- --- Mitchell ---------- Added file: http://bugs.python.org/file13539/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Re: [issue5601] webbrowser doesn't just open browsers
Never mind about the garbage -- I was looking at weird HTML in the copy of the message I received but it didn't make it into the entry on this page. I should have looked first.
--
--

        --- Mitchell
From report at bugs.python.org Wed Apr 1 16:28:57 2009 From: report at bugs.python.org (Chris Morrow) Date: Wed, 01 Apr 2009 14:28:57 +0000 Subject: [issue1664] nntplib is not IPv6-capable In-Reply-To: <1198094830.43.0.175472713308.issue1664@psf.upfronthosting.co.za> Message-ID: <1238596137.24.0.848140611127.issue1664@psf.upfronthosting.co.za> Chris Morrow added the comment: This is a little silly and painful... it's utterly broken to hardcode the AF type in this way, could we please apply a patch (something like the proposed seems to work fine) and get this rolled into the next release? It seems really lame to not be able to support normal internet protocols in a tools language. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 16:37:27 2009 From: report at bugs.python.org (Ned Deily) Date: Wed, 01 Apr 2009 14:37:27 +0000 Subject: [issue5648] OS X Installer: do not install obsolete documentation within Python.app bundle In-Reply-To: <1238596647.54.0.611757278193.issue5648@psf.upfronthosting.co.za> Message-ID: <1238596647.54.0.611757278193.issue5648@psf.upfronthosting.co.za> New submission from Ned Deily : Prevent "hidden" obsolete and unused MacPython documentation files from being installed within framework Python.app bundle. (The current documentation continues to be installed elsewhere.) ---------- components: Build files: patch-nad0010-py3k-30.txt messages: 85016 nosy: nad, ronaldoussoren severity: normal status: open title: OS X Installer: do not install obsolete documentation within Python.app bundle versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13540/patch-nad0010-py3k-30.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 16:37:54 2009 From: report at bugs.python.org (Ned Deily) Date: Wed, 01 Apr 2009 14:37:54 +0000 Subject: [issue5648] OS X Installer: do not install obsolete documentation within Python.app bundle In-Reply-To: <1238596647.54.0.611757278193.issue5648@psf.upfronthosting.co.za> Message-ID: <1238596674.15.0.118493104383.issue5648@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file13541/patch-nad0010-trunk-26.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 16:52:46 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 14:52:46 +0000 Subject: [issue5637] 2to3 does not convert urllib.urlopen to urllib.request.urlopen In-Reply-To: <1238551022.24.0.463432313749.issue5637@psf.upfronthosting.co.za> Message-ID: <1238597566.21.0.193435997651.issue5637@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 17:10:23 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 01 Apr 2009 15:10:23 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1238598623.19.0.0955112626129.issue4015@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I agree. In any case, double-clicking on a .py file should start an "installed" interpreter, that is one listed in the registry: HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\X.Y\InstallPath Today starting a .py file only open the last installed Python interpreter. With this proposal, the launcher choose the "best" installed interpreter for the given script, and falls back to the last installed one. There may be different definitions of "best". The algorithm could look like this: - if the first line is #! c:/some/path/to/python.exe and the registry contains an installation with InstallPath="c:/some/path/to" choose this one. - if the first line matches #! c:/python/([1-9])([0-9])/python.exe and if the following registry key exists: HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/\1.\2/InstallPath choose this one. - else, use the last installed interpreter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 17:21:31 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 01 Apr 2009 15:21:31 +0000 Subject: [issue5623] test_fdopen fails with vs2005, release build on Windows 2000 In-Reply-To: <1238513083.42.0.065691454167.issue5623@psf.upfronthosting.co.za> Message-ID: <1238599291.47.0.841649546566.issue5623@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Oops, that's right. This second patch removes the check with _get_osfhandle(). It was not really necessary: when the trick does not work, python will tell it loudly enough. ---------- Added file: http://bugs.python.org/file13542/verify_fd-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 17:27:07 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 01 Apr 2009 15:27:07 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1238599627.71.0.759080977214.issue1161031@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 17:29:33 2009 From: report at bugs.python.org (R. David Murray) Date: Wed, 01 Apr 2009 15:29:33 +0000 Subject: [issue5613] test_posix.py and test_wait4.py having missing import on win32 In-Reply-To: <1238438417.18.0.73151997177.issue5613@psf.upfronthosting.co.za> Message-ID: <1238599773.03.0.0927388559068.issue5613@psf.upfronthosting.co.za> R. David Murray added the comment: Fixed in trunk as part of the change to the way regrtest handles ImportErrors. ---------- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 17:31:08 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 01 Apr 2009 15:31:08 +0000 Subject: [issue1664] nntplib is not IPv6-capable In-Reply-To: <1198094830.43.0.175472713308.issue1664@psf.upfronthosting.co.za> Message-ID: <1238599868.32.0.237924272296.issue1664@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Assuming the patch does work, +1 for applying it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 17:35:52 2009 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 01 Apr 2009 15:35:52 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1238600152.82.0.278919885896.issue4015@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Maybe also let's look on setuptools solution.It can make windows executable for 'entry point scripts'. Also there are family scripts for single entry point: * easy_install.exe * easy_install-2.5.exe * easy_install-2.5-script.py * easy_install-script.py I like it. Exe files executes specific python version. If you are installed library in python 2.6 - python 2.6 interpreter will be used, not looking in 'default' interpreter etc. I use setuptools and for me it gives good 'executive python scripts'. BTW, double click executes 'default' interpreter, not last installed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 17:40:46 2009 From: report at bugs.python.org (Ned Deily) Date: Wed, 01 Apr 2009 15:40:46 +0000 Subject: [issue5649] OS X Installer: only include PythonSystemFixes package if target includes 10.3 In-Reply-To: <1238600445.94.0.804009523794.issue5649@psf.upfronthosting.co.za> Message-ID: <1238600445.94.0.804009523794.issue5649@psf.upfronthosting.co.za> New submission from Ned Deily : The PythonSystemFixes package of the OS X installer fixes a specific compatibility problem with the Apple-supplied Python 2.3 on OS X 10.3. The attached patches changes the build installer script to include that package in the installer only if the installer image includes 10.3 as a targeted system. ---------- components: Installation files: patch-nad0008-py3k-30.txt messages: 85022 nosy: nad, ronaldoussoren severity: normal status: open title: OS X Installer: only include PythonSystemFixes package if target includes 10.3 versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13543/patch-nad0008-py3k-30.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 17:41:03 2009 From: report at bugs.python.org (Ned Deily) Date: Wed, 01 Apr 2009 15:41:03 +0000 Subject: [issue5649] OS X Installer: only include PythonSystemFixes package if target includes 10.3 In-Reply-To: <1238600445.94.0.804009523794.issue5649@psf.upfronthosting.co.za> Message-ID: <1238600463.46.0.301405116246.issue5649@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file13544/patch-nad0008-trunk-26.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 17:51:11 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 15:51:11 +0000 Subject: [issue5641] Local variables not freed when Exception raises in function called from cycle In-Reply-To: <1238575778.52.0.687578256719.issue5641@psf.upfronthosting.co.za> Message-ID: <1238601071.72.0.761490043806.issue5641@psf.upfronthosting.co.za> Georg Brandl added the comment: This is not a question of "correct" behavior, but of documented semantics. We can't change that semantics in 2.x, like we did for 3.x, because many people rely on the exception variable being available after the except clause finishes. Closing as "won't fix." ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 17:53:23 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 15:53:23 +0000 Subject: [issue5636] csv.reader next() method missing In-Reply-To: <1238548476.16.0.332919263338.issue5636@psf.upfronthosting.co.za> Message-ID: <1238601203.29.0.512413663826.issue5636@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed docs in r70955. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 17:57:27 2009 From: report at bugs.python.org (Jesse Noller) Date: Wed, 01 Apr 2009 15:57:27 +0000 Subject: [issue5619] Pass MS CRT debug flags into subprocesses In-Reply-To: <1238472783.0.0.132667741337.issue5619@psf.upfronthosting.co.za> Message-ID: <1238601447.01.0.504824943958.issue5619@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 17:59:30 2009 From: report at bugs.python.org (Jesse Noller) Date: Wed, 01 Apr 2009 15:59:30 +0000 Subject: [issue5619] Pass MS CRT debug flags into subprocesses In-Reply-To: <1238472783.0.0.132667741337.issue5619@psf.upfronthosting.co.za> Message-ID: <1238601570.05.0.212405279093.issue5619@psf.upfronthosting.co.za> Jesse Noller added the comment: Note Hiro added r70953 as well to wrap the include in an ifdef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:11:18 2009 From: report at bugs.python.org (Jesse Noller) Date: Wed, 01 Apr 2009 16:11:18 +0000 Subject: [issue5619] Pass MS CRT debug flags into subprocesses In-Reply-To: <1238472783.0.0.132667741337.issue5619@psf.upfronthosting.co.za> Message-ID: <1238602278.2.0.644845072394.issue5619@psf.upfronthosting.co.za> Jesse Noller added the comment: I'll reopen, but I am going to defer to Martin on this ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:14:18 2009 From: report at bugs.python.org (Mitchell Model) Date: Wed, 01 Apr 2009 16:14:18 +0000 Subject: [issue5650] Obsolete RFC's should be removed from doc of urllib.urlparse In-Reply-To: <1238602458.06.0.807356829134.issue5650@psf.upfronthosting.co.za> Message-ID: <1238602458.06.0.807356829134.issue5650@psf.upfronthosting.co.za> New submission from Mitchell Model : The documentation of urlparse in Python2 and urllib.urlparse in Python3 refers to three RFC's, the last of which (RFC 2396) says that it supersedes the other two and, in fact, clicking on the links to the other two doesn't work; the link and description for the two obsolete RFCs should be removed. ---------- assignee: georg.brandl components: Documentation messages: 85032 nosy: MLModel, georg.brandl severity: normal status: open title: Obsolete RFC's should be removed from doc of urllib.urlparse versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:16:52 2009 From: report at bugs.python.org (Ned Deily) Date: Wed, 01 Apr 2009 16:16:52 +0000 Subject: [issue5651] OS X Installer: add checks to ensure proper Tcl configuration during build In-Reply-To: <1238602612.52.0.800890790819.issue5651@psf.upfronthosting.co.za> Message-ID: <1238602612.52.0.800890790819.issue5651@psf.upfronthosting.co.za> New submission from Ned Deily : Because OS X 10.4 and 10.5 ship with an old 8.4 version of Aqua Tcl and Tk frameworks, current practice is to build the installer image on a machine with user-installed newer 8.4 Tcl/Tk frameworks in /Library. This ensures the correct dylib search sequence is built into the Python image so that users can install a newer 8.4 on their own systems and, if not, Python will fallback to the Apple-supplied versions in /System/Library. It is easy to overlook this step in the build process, however, and some installer images in the past inadvertently did not include this capability. This patch adds checks to the build-installer script to ensure that the newer frameworks are installed on the build machine so that the magic happens. Note, Python tkinter currently only supports linking with one major/minor version of Tcl and Tk so this magic does not allow the Python installer image to use a major/minor version other than the current system version. ---------- components: Build files: patch-nad0012.txt messages: 85033 nosy: nad, ronaldoussoren severity: normal status: open title: OS X Installer: add checks to ensure proper Tcl configuration during build versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13545/patch-nad0012.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 17:59:32 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 01 Apr 2009 15:59:32 +0000 Subject: [issue5623] test_fdopen fails with vs2005, release build on Windows 2000 In-Reply-To: <1238513083.42.0.065691454167.issue5623@psf.upfronthosting.co.za> Message-ID: <1238601572.77.0.448652869496.issue5623@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Sorry, but for the moment the only internet access I have is behind a firewall and I cannot use SVN. Could you do it instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:20:26 2009 From: report at bugs.python.org (Jack Diederich) Date: Wed, 01 Apr 2009 16:20:26 +0000 Subject: [issue1360221] telnetlib expect() and read_until() do not time out properly Message-ID: <1238602826.91.0.420536733936.issue1360221@psf.upfronthosting.co.za> Jack Diederich added the comment: assigning all open telnetlib items to myself ---------- assignee: -> jackdied nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:20:47 2009 From: report at bugs.python.org (Jack Diederich) Date: Wed, 01 Apr 2009 16:20:47 +0000 Subject: [issue1252001] Issue with telnetlib read_until not timing out Message-ID: <1238602847.45.0.182477969878.issue1252001@psf.upfronthosting.co.za> Jack Diederich added the comment: assigning all open telnetlib items to myself ---------- assignee: -> jackdied nosy: +jackdied _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Wed Apr 1 18:20:49 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Wed, 01 Apr 2009 16:20:49 +0000 Subject: [issue5619] Pass MS CRT debug flags into subprocesses In-Reply-To: <1238472783.0.0.132667741337.issue5619@psf.upfronthosting.co.za> Message-ID: <1238602849.47.0.439907477041.issue5619@psf.upfronthosting.co.za> Martin v. L?wis added the comment: We absolutely must turn off GUI notifications if this runs on the buildbot. If this means to turn off GUI notications for non-buildbot usage also, so be it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:21:07 2009 From: report at bugs.python.org (Jack Diederich) Date: Wed, 01 Apr 2009 16:21:07 +0000 Subject: [issue1049450] Solaris: EINTR exception in select/socket calls in telnetlib Message-ID: <1238602867.44.0.242732102939.issue1049450@psf.upfronthosting.co.za> Jack Diederich added the comment: assigning all open telnetlib items to myself ---------- assignee: -> jackdied nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:21:34 2009 From: report at bugs.python.org (Jack Diederich) Date: Wed, 01 Apr 2009 16:21:34 +0000 Subject: [issue708007] TelnetPopen3, TelnetBase, Expect split Message-ID: <1238602894.09.0.639311618006.issue708007@psf.upfronthosting.co.za> Jack Diederich added the comment: assigning all open telnetlib items to myself ---------- assignee: -> jackdied nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:21:55 2009 From: report at bugs.python.org (Jack Diederich) Date: Wed, 01 Apr 2009 16:21:55 +0000 Subject: [issue1678077] improve telnetlib.Telnet so option negotiation becomes easie Message-ID: <1238602915.13.0.223343116698.issue1678077@psf.upfronthosting.co.za> Jack Diederich added the comment: assigning all open telnetlib items to myself ---------- assignee: -> jackdied nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:22:09 2009 From: report at bugs.python.org (Jack Diederich) Date: Wed, 01 Apr 2009 16:22:09 +0000 Subject: [issue1772788] chr(128) in u'only ascii' -> TypeError with misleading msg Message-ID: <1238602929.44.0.844403134124.issue1772788@psf.upfronthosting.co.za> Jack Diederich added the comment: assigning all open telnetlib items to myself ---------- nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:22:27 2009 From: report at bugs.python.org (Jack Diederich) Date: Wed, 01 Apr 2009 16:22:27 +0000 Subject: [issue1737737] telnetlib.Telnet does not process DATA MARK (DM) Message-ID: <1238602947.02.0.807440343741.issue1737737@psf.upfronthosting.co.za> Jack Diederich added the comment: assigning all open telnetlib items to myself ---------- assignee: -> jackdied nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:22:46 2009 From: report at bugs.python.org (Jack Diederich) Date: Wed, 01 Apr 2009 16:22:46 +0000 Subject: [issue1772794] Telnetlib dosn't accept u'only ascii' Message-ID: <1238602966.65.0.740036725997.issue1772794@psf.upfronthosting.co.za> Jack Diederich added the comment: assigning all open telnetlib items to myself ---------- assignee: -> jackdied nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:27:46 2009 From: report at bugs.python.org (Virgil Dupras) Date: Wed, 01 Apr 2009 16:27:46 +0000 Subject: [issue1741130] struct.pack("I", "foo"); struct.pack("L", "foo") should fail Message-ID: <1238603266.45.0.356303815814.issue1741130@psf.upfronthosting.co.za> Virgil Dupras added the comment: While the behavior cannot be reproduced in the trunk, in can be reproduced in the 2.6 release: $ python -W ignore Python 2.6.1 (r261:67515, Dec 6 2008, 16:42:21) [GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import struct >>> struct.pack('L', 'foobar') '\x00\x00\x00\x00' >>> struct.pack('I', 'foobar') '\x00\x00\x00\x00' >>> struct.pack('i', 'foobar') Traceback (most recent call last): File "", line 1, in struct.error: required argument is not an integer >>> ---------- nosy: +vdupras _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:29:46 2009 From: report at bugs.python.org (Ned Deily) Date: Wed, 01 Apr 2009 16:29:46 +0000 Subject: [issue5652] OS X Installer: remove references to Mac/Tools which no longer exists In-Reply-To: <1238603386.16.0.0582109660822.issue5652@psf.upfronthosting.co.za> Message-ID: <1238603386.16.0.0582109660822.issue5652@psf.upfronthosting.co.za> New submission from Ned Deily : The OS X Installer postflight script still tries to compileall scripts in the framework Mac/Tools directory even though it no longer exists. ---------- components: Installation files: patch-nad0009-trunk-26.txt messages: 85044 nosy: nad, ronaldoussoren severity: normal status: open title: OS X Installer: remove references to Mac/Tools which no longer exists versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13546/patch-nad0009-trunk-26.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:30:12 2009 From: report at bugs.python.org (Ned Deily) Date: Wed, 01 Apr 2009 16:30:12 +0000 Subject: [issue5652] OS X Installer: remove references to Mac/Tools which no longer exists In-Reply-To: <1238603386.16.0.0582109660822.issue5652@psf.upfronthosting.co.za> Message-ID: <1238603412.06.0.734972733592.issue5652@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file13547/patch-nad0009-py3k-30.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:37:36 2009 From: report at bugs.python.org (Jesse Noller) Date: Wed, 01 Apr 2009 16:37:36 +0000 Subject: [issue3551] multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) In-Reply-To: <1218712281.34.0.473878484861.issue3551@psf.upfronthosting.co.za> Message-ID: <1238603856.94.0.671908579552.issue3551@psf.upfronthosting.co.za> Jesse Noller added the comment: I've been thinking about this a bit, and I think raising an exception and returning the amount of bytes read makes more sense then just hiding it/eating the errors. Explicit > Implicit in this case, at lease doing this gives the controller a method of reacting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:42:50 2009 From: report at bugs.python.org (Jesse Noller) Date: Wed, 01 Apr 2009 16:42:50 +0000 Subject: [issue3270] test_multiprocessing: test_listener_client flakiness In-Reply-To: <1215089924.76.0.76828097682.issue3270@psf.upfronthosting.co.za> Message-ID: <1238604170.04.0.701291396818.issue3270@psf.upfronthosting.co.za> Jesse Noller added the comment: documented in r70960 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:43:02 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 01 Apr 2009 16:43:02 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238604182.34.0.992499074164.issue2578@psf.upfronthosting.co.za> Gregory P. Smith added the comment: sounds good. This is done for 2.7. I will make sure it gets merged into 3.1 properly before closing. ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:50:04 2009 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 01 Apr 2009 16:50:04 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1231175004.95.0.780150738153.issue4847@psf.upfronthosting.co.za> Message-ID: <1238604604.68.0.975137847972.issue4847@psf.upfronthosting.co.za> Guido van Rossum added the comment: I think it's good if it allowed passing in a binary file and an encoding, but I think it would be crazy if it wouldn't also take a text file. After all the primary purpose of a CSV file, edge cases notwithstanding, is to look like text to the end user in a text editor (as opposed to Excel spreadsheets, which look like binary gobbledygook unless opened with Excel). Are there any use cases for returning bytes strings instead of text strings? If so that should probably be another flag. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:52:56 2009 From: report at bugs.python.org (Ned Deily) Date: Wed, 01 Apr 2009 16:52:56 +0000 Subject: [issue5653] OS X Installer: by default install versioned-only links in /usr/local/bin for 3.x In-Reply-To: <1238604776.11.0.0788260895322.issue5653@psf.upfronthosting.co.za> Message-ID: <1238604776.11.0.0788260895322.issue5653@psf.upfronthosting.co.za> New submission from Ned Deily : For 3.0, the OS X installer was changed to disable the default installation of the Unix Command Line Tools package, the package that installs links in /usr/local/bin to the corresponding entries in the framework bin directory. The intent was to follow the practice of other Python 3.x installers to ensure that python 2.x and python 3.x could co- exist. However, with the framework structure of OS X python, each python version has its own bin directory and the lack of 3.x links in /usr/local/bin has led to some user confusion. This patch modifies the OS X installer for 3.x to again re-enable the Unix Command Line Tools package by default but to only install versioned links into /usr/local/bin (i.e. /usr/local/bin/python3.1) but not disturbed any unversioned links (i.e. /usr/local/bin/python will continue to point to an installed python2.x). The only exception is that 3.x will install a /usr/local/bin link to its 2to3, which is currently not versioned. The framework bin directory is unchanged and contains both versioned and unversioned links. ---------- components: Installation files: patch-nad0022-py3k.txt messages: 85049 nosy: nad, ronaldoussoren severity: normal status: open title: OS X Installer: by default install versioned-only links in /usr/local/bin for 3.x versions: Python 3.1 Added file: http://bugs.python.org/file13548/patch-nad0022-py3k.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:55:05 2009 From: report at bugs.python.org (John Ehresman) Date: Wed, 01 Apr 2009 16:55:05 +0000 Subject: [issue5654] Add C hook in PyDict_SetItem for debuggers In-Reply-To: <1238604905.42.0.578461685574.issue5654@psf.upfronthosting.co.za> Message-ID: <1238604905.42.0.578461685574.issue5654@psf.upfronthosting.co.za> New submission from John Ehresman : I'm interested in adding support for debugger watchpoint's in the core. A watchpoint would cause the debugger to stop when a value in a namespace changes. This hook would be called when PyDict_SetItem & PyDict_DelItem is invoked. I realize that this does not cover function local variables, but I'm more interested in instance attributes and globals. This is a proof of concept patch; I wanted to see if it would work and get some initial feedback. I think the performance implications are minimal in the case where nothing is watched, though the performance of sample callback in _debuggerhooks can be improved. An issue may be if this is used outside a debugger implementation to implement an observer pattern -- I'd like to discourage it, but worry that it will be used since it's there, rather like how the settrace tracer gets used. If there's interest in this, I will clean this up and add watchpoints to pdb. ---------- components: Interpreter Core files: dicthook.diff keywords: patch messages: 85051 nosy: jpe severity: normal status: open title: Add C hook in PyDict_SetItem for debuggers versions: Python 2.7 Added file: http://bugs.python.org/file13549/dicthook.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 18:56:48 2009 From: report at bugs.python.org (John Ehresman) Date: Wed, 01 Apr 2009 16:56:48 +0000 Subject: [issue5654] Add C hook in PyDict_SetItem for debuggers In-Reply-To: <1238604905.42.0.578461685574.issue5654@psf.upfronthosting.co.za> Message-ID: <1238605008.43.0.363842460456.issue5654@psf.upfronthosting.co.za> Changes by John Ehresman : Added file: http://bugs.python.org/file13550/testhook.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 19:13:01 2009 From: report at bugs.python.org (Josiah Carlson) Date: Wed, 01 Apr 2009 17:13:01 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238605981.29.0.0884647818268.issue1641@psf.upfronthosting.co.za> Josiah Carlson added the comment: IIRC, there was a threat to remove asyncore because there were no maintainers, no one was fixing bugs, no one was improving it, and no one was really using it (I believe the claim was that people were just using Twisted). The patches that were ultimately committed to 2.6 and 3.0 were committed 3 months prior to 2.6 release, after having languished for over a year because no one would review them. If people care about where asyncore/asynchat are going, then it is *their* responsibility to at least make an effort in paying attention at least once every few months or so. The delayed calls feature discussed in the current bug doesn't alter the behavior of previously existing code, except there are additional checks for pending tasks to be executed. If people never use the call_later() API, it is unlikely they will experience any difference in behavior. If you are concerned about the sched module, I'd be happy to do a search for it's use to verify that people aren't relying on it's internal implementation, only the features of it's external API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 19:21:06 2009 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 01 Apr 2009 17:21:06 +0000 Subject: [issue5619] Pass MS CRT debug flags into subprocesses In-Reply-To: <1238604887.68.0.779671976651.issue5619@psf.upfronthosting.co.za> Message-ID: <270ea8310904011021w7ee5be3at60e38052e3fde88f@mail.gmail.com> Andrew Svetlov added the comment: Problem in _multiprocessing is: FILE* fp = _fdopen(...); int fd = _fileno(fp); _close(fd); _fclose(fp); // raises assertion At process exit system tries to close all opened FILE* by _fcloseall, but file closed by descriptor _close has invalid state and _fclose raises assertion. Real problem not in win32_ExitProcess function but in outer finalization code. At exit time is impossible to point on real source of problem. This patch is just supressing error messages on exit of child process (we sure what we don't want to see anything related to this one, at least in buildbot test session). For particular problem in multiprocessing only (all other test passed with regrtest -n without assertion message boxes). In general maybe will helpful to add os.close check for opened FILE* for this descriptor and report about this problem (interesting question, it should be exception or stderr output?). Of course it have to be applied only to debug build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 19:24:18 2009 From: report at bugs.python.org (DSM) Date: Wed, 01 Apr 2009 17:24:18 +0000 Subject: [issue5655] fix glob.iglob docstring In-Reply-To: <1238606658.05.0.0385441814822.issue5655@psf.upfronthosting.co.za> Message-ID: <1238606658.05.0.0385441814822.issue5655@psf.upfronthosting.co.za> New submission from DSM : glob.iglob's docstring claims it returns a list, but as the name suggests it returns an iterator. Looks like a cut 'n paste oversight. glob.rst is correct. Patch attached against mainline trunk r70961. Should also apply cleanly to py3k trunk. ---------- assignee: georg.brandl components: Documentation files: iglob_main.patch keywords: patch messages: 85054 nosy: dsm001, georg.brandl severity: normal status: open title: fix glob.iglob docstring versions: Python 2.7 Added file: http://bugs.python.org/file13551/iglob_main.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 19:28:14 2009 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 01 Apr 2009 17:28:14 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238606894.55.0.527976787447.issue1641@psf.upfronthosting.co.za> Guido van Rossum added the comment: I guess the Zope developers aren't that tuned in to core Python developement. They were sorely bitten. I don't think you can claim that users should be tuned in to python-dev just to assure their favorite module isn't removed or broken. It behooves you to request their feedback now that you know there still are asyncore users, not to hijack the module for your own purposes. IIRC one option discussed at the summit was to restore asyncore to its pre-2.5 state and to slowly end-of-life it, giving Zope and other users plenty of time to start maintaining their own copy (which they've half-done already with all the monkey-patching that goes on :-), and create a new module with a better specified API that won't require users to use undocumented internals. Part of this (even if we don't actually roll it back to the 2.5 version, which is controversial) would be not adding new features. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 19:30:22 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Wed, 01 Apr 2009 17:30:22 +0000 Subject: [issue1621111] IDLE crashes on OS X 10.4 when "Preferences" selected Message-ID: <1238607022.54.0.451647681844.issue1621111@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: Status should not be pending unless issue is assigned and a resolution is in progress. Issue only reported on 2.5 as far as I can tell, let's see if it gets reported again for a later version of Python/Tk. We appear to have a workaround for Windows, at least - remove config- main.cfg and let IDLE recreate it. Note that IDLE can't 'crash', it's pure Python - any crash would be in Python or Tcl/Tk. However, IDLE can raise an exception and exit. If it's an IDLE failure, the traceback will be written to the console, so you have to start IDLE from the console to see it. Also, it does sound like the Mac and XP issues are separate problems, so please reopen this bug and include a traceback if the failure is seen again. ---------- assignee: -> kbk nosy: +kbk priority: low -> normal resolution: -> postponed status: pending -> closed type: behavior -> crash versions: +Python 2.5 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 19:46:14 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 17:46:14 +0000 Subject: [issue5655] fix glob.iglob docstring In-Reply-To: <1238606658.05.0.0385441814822.issue5655@psf.upfronthosting.co.za> Message-ID: <1238607974.63.0.0763800320632.issue5655@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r70963, thanks! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Wed Apr 1 19:47:04 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Wed, 01 Apr 2009 17:47:04 +0000 Subject: [issue5619] Pass MS CRT debug flags into subprocesses In-Reply-To: <1238601891.03.0.654460819968.issue5619@psf.upfronthosting.co.za> Message-ID: <49D3A88D.7040004@v.loewis.de> Martin v. L?wis added the comment: > I suggest that with the issue fixed, we remove those lines again, since > they go against the spirit of defect http://bugs.python.org/issue4804 I'm opposed, for the very same reasons I stated over and over again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 19:49:46 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 01 Apr 2009 17:49:46 +0000 Subject: [issue4937] Mac DMG install missing version.plist required by bundlebuilder.py In-Reply-To: <1231880551.46.0.128485851272.issue4937@psf.upfronthosting.co.za> Message-ID: <1238608186.25.0.0440464147899.issue4937@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- assignee: -> ronaldoussoren nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 19:51:21 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 01 Apr 2009 17:51:21 +0000 Subject: [issue3646] MacOS X framework install to non-standard directory fails In-Reply-To: <1219392826.4.0.166247537114.issue3646@psf.upfronthosting.co.za> Message-ID: <1238608281.61.0.959133509987.issue3646@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- assignee: -> ronaldoussoren nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 19:52:15 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 01 Apr 2009 17:52:15 +0000 Subject: [issue5267] Subversion problem with PythonLauncher after building 3.0 or 3.1 on Mac In-Reply-To: <1234657992.73.0.432074420703.issue5267@psf.upfronthosting.co.za> Message-ID: <1238608335.84.0.256107245754.issue5267@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- assignee: -> ronaldoussoren _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Wed Apr 1 19:53:34 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Wed, 01 Apr 2009 17:53:34 +0000 Subject: [issue5619] Pass MS CRT debug flags into subprocesses In-Reply-To: <1238604887.68.0.779671976651.issue5619@psf.upfronthosting.co.za> Message-ID: <49D3AA12.4000603@v.loewis.de> Martin v. L?wis added the comment: > But what is so special about the win32_ExitProcess() function, the > changes apply only for the actual ExitProcess() call (not the duration > of the rest of the forked job. Two things: a) it's not really likely that it uncovers an application bug that people would run into, and b) there is no other way to suppress the problem. > That looks like a forced fix to a specific problem, not a generic > buildbot-friendly feature. In case such a bug comes up again, it is important that no popup will trigger again > SetErrorMode(), btw, is inherited by child processes: Correct. With -n restored to test.bat, that can be taken out. > For _CrtSetReportMode, don't we want to channel the output to stderr, > rather than the debugger output? That would work as well (and perhaps better) > Also, let's not forget, that parameter validation will throw up > dialogue boxes in a release mode too() (in DEBUG an assert is thrown in > to the mix as well, which is what you are silencing) Yes - because I know you want these error boxes, we only added it in debug mode (because that's what the buildbots use) > If we are doing this for the benefit of buildbot, then why don't we do > it in python.exe? We could add an --unattended flag or something > similar which would silence or redirect any interactive notifications > we can think of. There is the -n flag for regrtest already. Unfortunately, there is no easy way to pass it to the subprocess. I'm opposed to a new command line flag, because there are already so many of them. I would hope that multiprocessing could pass the CRT flags to subprocesses (see the subject of this report). Somebody would have to implement it, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 19:54:46 2009 From: report at bugs.python.org (Stephan R.A. Deibel) Date: Wed, 01 Apr 2009 17:54:46 +0000 Subject: [issue1608921] PyThread_release_lock with pthreads munges errno Message-ID: <1238608486.94.0.995579435438.issue1608921@psf.upfronthosting.co.za> Stephan R.A. Deibel added the comment: Here is a patch against Python 2.6.1 that restores errno after the "sanity check" in lock_PyThread_release_lock in Modules/threadmodule.c. A potential controversy is whether it should be done here or in thread_pthread.h but I believe that we should protect errno from spurious change by _any_ threading model that objects to this internal attempt to acquire an already acquired lock. ---------- keywords: +patch Added file: http://bugs.python.org/file13552/errno-fix.diff _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Wed Apr 1 19:55:47 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Wed, 01 Apr 2009 17:55:47 +0000 Subject: [issue5619] Pass MS CRT debug flags into subprocesses In-Reply-To: <270ea8310904011021w7ee5be3at60e38052e3fde88f@mail.gmail.com> Message-ID: <49D3AA96.4060009@v.loewis.de> Martin v. L?wis added the comment: > Problem in _multiprocessing is: > FILE* fp = _fdopen(...); > int fd = _fileno(fp); > _close(fd); > _fclose(fp); // raises assertion Actually, Kristjan fixed the *real* bug, which was more like FILE* f2=fdopen(fileno(f1)); fclose(f1); fclose(f2); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:13:14 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Wed, 01 Apr 2009 18:13:14 +0000 Subject: [issue1621111] IDLE crashes on OS X 10.4 when "Preferences" selected Message-ID: <1238609594.38.0.914550034291.issue1621111@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: My error, I was thinking of Debian's use of 'pending'. On Sourceforge, setting an issue to pending would cause it to automatically close after awhile if there was not further response. On this Tracker, we would use that status the same way, but I believe we have to close it manually after awhile? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:20:21 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 01 Apr 2009 18:20:21 +0000 Subject: [issue1665206] Hangup when using cgitb in a thread while still in import Message-ID: <1238610021.88.0.635972457579.issue1665206@psf.upfronthosting.co.za> Brett Cannon added the comment: So this issue -- as seems to happen to me at PyCon -- was deeper than I thought. cgitb was importing in functions so that was fixed (r70956 for 2.x, r70957 for 3.x). But I also found out that _warnings.c was also importing (r70965 for 2.x, r70966 for 3.x). But the example still locks up thanks to re doing imports. Basically, don't launch threads during an import, but I have done all that is reasonable to rectify the situation. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:22:02 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Wed, 01 Apr 2009 18:22:02 +0000 Subject: [issue5428] Pyshell history management error In-Reply-To: <1236290707.1.0.232132211255.issue5428@psf.upfronthosting.co.za> Message-ID: <1238610122.27.0.687718377802.issue5428@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: Apparently this can be closed. ---------- assignee: -> kbk nosy: +kbk status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:25:43 2009 From: report at bugs.python.org (Maru Newby) Date: Wed, 01 Apr 2009 18:25:43 +0000 Subject: [issue5656] Coverage execution fails for files not encoded with utf-8 In-Reply-To: <1238610342.6.0.926080137435.issue5656@psf.upfronthosting.co.za> Message-ID: <1238610342.6.0.926080137435.issue5656@psf.upfronthosting.co.za> New submission from Maru Newby : Running the tests with coverage against files using non-utf8 encoding was raising an exception that prevented coverage output from being displayed (patch is attached). The coverage output was also being polluted with failed attempts to display modules that were created during the testing in temporary paths. A patch is attached that prevents coverage output from being attempted for such files. ---------- components: Tests files: trace_detect_encoding.patch keywords: patch messages: 85065 nosy: maru severity: normal status: open title: Coverage execution fails for files not encoded with utf-8 type: crash versions: Python 3.1 Added file: http://bugs.python.org/file13553/trace_detect_encoding.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:26:18 2009 From: report at bugs.python.org (Maru Newby) Date: Wed, 01 Apr 2009 18:26:18 +0000 Subject: [issue5656] Coverage execution fails for files not encoded with utf-8 In-Reply-To: <1238610342.6.0.926080137435.issue5656@psf.upfronthosting.co.za> Message-ID: <1238610378.9.0.196424221472.issue5656@psf.upfronthosting.co.za> Changes by Maru Newby : Added file: http://bugs.python.org/file13554/trace_ignore_temp_path.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:28:56 2009 From: report at bugs.python.org (Josiah Carlson) Date: Wed, 01 Apr 2009 18:28:56 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238610536.72.0.870165632909.issue1641@psf.upfronthosting.co.za> Josiah Carlson added the comment: I'm happy to let them know proposed changes now that I know issues exist, but you have to admit that they were pretty under-the-radar until 4-5 months *after* 2.6 was released. If there is a mailing address that I can send proposed changes to asyncore so that they can have a say, I'd be happy to talk to them. Generally, what you are saying is that I'm damned if I do, damned if I don't. By taking ownership and attempting to fix and improve the module for 2.6 (because there were a bunch of outstanding issues), people are pissed (generally those who use Zope and/or medusa). Despite this, other people have continued to use it, and have been pushing for new features; event scheduling being one of the major parts. Pulling asyncore out of Python is silly. Not improving the module because of fear of breakage is silly. I'm happy to hear suggestions from the Zope crew, but I'm only going to put as much effort in communicating with them as they do me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:36:04 2009 From: report at bugs.python.org (John Ehresman) Date: Wed, 01 Apr 2009 18:36:04 +0000 Subject: [issue1608921] PyThread_release_lock with pthreads munges errno Message-ID: <1238610964.37.0.882508807404.issue1608921@psf.upfronthosting.co.za> John Ehresman added the comment: Any possibility of a test case? ---------- nosy: +jpe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:36:24 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 18:36:24 +0000 Subject: [issue5205] String Formatting with namedtuple In-Reply-To: <1234278265.2.0.777488862861.issue5205@psf.upfronthosting.co.za> Message-ID: <1238610984.08.0.107549601266.issue5205@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:40:34 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 01 Apr 2009 18:40:34 +0000 Subject: [issue1590864] import deadlocks when using PyObjC threads Message-ID: <1238611234.62.0.65180351069.issue1590864@psf.upfronthosting.co.za> Brett Cannon added the comment: It seems the import lock is being triggered because of an import being made in a function call by something else being imported. And because it is the os module one can't pull out the function-level imports without causing problems. Closing as "won't fix". ---------- resolution: -> wont fix stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:41:02 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 01 Apr 2009 18:41:02 +0000 Subject: [issue992389] attribute error after non-from import Message-ID: <1238611262.75.0.113701409183.issue992389@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: brett.cannon -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:41:18 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 01 Apr 2009 18:41:18 +0000 Subject: [issue1552880] Unicode Imports Message-ID: <1238611278.15.0.212434158154.issue1552880@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: brett.cannon -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:44:43 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 01 Apr 2009 18:44:43 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1238611483.32.0.150870817539.issue2953@psf.upfronthosting.co.za> Brett Cannon added the comment: Actually importlib does not test this; that is an old thing from an old sandbox version of importlib that I no longer use. I am assigning to Tarek as the better solution is for distutils to stop using this "private" attribute. ---------- assignee: brett.cannon -> tarek stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:45:01 2009 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 01 Apr 2009 18:45:01 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238611501.28.0.862843755601.issue1641@psf.upfronthosting.co.za> Guido van Rossum added the comment: Josiah, you need an attitude adjustment. The breakage of asyncore in 2.6 was real and is now harming adoption of 2.6 by those folks (who are by nature not early adopters -- their customers are typical enterprise users). Talk to Tres Seaver and Jim Fulton. They occasionally post to python-dev but that doesn't mean they read all of it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:46:00 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 01 Apr 2009 18:46:00 +0000 Subject: [issue1644818] Allow importing built-in submodules Message-ID: <1238611560.07.0.637911296827.issue1644818@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: brett.cannon -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:46:49 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 18:46:49 +0000 Subject: [issue4438] Given a module hierarchy string 'a.b.c', add an easy way to import tail module 'c' In-Reply-To: <1227700719.4.0.771610572152.issue4438@psf.upfronthosting.co.za> Message-ID: <1238611609.81.0.00777535135611.issue4438@psf.upfronthosting.co.za> Georg Brandl added the comment: This feature is implemented as importlib.import_modules() in 2.7 and 3.1; for earlier versions there is also a backport on PyPI. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:49:36 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 01 Apr 2009 18:49:36 +0000 Subject: [issue1548687] C modules reloaded on certain failed imports Message-ID: <1238611776.29.0.0891967251613.issue1548687@psf.upfronthosting.co.za> Brett Cannon added the comment: Trunk has this printing AttributeError as Josiah suggests should happen, so closing as out of date. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:51:27 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 18:51:27 +0000 Subject: [issue4573] zsh-style subpattern matching for fnmatch/glob In-Reply-To: <1228637877.49.0.438531462048.issue4573@psf.upfronthosting.co.za> Message-ID: <1238611887.39.0.256552034045.issue4573@psf.upfronthosting.co.za> Georg Brandl added the comment: This can't go in like this, since suddenly accepting braces is a subtle change of semantics. I could imagine adding another function though, that has extended zsh-like globbing abilities. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:52:37 2009 From: report at bugs.python.org (Larry Hastings) Date: Wed, 01 Apr 2009 18:52:37 +0000 Subject: [issue5630] Update CObject API so it is safe and regular In-Reply-To: <1238526469.89.0.691687509266.issue5630@psf.upfronthosting.co.za> Message-ID: <1238611957.45.0.259940616737.issue5630@psf.upfronthosting.co.za> Larry Hastings added the comment: dalcinl: I made the destructor the first argument because APIs where arguments move around irritate me. In the existing CObject API, the destructor is "always" the last argument--which means in practice it is either the second or third argument, depending on which one you call. I also think that the destructor is a different kind of argument from the rest; the others are data attributes for the object, and the destructor is a callback. I wanted to group the data attributes together. We don't really need two different calls for providing a context pointer, and if folks thought the shorter call should go we can get rid of it. But 90% of the time all you'll need . Also, the new API grew out of the existing API, which had a similar two calls (PyCObject_FromVoidPtr, and PyCObject_FromVoidPtrAndDesc). As for your "comment", I see CObject as a lightweight way of making a generic "handle" type to represent C data structures without going to the trouble of a real PyTypeObject. I think the "storing functions in a vtable then hiding it in the Python symbol table for other modules" use case is a misuse of the API. While I'm not going to actively prevent it, I certainly wouldn't do anything to support it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 20:59:55 2009 From: report at bugs.python.org (Larry Hastings) Date: Wed, 01 Apr 2009 18:59:55 +0000 Subject: [issue5630] Update CObject API so it is safe and regular In-Reply-To: <1238526469.89.0.691687509266.issue5630@psf.upfronthosting.co.za> Message-ID: <1238612395.13.0.928179113915.issue5630@psf.upfronthosting.co.za> Larry Hastings added the comment: Sorry, in editing I forgot to finish my sentence. In the middle of the second paragraph, the sentence should read: But 90% of the time all you'll need is PyCObject_FromVoidPtr(). My other editing mistakes will just have to stand. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 21:00:22 2009 From: report at bugs.python.org (Senthil) Date: Wed, 01 Apr 2009 19:00:22 +0000 Subject: [issue5040] Bug of CGIXMLRPCRequestHandler In-Reply-To: <1232792394.35.0.81811153867.issue5040@psf.upfronthosting.co.za> Message-ID: <1238612422.44.0.526223231172.issue5040@psf.upfronthosting.co.za> Senthil added the comment: CGIXMLRPCRequestHandler was fixed with changes 70954. Modified the patches for Python trunk. Added the Content-Length tests to handle_request ---------- assignee: -> orsenthil nosy: +orsenthil resolution: -> fixed Added file: http://bugs.python.org/file13555/issue5040-py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 21:00:57 2009 From: report at bugs.python.org (Senthil) Date: Wed, 01 Apr 2009 19:00:57 +0000 Subject: [issue5040] Bug of CGIXMLRPCRequestHandler In-Reply-To: <1232792394.35.0.81811153867.issue5040@psf.upfronthosting.co.za> Message-ID: <1238612457.91.0.00298691998496.issue5040@psf.upfronthosting.co.za> Changes by Senthil : Added file: http://bugs.python.org/file13556/issue5040-py27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 21:06:17 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Apr 2009 19:06:17 +0000 Subject: [issue5647] MutableSet.__iand__ implementation calls self.discard while iterating on self In-Reply-To: <1238593402.02.0.427774935909.issue5647@psf.upfronthosting.co.za> Message-ID: <1238612777.02.0.364991382604.issue5647@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for the report. Fixed in r70969, r70970, r70973, and r70974. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 21:13:07 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Wed, 01 Apr 2009 19:13:07 +0000 Subject: [issue3549] Missing IDLE Preferences on Mac In-Reply-To: <1218662954.17.0.753425221317.issue3549@psf.upfronthosting.co.za> Message-ID: <1238613187.52.0.519380164097.issue3549@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: It appears that this s/b closed, but Tracker doesn't automagically close 'pending' issues like SF did. ---------- assignee: -> ronaldoussoren nosy: +kbk status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 21:14:15 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 01 Apr 2009 19:14:15 +0000 Subject: [issue1539925] warnings in interactive sessions Message-ID: <1238613255.34.0.132296980359.issue1539925@psf.upfronthosting.co.za> Brett Cannon added the comment: Not a bad idea, although it would require some work to make it work in a backwards-compatible fashion. ---------- assignee: brett.cannon -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 21:19:34 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Apr 2009 19:19:34 +0000 Subject: [issue5205] String Formatting with namedtuple In-Reply-To: <1234278265.2.0.777488862861.issue5205@psf.upfronthosting.co.za> Message-ID: <1238613574.51.0.490148478131.issue5205@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Overloading __getitem__ with both Sequence and Mapping behavior feels like a bridge too far. That being said, it does have its uses and I'll take it under advisement. ---------- priority: -> low versions: +Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 21:30:28 2009 From: report at bugs.python.org (Ned Deily) Date: Wed, 01 Apr 2009 19:30:28 +0000 Subject: [issue5657] bad repr of itertools.count object with negative value on OS X 10.4 with 10.5 build In-Reply-To: <1238614228.92.0.740866649828.issue5657@psf.upfronthosting.co.za> Message-ID: <1238614228.92.0.740866649828.issue5657@psf.upfronthosting.co.za> New submission from Ned Deily : Observed failure of regression test: ====================================================================== FAIL: test_count (test.test_itertools.TestBasicOps) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/test/te st_itertools.py", line 215, in test_count self.assertEqual(repr(c), 'count(-9)') AssertionError: 'count(4294967287)' != 'count(-9)' Problem can be reproduced using the python.org 3.0.1 OS X installer on a PPC (G3) system running 10.4: /Library/Frameworks/Python.framework/Versions/3.0$ bin/python3.0 Python 3.0.1 (r301:69597, Feb 14 2009, 19:03:52) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from itertools import count >>> x = count(-2) >>> x count(4294967294) >>> next(x) -2 >>> x count(4294967295) >>> next(x) -1 >>> x count(0) >>> next(x) 0 >>> x count(1) >>> nad at pbg3:/Library/Frameworks/Python.framework/Versions/3.0$ uname -a Darwin pbg3.baybryj.net 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc But the same installer on another PPC (G4) system running 10.5 works fine: /Library/Frameworks/Python.framework/Versions/3.0$ bin/python3.0 Python 3.0.1 (r301:69597, Feb 14 2009, 19:03:52) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from itertools import count >>> x = count(-2) >>> x count(-2) >>> next(x) -2 >>> nad at pbg4:/Library/Frameworks/Python.framework/Versions/3.0$ uname -a Darwin pbg4.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:39:01 PST 2008; root:xnu-1228.9.59~1/RELEASE_PPC Power Macintosh Further analysis shows that the problem is reproducible on the 10.4 system with any current build (2.x/3.x) if the installer build is made on a 10.5 system with the default deployment target of 10.3; the correct results are seen if the image is installed on a 10.5 system. If the same source snapshot is used to build an installer image on the 10.4 system, the resulting image does not exhibit this bug, either on the 10.4 or on 10.5 systems. More analysis is needed. It would be helpful if anyone with access to another 10.4 PPC or Intel system could try the above code snippet using the 3.0.1 OS X from python.org. ---------- components: Macintosh messages: 85081 nosy: nad, ronaldoussoren severity: normal status: open title: bad repr of itertools.count object with negative value on OS X 10.4 with 10.5 build versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 21:43:36 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 19:43:36 +0000 Subject: [issue5040] Bug of CGIXMLRPCRequestHandler In-Reply-To: <1232792394.35.0.81811153867.issue5040@psf.upfronthosting.co.za> Message-ID: <1238615016.59.0.692295352802.issue5040@psf.upfronthosting.co.za> Changes by Georg Brandl : Added file: http://bugs.python.org/file13557/issue5040-py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 21:43:50 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 19:43:50 +0000 Subject: [issue5040] Bug of CGIXMLRPCRequestHandler In-Reply-To: <1232792394.35.0.81811153867.issue5040@psf.upfronthosting.co.za> Message-ID: <1238615030.63.0.947147658874.issue5040@psf.upfronthosting.co.za> Changes by Georg Brandl : Added file: http://bugs.python.org/file13558/issue5040-py27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 21:45:17 2009 From: report at bugs.python.org (John Ehresman) Date: Wed, 01 Apr 2009 19:45:17 +0000 Subject: [issue3551] multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) In-Reply-To: <1238603856.94.0.671908579552.issue3551@psf.upfronthosting.co.za> Message-ID: <49D3C43F.1060506@wingware.com> John Ehresman added the comment: Looking into this a bit more and reading the documentation (sorry, I picked this up because I know something about win32 and not because I know multiprocessing), it looks like a connection is supposed to be message oriented and not byte oriented so that a recv() should return what is sent in a single send(). This is like how Queue works in the threading case. Note that I think the method signature when using the dummy.connection differ when using pipe_connection and that the two differ in what happens when several send_bytes's occur before a recv_bytes I'm currently leaning toward essentially leaving the current behavior (and documenting it) though maybe with a better exception and documenting that large byte arrays can't be sent through the pipe. What's still an issue is if a pickle ends up being too large. ---------- title: multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) -> multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 21:51:17 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Apr 2009 19:51:17 +0000 Subject: [issue5205] String Formatting with namedtuple In-Reply-To: <1234278265.2.0.777488862861.issue5205@psf.upfronthosting.co.za> Message-ID: <1238615477.85.0.490852383344.issue5205@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Other thoughts: Currently the __getitem__ method is inherited from tuple. That means that for normal tuple operations, a named tuple has no performance penalty (no pure python code is called). If __getitem__ were overridden, there would be a substantial additional cost. Currently, nt[x] raises IndexError if x is not an index a valid range, but mappings expect a KeyError for missing items. Switching to a LookupError would break existing code that catches IndexError. The collections.Mapping ABC suggests that anything trying to be a mapping should also provide items(), keys(), values(), and get(). These don't make much sense for named tuples. The semantics of __iter__ differ for Mappings and Sequences. The former returns keys and the latter returns values. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 22:05:10 2009 From: report at bugs.python.org (Andreas Balogh) Date: Wed, 01 Apr 2009 20:05:10 +0000 Subject: [issue1982] Feature: extend strftime to accept milliseconds In-Reply-To: <1201805956.67.0.436839158391.issue1982@psf.upfronthosting.co.za> Message-ID: <1238616310.68.0.597590548721.issue1982@psf.upfronthosting.co.za> Andreas Balogh added the comment: - a_datetime.replace(microsecond = 1) + a_datetime = a_datetime.replace(microsecond = 1) Thanks for spotting the bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 22:23:07 2009 From: report at bugs.python.org (Jesse Noller) Date: Wed, 01 Apr 2009 20:23:07 +0000 Subject: [issue3551] multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) In-Reply-To: <49D3C43F.1060506@wingware.com> Message-ID: <4222a8490904011323o6656a55ap189e59e36d8a9287@mail.gmail.com> Jesse Noller added the comment: On Wed, Apr 1, 2009 at 2:45 PM, John Ehresman wrote: > > John Ehresman added the comment: > > Looking into this a bit more and reading the documentation (sorry, I > picked this up because I know something about win32 and not because I > know multiprocessing), it looks like a connection is supposed to be > message oriented and not byte oriented so that a recv() should return > what is sent in a single send(). ?This is like how Queue works in the > threading case. ?Note that I think the method signature when using the > dummy.connection differ when using pipe_connection and that the two > differ in what happens when several send_bytes's occur before a recv_bytes > > I'm currently leaning toward essentially leaving the current behavior > (and documenting it) though maybe with a better exception and > documenting that large byte arrays can't be sent through the pipe. > What's still an issue is if a pickle ends up being too large. > I think I'm fine with this as well, let's documents/add an exception - as for the pickle being too large, I think for now we're safe documenting it ---------- title: multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) -> multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 22:25:45 2009 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 01 Apr 2009 20:25:45 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1238617545.63.0.00940544719571.issue4015@psf.upfronthosting.co.za> anatoly techtonik added the comment: The solution with launcher is complex (if not complicated). It will make scripts unportable - consider using a removable disk with your Python and application script. The interpreter was not installed on target system, but with .bat file application is still able to run. In case there is a problem with registry (backup/restore/profile migration operation) when recorded version differs from actual installed file, you will have a great time trying to debug what your script fails to work, because the version of Python is wrong. I would name this behaviour implicit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 22:27:03 2009 From: report at bugs.python.org (Senthil) Date: Wed, 01 Apr 2009 20:27:03 +0000 Subject: [issue5040] Bug of CGIXMLRPCRequestHandler In-Reply-To: <1232792394.35.0.81811153867.issue5040@psf.upfronthosting.co.za> Message-ID: <1238617623.33.0.167428371723.issue5040@psf.upfronthosting.co.za> Senthil added the comment: Applied: issue5040-py27.diff (rev patch 1) and issue5040-py3k.diff (original). ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 22:30:52 2009 From: report at bugs.python.org (Phil Pennock) Date: Wed, 01 Apr 2009 20:30:52 +0000 Subject: [issue5639] Support TLS SNI extension in ssl module In-Reply-To: <1238567905.09.0.139467917453.issue5639@psf.upfronthosting.co.za> Message-ID: <1238617852.29.0.679159248467.issue5639@psf.upfronthosting.co.za> Phil Pennock added the comment: Note: this previous work is client-side only, as noted in the body of the report. I'll look into what's needed for clean server-side support too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 22:38:45 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 01 Apr 2009 20:38:45 +0000 Subject: [issue5644] test___future__ fails for py3k on Windows In-Reply-To: <1238586635.64.0.888928120067.issue5644@psf.upfronthosting.co.za> Message-ID: <1238618325.38.0.850705986565.issue5644@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70983. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 22:55:00 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 01 Apr 2009 20:55:00 +0000 Subject: [issue5637] 2to3 does not convert urllib.urlopen to urllib.request.urlopen In-Reply-To: <1238551022.24.0.463432313749.issue5637@psf.upfronthosting.co.za> Message-ID: <1238619300.67.0.174711247304.issue5637@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r70991. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 22:55:50 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Apr 2009 20:55:50 +0000 Subject: [issue5269] OS X Installer: add options to specify universal build type and deployment target In-Reply-To: <1234687874.34.0.561795974463.issue5269@psf.upfronthosting.co.za> Message-ID: <1238619350.02.0.379818399725.issue5269@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Not sure why this was assigned to me. ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 23:01:03 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 21:01:03 +0000 Subject: [issue4572] add SEEK_* values to io and/or io.IOBase In-Reply-To: <1228625063.64.0.370686457231.issue4572@psf.upfronthosting.co.za> Message-ID: <1238619663.8.0.162966177365.issue4572@psf.upfronthosting.co.za> Georg Brandl added the comment: Added in r70992. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 23:03:57 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Apr 2009 21:03:57 +0000 Subject: [issue5567] Operators in operator module don't work with keyword arguments In-Reply-To: <1238082498.01.0.463671336038.issue5567@psf.upfronthosting.co.za> Message-ID: <1238619837.81.0.234292838217.issue5567@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, it makes no sense to me to add keyword arguments everywhere just to accommodate partial(). The alternative using lambda is workable and there have been proposals to further build-out partial. I acknowledge your distaste for lambda but it is firmly a part of the language and we aren't compelled to have to provide an alternative formulation for every possible lambda use case. In the case of the operator module, many of the functions do not have a natural set of names and so they should remain nameless -- there is not reason to prefer add(a,b) over add(p,q) or add(i,j) or add(x,y) -- none of those add any explanatory value to the reader and are fluff at best and hazardous at worst (for non-commutative binary operations when a letter can be reasonably assumed to be either of the two arguments). ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 23:07:22 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Apr 2009 21:07:22 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1238620042.96.0.976822492662.issue5139@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Added file: http://bugs.python.org/file13559/math_combinatorics.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 23:09:54 2009 From: report at bugs.python.org (Mitchell Model) Date: Wed, 01 Apr 2009 21:09:54 +0000 Subject: [issue5658] make html in doc fails because Makefile assigns python to PYTHON In-Reply-To: <1238620194.29.0.802372876082.issue5658@psf.upfronthosting.co.za> Message-ID: <1238620194.29.0.802372876082.issue5658@psf.upfronthosting.co.za> New submission from Mitchell Model : Mac OSX, py3k 70991 cd doc; make html fails due to an old style except clause in Doc/tools/sphinx/__init__.py The make works in release30-maint. The difference is that the generated doc/Makefile in release30-maint assigns python2.5 to PYTHON, but the py3k doc/Makefile assigns python. I have things set up so that 'python' is Python 3. I understand how to set the variable from the command line, and I can build the html doc, but this should be fixed, either by continuing to specify python2.5 in the sphinx Makefile or by changing __init__.py and whatever other code uses exception binding to the new syntax. ---------- components: Build messages: 85094 nosy: MLModel severity: normal status: open title: make html in doc fails because Makefile assigns python to PYTHON versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 23:10:18 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Apr 2009 21:10:18 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1238620218.46.0.865778484216.issue5139@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Probably, these should be saved for an integer functions module. In the meantime, leaving this open with low priority. There's not much of a current need since the functions are so simple to write in pure python. The itertools docs provide the formulas for people who have forgotten them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 23:10:57 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Apr 2009 21:10:57 +0000 Subject: [issue1673203] add identity function Message-ID: <1238620257.0.0.307981595071.issue1673203@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 23:14:26 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Apr 2009 21:14:26 +0000 Subject: [issue4124] Patch for adding "default" to itemgetter and attrgetter In-Reply-To: <1224022053.76.0.0750871741065.issue4124@psf.upfronthosting.co.za> Message-ID: <1238620466.23.0.0485270926533.issue4124@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Am closing this one because the API doesn't mesh well with the existing extensions for multiple attributes. If those weren't already present, there might be a case for adding this extension. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 23:16:27 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Apr 2009 21:16:27 +0000 Subject: [issue1820] Enhance Object/structseq.c to match namedtuple and tuple api In-Reply-To: <1200284428.58.0.762384814897.issue1820@psf.upfronthosting.co.za> Message-ID: <1238620587.98.0.827868764426.issue1820@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Jack, do you have any interest in putting this one over the goal line? ---------- assignee: rhettinger -> jackdied nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 23:27:29 2009 From: report at bugs.python.org (Josiah Carlson) Date: Wed, 01 Apr 2009 21:27:29 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238621249.05.0.446552363376.issue1641@psf.upfronthosting.co.za> Josiah Carlson added the comment: Here's a question: How do we fix 2.6? >From what I've read, the only answer I've heard is "revert to 2.5 in 2.6.2", which has the same issues as adding True/False in 2.2 . I agree that Zope not working in 2.6 is a problem, I agree that the documentation for asyncore is lacking, I agree that I probably wasn't as vocal as I could have been prior to the changes, I agree that 3rd parties relying on internal implementation details not covered in the limited documentation is a problem, I agree that we need to figure something out for asyncore 2.7 and beyond, I agree that we need to figure something out for asyncore 2.6 issues related to Zope and Medusa, ... I'm happy to take the blame for changing asyncore internals in Python 2.6 . And I've not stated otherwise in any forum. At the time I thought it was the right thing to do. If I could change the code retroactively, I would probably do so. But it seems to me that "fork asyncore", "pull asyncore out of the stdlib", and "revert to 2.5" are all variants of the cliche "throwing the baby out with the bathwater". There are good bug fixes in 2.6, and depending on how much of the internals that Zope and/or medusa rely on, we might even be able to write a short wrapper/adapter to throw in to Zope and/or asyncore. I'll contact Tres and Jim, and hopefully be able to come to some reasonable solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 23:30:52 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Apr 2009 21:30:52 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1238621452.04.0.782509121853.issue2531@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Mark, I looked at your patch again and think we should support relaxed conversions for ordering comparisons but not equality/inequality. This will improve on the current situation where we get flat-out misleading results for <, <=, >, and >=. It keeps the status quo for equality/inequality and thereby avoids the problems with __hash__. The only thing that I don't like about it is that you can't do the usual reasoning where "not ab" implies "a==b". Still, it is an improvement over "a _______________________________________ From report at bugs.python.org Wed Apr 1 23:34:34 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Apr 2009 21:34:34 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1238621674.81.0.693106268853.issue2531@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 23:35:47 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Apr 2009 21:35:47 +0000 Subject: [issue5205] String Formatting with namedtuple In-Reply-To: <1234278265.2.0.777488862861.issue5205@psf.upfronthosting.co.za> Message-ID: <1238621747.82.0.57025005558.issue5205@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 1 23:38:35 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Apr 2009 21:38:35 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1238621915.75.0.000453211055188.issue5139@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Upon further thought, I'm going to withdraw this feature request. If an integer functions module surfaces at some point, it will be an obvious addition. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 00:01:31 2009 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 01 Apr 2009 22:01:31 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238623291.71.0.123243289406.issue1641@psf.upfronthosting.co.za> Guido van Rossum added the comment: Well arguably asyncore is unsalvageable due to the undocumented internals issue, and we sure know a bit more about how to design a *good* asynchronous API than we did when asyncore was created. (One hint: don't make subclassing part of your API.) The Zope folks at the meeting in all seriousness proposed reverting to the 2.5 version of asyncore since "it is broken in 2.6". Since I don't use it myself I really have no idea if anyone is using the 2.6 version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 00:04:26 2009 From: report at bugs.python.org (John Ehresman) Date: Wed, 01 Apr 2009 22:04:26 +0000 Subject: [issue3551] multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) In-Reply-To: <1218712281.34.0.473878484861.issue3551@psf.upfronthosting.co.za> Message-ID: <1238623466.33.0.021216660523.issue3551@psf.upfronthosting.co.za> John Ehresman added the comment: New patch which raises ValueError if WriteFile fails with ERROR_NO_SYSTEM_RESOURCES. I wasn't able to reliably write a test since putting the send_bytes in a try block seems to allow the call succeed. This is probably OS, swap file size, and timing dependent. ---------- Added file: http://bugs.python.org/file13560/win32_pipe2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 00:41:24 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 01 Apr 2009 22:41:24 +0000 Subject: [issue3448] Multi-process 2to3 In-Reply-To: <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za> Message-ID: <1238625684.4.0.00437338153048.issue3448@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I added some support for concurrent running in r70999. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Thu Apr 2 00:41:51 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Wed, 01 Apr 2009 22:41:51 +0000 Subject: [issue5654] Add C hook in PyDict_SetItem for debuggers In-Reply-To: <1238604905.42.0.578461685574.issue5654@psf.upfronthosting.co.za> Message-ID: <1238625711.11.0.00491416015009.issue5654@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch seems to contain unrelated changes to multiprocessing. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 00:49:28 2009 From: report at bugs.python.org (Maru Newby) Date: Wed, 01 Apr 2009 22:49:28 +0000 Subject: [issue5215] change value of local variable in debug In-Reply-To: <1234338182.69.0.0258607971835.issue5215@psf.upfronthosting.co.za> Message-ID: <1238626168.57.0.0696135800544.issue5215@psf.upfronthosting.co.za> Maru Newby added the comment: Modifications to the f_locals dict are only saved at the end of traceback, and each traceback function was using the f_locals accessor that returns the dict state as of the start of traceback. The provided patch caches f_locals on setup and ensures that all traceback functions share that cached dict, ensuring that modifications are no longer overwritten by a function using the unmodified dict. ---------- keywords: +patch nosy: +maru Added file: http://bugs.python.org/file13561/pdb_cache_f_locals.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 00:50:47 2009 From: report at bugs.python.org (Kuno) Date: Wed, 01 Apr 2009 22:50:47 +0000 Subject: [issue5659] logging.FileHandler encoding parameter does not work as expected In-Reply-To: <1238626245.67.0.948477208489.issue5659@psf.upfronthosting.co.za> Message-ID: <1238626245.67.0.948477208489.issue5659@psf.upfronthosting.co.za> New submission from Kuno : When attempting to use the encoding="" parameter of logging.FileHandler I always get a UnicodeError. This looks like a bug to me (otherwise I am seriously misunderstanding what the parameter is supposed to do). The attached file contains the code to reproduce this error. Traceback (most recent call last): File "/usr/local/stow/Python-2.6.1/lib/python2.6/logging/__init__.py", line 765, in emit self.stream.write(fs % msg.encode("UTF-8")) File "/usr/local/stow/Python-2.6.1/lib/python2.6/codecs.py", line 686, in write return self.writer.write(data) UnicodeDecodeError: 'ascii' codec can't decode byte 0xec in position 0: ordinal not in range(128) For completeness: I am running a self-compiled Python 2.6.1 on the current Debian GNU/Linux testing release. ---------- components: Library (Lib) files: l.py messages: 85106 nosy: warp severity: normal status: open title: logging.FileHandler encoding parameter does not work as expected versions: Python 2.6 Added file: http://bugs.python.org/file13562/l.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 00:55:25 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 01 Apr 2009 22:55:25 +0000 Subject: [issue5659] logging.FileHandler encoding parameter does not work as expected In-Reply-To: <1238626245.67.0.948477208489.issue5659@psf.upfronthosting.co.za> Message-ID: <1238626525.02.0.585240366944.issue5659@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> vsajip nosy: +vsajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:00:32 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 01 Apr 2009 23:00:32 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238626832.13.0.640439937374.issue2578@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Do you mind if I rename all the double underscore methods that Greg's patch added to _ underscore matching the style of the rest of the module? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:02:10 2009 From: report at bugs.python.org (R. David Murray) Date: Wed, 01 Apr 2009 23:02:10 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1231175004.95.0.780150738153.issue4847@psf.upfronthosting.co.za> Message-ID: <1238626930.63.0.618944711325.issue4847@psf.upfronthosting.co.za> R. David Murray added the comment: I've added some unit tests for embedded newlines, and py3k csv passes (on linux at least) when newline='' is used. Unless someone can provide a test case that fails when newline='' is used, I propose we fix the documentation and leave the code alone. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:06:35 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 01 Apr 2009 23:06:35 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238627195.21.0.435665486515.issue1641@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I don't know what are the problems experienced by the Zope folks (is there a place where this is discussed?) but I can guess that they're having problems with asynchat rather than with asyncore, since the latter hasn't changed too much between 2.5 and 2.6 except for low level connection related bug fixes. The greatest difference in the new asynchat is that the producer_fifo attribute is no longer an asyncore.fifo() instance but a deque(). Python 2.5: > self.producer_fifo = fifo() Python 2.6 > self.producer_fifo = deque() Although they're quite similar the old code relying on the fifo() API can't obviously work anymore. This could have been a bad choice and there are probably other changes that might have caused the problem (one other change that comes to my mind is the different readable() writable() implementation). An alternative to completely reverting asynchat.py to the 2.5 version, which is somewhat too drastic IMO, could be identifying what are the changes that caused the incompatibility, and reverting those parts only for 2.6.2, in a way that no one (2.5 and 2.6 users) is affected. If there's a place where this is discussed I could contribute in some way since I've been working on asynchat/asyncore for a long time now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:07:48 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 23:07:48 +0000 Subject: [issue5656] Coverage execution fails for files not encoded with utf-8 In-Reply-To: <1238610342.6.0.926080137435.issue5656@psf.upfronthosting.co.za> Message-ID: <1238627268.62.0.0287248803982.issue5656@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r71002. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:08:47 2009 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 01 Apr 2009 23:08:47 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238627327.78.0.817212430486.issue2578@psf.upfronthosting.co.za> Guido van Rossum added the comment: Do I mind? I *insist*! I thought put a note about that in the code review but I guess Greg missed it. Thanks for noticing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:08:57 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 01 Apr 2009 23:08:57 +0000 Subject: [issue5499] only accept byte for getarg('c') and unicode for getarg('C') In-Reply-To: <1237294698.92.0.380829116259.issue5499@psf.upfronthosting.co.za> Message-ID: <1238627337.66.0.52837423974.issue5499@psf.upfronthosting.co.za> Gregory P. Smith added the comment: good catch. the patch looks correct to me. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:09:20 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 23:09:20 +0000 Subject: [issue5657] bad repr of itertools.count object with negative value on OS X 10.4 with 10.5 build In-Reply-To: <1238614228.92.0.740866649828.issue5657@psf.upfronthosting.co.za> Message-ID: <1238627360.64.0.941334328208.issue5657@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:11:20 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 23:11:20 +0000 Subject: [issue5658] make html in doc fails because Makefile assigns python to PYTHON In-Reply-To: <1238620194.29.0.802372876082.issue5658@psf.upfronthosting.co.za> Message-ID: <1238627480.6.0.287115473837.issue5658@psf.upfronthosting.co.za> Georg Brandl added the comment: We don't recommend calling Python 3.x "python". In fact, the executable will always be called "python3" in Python 3.1+. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:12:40 2009 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Apr 2009 23:12:40 +0000 Subject: [issue5627] PyDict_SetItemString() fails when the second argument is null In-Reply-To: <1238518033.32.0.364685297824.issue5627@psf.upfronthosting.co.za> Message-ID: <1238627560.22.0.566978312361.issue5627@psf.upfronthosting.co.za> Georg Brandl added the comment: Raymond, do you have an opinion about this? ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:12:45 2009 From: report at bugs.python.org (Josiah Carlson) Date: Wed, 01 Apr 2009 23:12:45 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238627565.63.0.478614387212.issue1641@psf.upfronthosting.co.za> Josiah Carlson added the comment: To be wholly clear about the issues, it's not with asyncore, the core asynchronous library, it's with asynchat and the internal changes to that. Any changes to asyncore were to fix corner cases and exceptions. No API, internal or external was changed. People who subclassed from asyncore should have no problems. People who subclassed from asynchat may have problems. If we want to revert selected changes to asynchat, that's fine with me. AFAICT, there is only 1 substantial bugfix in asynchat (if your text terminator isn't discovered in the first ac_in_buffer_size bytes read since the last terminator, your connection will hang), which is easily pulled out. Offering a compatibility mode is also relatively easy. Six months ago you were 'eh' with what was going on with the asyncore libraries (see messages from early October). Over a year ago everyone on python-dev cared so little about the libraries that it was preferred to give me commit access than for someone to review the code. Now everyone seems willing and happy to remove the library because it is "unsalvageable". Ultimately the change that broke Zope/medusa was replacing the use of asynchat.fifo with a deque, and getting rid of ac_out_buffer. Those are *tiny* changes that we can change back, temporarily pull into Zope, and tweak Medusa to fix (I'd be happy to offer a patch to AMK to produce Medusa 0.5.5). As for your "subclassing is bad" comment, Twisted, wxPython, SocketServer (SimpleXMLRPCServer, TCPServer, ...), sgmllib.SGMLParser, etc., all use subclassing as part of their APIs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:16:38 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 01 Apr 2009 23:16:38 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238627798.16.0.500116030286.issue2578@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Done in r71004. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:17:29 2009 From: report at bugs.python.org (Stephan R.A. Deibel) Date: Wed, 01 Apr 2009 23:17:29 +0000 Subject: [issue1608921] PyThread_release_lock with pthreads munges errno Message-ID: <1238627849.6.0.626294906369.issue1608921@psf.upfronthosting.co.za> Stephan R.A. Deibel added the comment: He he, well my attempts at replicating this on Linux and OS X failed using Python 2.3->2.6 so I'm closing this bug. I'm uploading the test case for what it's worth. My best guess at what happened is that there was some interaction w/ older gdb, since I do know that I stepped through code in gdb to see this happen, or perhaps it was on older pthreads. The bug report dates from what I believe I had another desktop computer and older Linux version on that. Thanks for spurring me on to looking at this again and in more detail. ---------- status: open -> closed Added file: http://bugs.python.org/file13563/testcase.tgz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:19:40 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 01 Apr 2009 23:19:40 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1238627980.01.0.129244013211.issue4136@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This change should be ported to py3k sometime before the first beta. ---------- nosy: +benjamin.peterson priority: critical -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:21:34 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 01 Apr 2009 23:21:34 +0000 Subject: [issue1608921] PyThread_release_lock with pthreads munges errno Message-ID: <1238628094.76.0.778849577744.issue1608921@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:22:57 2009 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 01 Apr 2009 23:22:57 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238628177.26.0.581290301571.issue1641@psf.upfronthosting.co.za> Guido van Rossum added the comment: Josiah, there's no need to get all defensive and passive-aggressive about it. I'm just reporting about strong feelings that were brought up at the language summit -- to my surprise too! Admitting somebody made a mistake would be step one (and I'll gladly admit I wasn't aware of the Zope issues at the time or I would've warned you). I've asked Tres Seaver and Jim Fulton to comment on this issue, I really can't help you more with the details of which module actually broke and what to do about it. I'm just recommending you use your commit privileges wisely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:25:56 2009 From: report at bugs.python.org (John Ehresman) Date: Wed, 01 Apr 2009 23:25:56 +0000 Subject: [issue5654] Add C hook in PyDict_SetItem for debuggers In-Reply-To: <1238604905.42.0.578461685574.issue5654@psf.upfronthosting.co.za> Message-ID: <1238628356.13.0.271014713579.issue5654@psf.upfronthosting.co.za> John Ehresman added the comment: Oops, the multiprocessing changes should not be in the patch ---------- nosy: +sdeibel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 01:33:15 2009 From: report at bugs.python.org (Senthil) Date: Wed, 01 Apr 2009 23:33:15 +0000 Subject: [issue4860] js_output wrong for cookies with " characters In-Reply-To: <1231278251.3.0.384248147823.issue4860@psf.upfronthosting.co.za> Message-ID: <1238628795.3.0.282393223993.issue4860@psf.upfronthosting.co.za> Senthil added the comment: Cookie.Cookie is deprecated in Py2k. In Py3k, it is http.cookies.SimpleCookie. The bug was present in Py3k, the attached patch fixes it. ---------- assignee: -> orsenthil nosy: +orsenthil resolution: -> accepted Added file: http://bugs.python.org/file13564/issue4860.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 02:24:33 2009 From: report at bugs.python.org (Mitchell Model) Date: Thu, 02 Apr 2009 00:24:33 +0000 Subject: [issue5658] make html in doc fails because Makefile assigns python to PYTHON In-Reply-To: <1238627480.6.0.287115473837.issue5658@psf.upfronthosting.co.za> Message-ID: Mitchell Model added the comment: OK, makes sense. Just out of curiosity where does a user find that information? a developer? There is still an inconsistency between the Makefiles in the two versions. That seems dangerous. -- -- --- Mitchell ---------- title: make html in doc fails because Makefile assigns python to PYTHON -> make html in doc fails because Makefile assigns python to PYTHON Added file: http://bugs.python.org/file13565/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Re: [issue5658] make html in doc fails because Makefile as
OK, makes sense. Just out of curiosity where does a user find that information? a developer?

There is still an inconsistency between the Makefiles in the two versions. That seems dangerous.
--
--

        --- Mitchell
From report at bugs.python.org Thu Apr 2 02:27:54 2009 From: report at bugs.python.org (Andrew Bennetts) Date: Thu, 02 Apr 2009 00:27:54 +0000 Subject: [issue5660] Cannot deepcopy unittest.TestCase instances In-Reply-To: <1238632074.64.0.545150493098.issue5660@psf.upfronthosting.co.za> Message-ID: <1238632074.64.0.545150493098.issue5660@psf.upfronthosting.co.za> New submission from Andrew Bennetts : Here's a demonstration of the bug: >>> from unittest import TestCase >>> class MyTest(TestCase): ... def test_foo(self): pass ... >>> tc = MyTest('test_foo') >>> import copy >>> copy.deepcopy(tc) Traceback (most recent call last): File "", line 1, in File "/usr/local/stow/py2.7/lib/python2.7/copy.py", line 189, in deepcopy y = _reconstruct(x, rv, 1, memo) File "/usr/local/stow/py2.7/lib/python2.7/copy.py", line 338, in _reconstruct state = deepcopy(state, memo) File "/usr/local/stow/py2.7/lib/python2.7/copy.py", line 162, in deepcopy y = copier(x, memo) File "/usr/local/stow/py2.7/lib/python2.7/copy.py", line 255, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/local/stow/py2.7/lib/python2.7/copy.py", line 162, in deepcopy y = copier(x, memo) File "/usr/local/stow/py2.7/lib/python2.7/copy.py", line 255, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/local/stow/py2.7/lib/python2.7/copy.py", line 189, in deepcopy y = _reconstruct(x, rv, 1, memo) File "/usr/local/stow/py2.7/lib/python2.7/copy.py", line 323, in _reconstruct y = callable(*args) File "/usr/local/bin/../stow/py2.7/lib/python2.7/copy_reg.py", line 93, in __newobj__ return cls.__new__(cls, *args) TypeError: instancemethod expected at least 2 arguments, got 0 This regression breaks bzr's test suite, which copies test objects to run the same test against multiple scenarios (e.g. to run all the same tests against all the implementations of bzrlib.transport.Transport, such as HTTPTransport and SFTPTransport.) also implements test parameterisation in this way, and it is extremely useful. I suspect the __test_equality_funcs on TestCase is the problem: >>> tc.__dict__ {'_testMethodDoc': None, '_TestCase__type_equality_funcs': {: >, : >, : >, : >, : >}, '_testMethodName': 'test_foo'} copy.deepcopy can't deepcopy bound methods, reasonably enough. ---------- components: Library (Lib) messages: 85123 nosy: spiv severity: normal status: open title: Cannot deepcopy unittest.TestCase instances versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 02:34:28 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 02 Apr 2009 00:34:28 +0000 Subject: [issue5499] only accept byte for getarg('c') and unicode for getarg('C') In-Reply-To: <1237294698.92.0.380829116259.issue5499@psf.upfronthosting.co.za> Message-ID: <1238632468.32.0.125284132996.issue5499@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r71013. ---------- nosy: +benjamin.peterson resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 02:35:14 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 02 Apr 2009 00:35:14 +0000 Subject: [issue5660] Cannot deepcopy unittest.TestCase instances In-Reply-To: <1238632074.64.0.545150493098.issue5660@psf.upfronthosting.co.za> Message-ID: <1238632514.0.0.359691607321.issue5660@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 02:41:39 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 02 Apr 2009 00:41:39 +0000 Subject: [issue5410] msvcrt bytes cleanup In-Reply-To: <1236081375.11.0.544682804494.issue5410@psf.upfronthosting.co.za> Message-ID: <1238632899.18.0.326460676959.issue5410@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- priority: -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 02:41:42 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 02 Apr 2009 00:41:42 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1238632902.76.0.547819882076.issue5391@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- priority: -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 03:03:27 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 02 Apr 2009 01:03:27 +0000 Subject: [issue5661] asyncore should catch EPIPE while sending() and receiving() In-Reply-To: <1238634207.37.0.10074614667.issue5661@psf.upfronthosting.co.za> Message-ID: <1238634207.37.0.10074614667.issue5661@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : I received a report from a pyftpdlib user: http://code.google.com/p/pyftpdlib/issues/detail?id=104 ...complaining that an unhandled EPIPE error might be thrown by asyncore.py on OS X in certain circumstances which are hardly reproducible. By googling a little about it it seems that he's not the first one who got this problem: http://mail.python.org/pipermail/medusa-dev/2003/000852.html https://bugs.launchpad.net/zope2/+bug/142654 I think it makes sense modifying dispatcher.send() and dispatcher.recv() to include EPIPE as error condition to indicate that the connection has been closed and call handle_close() as consequence. The patch in attachment does that. ---------- components: Library (Lib) files: asyncore.patch keywords: patch messages: 85125 nosy: giampaolo.rodola, josiah.carlson, josiahcarlson severity: normal status: open title: asyncore should catch EPIPE while sending() and receiving() type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13566/asyncore.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 03:13:04 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Apr 2009 01:13:04 +0000 Subject: [issue5654] Add C hook in PyDict_SetItem for debuggers In-Reply-To: <1238604905.42.0.578461685574.issue5654@psf.upfronthosting.co.za> Message-ID: <1238634784.86.0.315350939655.issue5654@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This is a critical path in Python and it should be kept as clean as possible. If something like this goes in, it should be #ifdef'd out by default; otherwise, we have everyone paying the price for a feature that almost no one will use. Strong -1 against this being in the default build. Also, I'm not convinced that the idea itself is even that useful. Why dictionary sets/dels and not list assignments and whatnot. By itself, this one watchpoint hook provides very little utility. We've already cluttered the codebase with various trace and timing options. If something else were to be included, it should be part of a larger, well thought out approach (like what is being done for DTrace). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 03:19:01 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 01:19:01 +0000 Subject: [issue1525549] Document additions from PEP 302 Message-ID: <1238635141.28.0.717445736804.issue1525549@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 03:19:42 2009 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 Apr 2009 01:19:42 +0000 Subject: [issue5661] asyncore should catch EPIPE while sending() and receiving() In-Reply-To: <1238634207.37.0.10074614667.issue5661@psf.upfronthosting.co.za> Message-ID: <1238635182.36.0.666491571145.issue5661@psf.upfronthosting.co.za> Josiah Carlson added the comment: I think that catching one more potential failure modes is reasonable. I'm probably going to apply a variant of this patch to pull the sequence into a frozenset for quick lookups, and so that we don't need to keep updating two different places if/when new failure conditions arise. ---------- assignee: -> josiahcarlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 03:25:16 2009 From: report at bugs.python.org (Jesse Noller) Date: Thu, 02 Apr 2009 01:25:16 +0000 Subject: [issue5545] multiprocessing: switch to autoconf detection of platform values In-Reply-To: <1237828557.72.0.911819794631.issue5545@psf.upfronthosting.co.za> Message-ID: <1238635516.34.0.0113404158398.issue5545@psf.upfronthosting.co.za> Jesse Noller added the comment: This is committed as of CL 71007 on trunk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 03:30:57 2009 From: report at bugs.python.org (George Yoshida) Date: Thu, 02 Apr 2009 01:30:57 +0000 Subject: [issue5662] py3k interpreter leak In-Reply-To: <1238635857.67.0.0527294444116.issue5662@psf.upfronthosting.co.za> Message-ID: <1238635857.67.0.0527294444116.issue5662@psf.upfronthosting.co.za> New submission from George Yoshida : In py3k interpreter, every time you hit enter, refcount is incremented one by one. It looks like r70823 is the culprit. (tested with py3k:70823 and release30-maint:70831) Python 3.1a1+ (py3k:70823, Apr 2 2009, 10:21:55) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> [36297 refs] >>> [36298 refs] >>> [36299 refs] >>> [36300 refs] >>> [36301 refs] >>> [36302 refs] >>> [36303 refs] ---------- messages: 85129 nosy: quiver severity: normal status: open title: py3k interpreter leak versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 03:31:02 2009 From: report at bugs.python.org (Erick Tryzelaar) Date: Thu, 02 Apr 2009 01:31:02 +0000 Subject: [issue4573] zsh-style subpattern matching for fnmatch/glob In-Reply-To: <1228637877.49.0.438531462048.issue4573@psf.upfronthosting.co.za> Message-ID: <1238635862.52.0.171382539016.issue4573@psf.upfronthosting.co.za> Erick Tryzelaar added the comment: I completely agree, Georg. I tried to get this in before 3.0, but it didn't work out which is a shame. I assume you also feel that we couldn't make a backwards compatible change in 3.1, right? I thought I heard that 3.1 may break some things in 3.0, but I'm not positive. Got any suggestions for a function name? Here are some I have in mind, but none of them are particularly good: fnmatch.fnmatch2 fnmatch.efnmatch fnmatch.extended_fnmatch glob.glob2 glob.eglob glob.extended_glob ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 03:35:01 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Apr 2009 01:35:01 +0000 Subject: [issue4573] zsh-style subpattern matching for fnmatch/glob In-Reply-To: <1228637877.49.0.438531462048.issue4573@psf.upfronthosting.co.za> Message-ID: <1238636101.09.0.324183149152.issue4573@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I like glob_ext() and fnmatch_ext(). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 03:40:57 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 01:40:57 +0000 Subject: [issue1507224] sys.path issue if sys.prefix contains a colon Message-ID: <1238636457.45.0.498299193323.issue1507224@psf.upfronthosting.co.za> Brett Cannon added the comment: Autoconf will not even generate a Makefile that will run with a prefix of ``/tmp/\:colon`` so closing as out of date since their is a more fundamental toolchain issue outside of our control. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 03:42:29 2009 From: report at bugs.python.org (Jesse Noller) Date: Thu, 02 Apr 2009 01:42:29 +0000 Subject: [issue5545] multiprocessing: switch to autoconf detection of platform values In-Reply-To: <1237828557.72.0.911819794631.issue5545@psf.upfronthosting.co.za> Message-ID: <1238636549.68.0.618087296293.issue5545@psf.upfronthosting.co.za> Jesse Noller added the comment: Closing as fixed until the buildbots prove otherwise ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 03:42:55 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 01:42:55 +0000 Subject: [issue779191] BasicModuleLoader behaviour in Python 2.3c2 Message-ID: <1238636575.43.0.847217653175.issue779191@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 03:46:46 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Apr 2009 01:46:46 +0000 Subject: [issue5627] PyDict_SetItemString() fails when the second argument is null In-Reply-To: <1238518033.32.0.364685297824.issue5627@psf.upfronthosting.co.za> Message-ID: <1238636806.12.0.694789602108.issue5627@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Martin, do you have any insight into this? The values being seen and the fact that it occurs only in a particular build suggests that pyport.h has inconsistent definitions for Py_ssize_t, PY_SSIZE_T_MAX, and PY_SSIZE_T_MIN. The values look like signed and unsigned values are being conflated. ---------- assignee: rhettinger -> loewis nosy: +loewis status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 03:52:32 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 02 Apr 2009 01:52:32 +0000 Subject: [issue5662] py3k interpreter leak In-Reply-To: <1238635857.67.0.0527294444116.issue5662@psf.upfronthosting.co.za> Message-ID: <1238637152.85.0.965474957187.issue5662@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r71018. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 03:58:41 2009 From: report at bugs.python.org (Michael Foord) Date: Thu, 02 Apr 2009 01:58:41 +0000 Subject: [issue5663] Better failure messages for unittest assertions In-Reply-To: <1238637520.24.0.827171540397.issue5663@psf.upfronthosting.co.za> Message-ID: <1238637520.24.0.827171540397.issue5663@psf.upfronthosting.co.za> New submission from Michael Foord : Patch for unittest on trunk. It provides better default failure messages for assertTrue and assertFalse (current is "AssertionError: None"). It also provides a new class attribute for TestCase: longMessage This defaults to False. If set to True, passing in an explicit custom message does *not* override the helpful default failure message in asserts which tell you which objects were involved in the failure. Even if set to True or False in a TestCase then longMessage can still be overridden in individual tests by setting an instance attribute. Needs docs. Could longMessage default to True in 3.1. ---------- components: Library (Lib) files: unittest-messages.diff keywords: patch messages: 85136 nosy: mfoord severity: normal status: open title: Better failure messages for unittest assertions type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file13567/unittest-messages.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 04:02:24 2009 From: report at bugs.python.org (Michael Foord) Date: Thu, 02 Apr 2009 02:02:24 +0000 Subject: [issue5663] Better failure messages for unittest assertions In-Reply-To: <1238637520.24.0.827171540397.issue5663@psf.upfronthosting.co.za> Message-ID: <00151750eeba980fa4046688d295@google.com> Michael Foord added the comment: Reviewers: , Description: Patch for unittest on trunk. It provides better default failure messages for assertTrue and assertFalse (current is "AssertionError: None"). It also provides a new class attribute for TestCase: longMessage This defaults to False. If set to True, passing in an explicit custom message does *not* override the helpful default failure message in asserts which tell you which objects were involved in the failure. Even if set to True or False in a TestCase then longMessage can still be overridden in individual tests by setting an instance attribute. Needs docs. Could longMessage default to True in 3.1? Please review this at http://codereview.appspot.com/32102 Affected files: Lib/test/test_unittest.py Lib/unittest.py Misc/NEWS ---------- nosy: +fuzzyman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 04:04:40 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 02:04:40 +0000 Subject: [issue1044382] Can't raise "C API version mismatch" warning Message-ID: <1238637880.68.0.203276942995.issue1044382@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Thu Apr 2 04:29:38 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Thu, 02 Apr 2009 02:29:38 +0000 Subject: [issue5627] PyDict_SetItemString() fails when the second argument is null In-Reply-To: <1238636806.12.0.694789602108.issue5627@psf.upfronthosting.co.za> Message-ID: <49D42305.3030804@v.loewis.de> Martin v. L?wis added the comment: > Martin, do you have any insight into this Are you sure you commenting into the right issue? How does Py_ssize_t come into play here? ---------- title: PyDict_SetItemString() fails when the second argument is null -> PyDict_SetItemString() fails when the second argument is null _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 04:32:44 2009 From: report at bugs.python.org (John Ehresman) Date: Thu, 02 Apr 2009 02:32:44 +0000 Subject: [issue5654] Add C hook in PyDict_SetItem for debuggers In-Reply-To: <1238634784.86.0.315350939655.issue5654@psf.upfronthosting.co.za> Message-ID: <49D423BE.8050209@wingware.com> John Ehresman added the comment: My hope is that the runtime performance cost will be negligible but if it isn't, it probably shouldn't go in. The issue with not putting it in another build is that many python debugger users won't want to recompile, so I see it as being of limited use if it's not in the default build. My experience with watchpoints in C debuggers (gdb) is they can be the difference between finding a bug and not -- I recall finding ref counting bugs only because I could watch the ref count and break on the code that modifies it. I would be willing to try and generalize this and support more hooks if there is some interest in it, though watching namespaces is probably the greatest payoff. I think that if will be difficult to remove the hooks currently in the default build because of backward compatibility issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 04:42:36 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Apr 2009 02:42:36 +0000 Subject: [issue5657] bad repr of itertools.count object with negative value on OS X 10.4 with 10.5 build In-Reply-To: <1238614228.92.0.740866649828.issue5657@psf.upfronthosting.co.za> Message-ID: <1238640156.72.0.705472179243.issue5657@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Martin, do you have any insight into this? The values being seen and the fact that it occurs only in a particular build suggests that pyport.h has inconsistent definitions for Py_ssize_t, PY_SSIZE_T_MAX, and PY_SSIZE_T_MIN. The values look like signed and unsigned values are being conflated. ---------- assignee: rhettinger -> loewis nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 04:44:32 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Apr 2009 02:44:32 +0000 Subject: [issue5627] PyDict_SetItemString() fails when the second argument is null In-Reply-To: <1238518033.32.0.364685297824.issue5627@psf.upfronthosting.co.za> Message-ID: <1238640272.59.0.164612970413.issue5627@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 04:44:40 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Apr 2009 02:44:40 +0000 Subject: [issue5627] PyDict_SetItemString() fails when the second argument is null In-Reply-To: <1238518033.32.0.364685297824.issue5627@psf.upfronthosting.co.za> Message-ID: <1238640280.17.0.701786118219.issue5627@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 04:45:24 2009 From: report at bugs.python.org (Jesse Noller) Date: Thu, 02 Apr 2009 02:45:24 +0000 Subject: [issue3110] Multiprocessing package build problem on Solaris 10 In-Reply-To: <1213472177.07.0.795399068376.issue3110@psf.upfronthosting.co.za> Message-ID: <1238640324.01.0.23633835451.issue3110@psf.upfronthosting.co.za> Jesse Noller added the comment: Additional protection checked in in r71022 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 04:46:15 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Apr 2009 02:46:15 +0000 Subject: [issue5627] PyDict_SetItemString() fails when the second argument is null In-Reply-To: <1238518033.32.0.364685297824.issue5627@psf.upfronthosting.co.za> Message-ID: <1238640375.39.0.633229350505.issue5627@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I recommend rejecting this one. The assert is sufficient for third-party modules to run their tests and detect bad calls. The code path is too critical to add another check. ---------- assignee: loewis -> georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 04:46:37 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 02:46:37 +0000 Subject: [issue1514734] site.py can break the location of the python library Message-ID: <1238640397.37.0.552440963112.issue1514734@psf.upfronthosting.co.za> Brett Cannon added the comment: The semantics of the functions in os cannot change. And I prefer keeping it as-is since I wouldn't want to change the symlinks on a relative path. ---------- assignee: brett.cannon -> resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 04:46:41 2009 From: report at bugs.python.org (Chris McDonough) Date: Thu, 02 Apr 2009 02:46:41 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238640401.11.0.384196883482.issue1641@psf.upfronthosting.co.za> Chris McDonough added the comment: I am the developer of Supervisor (http://supervisord.org) which depends on (and extends) Medusa 0.5.4, which itself depends on some implementation details of pre-2.6 versions of asynchat (e.g. "ac_out_buffer"). I need to make sure Supervisor works with Python 2.3, 2.4, and 2.5, as well as Python 2.6. To do so, I intend to just ship the Python 2.5 version of asyncore/asynchat along with Medusa 0.5.4 and Supervisor in the next Supervisor release; straddling the asynchat stuff would just be too hard here. I don't know of any other consumers of Medusa other than Zope and Supervisor, so maybe Medusa should just ship with its own version of asyncore and asynchat forever from now on; I'm certainly not going to take the time to "fix" Medusa to forward port it to the 2.6 version of asynchat. I might argue that in retrospect the the current implementation of asynchat might have been better named "asynchat2", as the changes made to it seem to have broken of its major consumers. But we can work around it by just forking, I think. ---------- nosy: +mcdonc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 04:52:52 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 02 Apr 2009 02:52:52 +0000 Subject: [issue5627] PyDict_SetItemString() fails when the second argument is null In-Reply-To: <1238518033.32.0.364685297824.issue5627@psf.upfronthosting.co.za> Message-ID: <1238640772.74.0.118219478384.issue5627@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 04:53:30 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 02:53:30 +0000 Subject: [issue701743] Reloading pseudo modules Message-ID: <1238640810.57.0.500449633777.issue701743@psf.upfronthosting.co.za> Brett Cannon added the comment: Since reload is about reloading modules and sticking stuff other than modules in sys.modules is a partial hack I am closing as "rejected". ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 04:59:20 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 02 Apr 2009 02:59:20 +0000 Subject: [issue5658] make html in doc fails because Makefile assigns python to PYTHON In-Reply-To: <1238620194.29.0.802372876082.issue5658@psf.upfronthosting.co.za> Message-ID: <1238641160.88.0.0483045491328.issue5658@psf.upfronthosting.co.za> Georg Brandl added the comment: Why is a change to the Makefile an "inconsistency"? Anyway, once 3.1 is released the naming scheme will be announced. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 05:02:45 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 02 Apr 2009 03:02:45 +0000 Subject: [issue4217] Add file comparisons to the unittest library In-Reply-To: <1225153586.34.0.218245937188.issue4217@psf.upfronthosting.co.za> Message-ID: <1238641365.19.0.0624094613814.issue4217@psf.upfronthosting.co.za> Georg Brandl added the comment: I'm not sure we need new unittest functions for file comparison; but a function in difflib that directly takes two filenames would perhaps be accepted. That will need a new patch however. ---------- assignee: -> zseil nosy: +georg.brandl, zseil resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 05:04:55 2009 From: report at bugs.python.org (Senthil) Date: Thu, 02 Apr 2009 03:04:55 +0000 Subject: [issue4860] js_output wrong for cookies with " characters In-Reply-To: <1231278251.3.0.384248147823.issue4860@psf.upfronthosting.co.za> Message-ID: <1238641495.22.0.111991175903.issue4860@psf.upfronthosting.co.za> Senthil added the comment: Because SimpleCookie class is still usable (that is not deprecated), it makes sense to back port to Py2.7. Applied the patches in revision 71030 and r71029. Thanks. ---------- status: open -> closed versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 05:12:44 2009 From: report at bugs.python.org (Michael Foord) Date: Thu, 02 Apr 2009 03:12:44 +0000 Subject: [issue5663] Better failure messages for unittest assertions In-Reply-To: <1238637520.24.0.827171540397.issue5663@psf.upfronthosting.co.za> Message-ID: <1238641964.29.0.0325048644236.issue5663@psf.upfronthosting.co.za> Michael Foord added the comment: Updated patch with better docstring for _formatMessage and docs. Patch reviewed by Brett Cannon so will commit. ---------- Added file: http://bugs.python.org/file13568/unittest-messages.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 05:22:48 2009 From: report at bugs.python.org (Senthil) Date: Thu, 02 Apr 2009 03:22:48 +0000 Subject: [issue5664] 2to3 wont convert Cookie.Cookie properly In-Reply-To: <1238642568.2.0.229238012255.issue5664@psf.upfronthosting.co.za> Message-ID: <1238642568.2.0.229238012255.issue5664@psf.upfronthosting.co.za> New submission from Senthil : In 2.7 code have: import Cookie c = Cookie.Cookie('abc') 2to3 would do: c = http.cookies.Cookie('abc') This is wrong as there is no class as Cookie in http.cookies. It should translated to be http.cookies.SimpleCookie. ---------- assignee: benjamin.peterson components: 2to3 (2.x to 3.0 conversion tool) messages: 85151 nosy: benjamin.peterson, orsenthil severity: normal status: open title: 2to3 wont convert Cookie.Cookie properly type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 05:22:52 2009 From: report at bugs.python.org (Michael Foord) Date: Thu, 02 Apr 2009 03:22:52 +0000 Subject: [issue5663] Better failure messages for unittest assertions In-Reply-To: <1238637520.24.0.827171540397.issue5663@psf.upfronthosting.co.za> Message-ID: <1238642572.32.0.659095487268.issue5663@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 05:23:16 2009 From: report at bugs.python.org (R. David Murray) Date: Thu, 02 Apr 2009 03:23:16 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1231175004.95.0.780150738153.issue4847@psf.upfronthosting.co.za> Message-ID: <1238642596.17.0.713947865855.issue4847@psf.upfronthosting.co.za> R. David Murray added the comment: I'm attaching a proposed doc patch for comment. I replace mentions of 'rb' with "newline=''", including in the examples. I also deleted the unicode discussion (since CSV obviously handles unicode now) as well as the extensive unicode examples that are no longer relevant. (There are a couple other tweaks I made as I went along, but nothing substantial.) ---------- stage: -> commit review type: -> behavior Added file: http://bugs.python.org/file13569/issue4847-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 05:42:12 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 03:42:12 +0000 Subject: [issue1419652] PyImport_AppendInittab stores pointer to parameter Message-ID: <1238643732.41.0.641173256574.issue1419652@psf.upfronthosting.co.za> Brett Cannon added the comment: I made the char * a const char *. Committed in r71031 & r71033 for 2.x, r71034 for 3.x. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 05:46:43 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 03:46:43 +0000 Subject: [issue1214675] module warnings lacks a remove filter function Message-ID: <1238644003.8.0.239741291492.issue1214675@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: brett.cannon -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 05:49:34 2009 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 02 Apr 2009 03:49:34 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238644174.07.0.781839967409.issue1641@psf.upfronthosting.co.za> Guido van Rossum added the comment: Looking back, I think Zope and Medusa should have adopted and evolved their own copy of asynchat a long time ago... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 05:51:44 2009 From: report at bugs.python.org (R. David Murray) Date: Thu, 02 Apr 2009 03:51:44 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1231175004.95.0.780150738153.issue4847@psf.upfronthosting.co.za> Message-ID: <1238644304.06.0.750423254713.issue4847@psf.upfronthosting.co.za> Changes by R. David Murray : Removed file: http://bugs.python.org/file13569/issue4847-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 05:52:40 2009 From: report at bugs.python.org (R. David Murray) Date: Thu, 02 Apr 2009 03:52:40 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1231175004.95.0.780150738153.issue4847@psf.upfronthosting.co.za> Message-ID: <1238644360.51.0.544821691574.issue4847@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: georg.brandl -> r.david.murray Added file: http://bugs.python.org/file13570/issue4847-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 05:56:02 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 03:56:02 +0000 Subject: [issue966431] import x.y inside of module x.y Message-ID: <1238644562.14.0.846670451926.issue966431@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: brett.cannon -> resolution: -> out of date status: open -> closed superseder: -> attribute error after non-from import _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 05:57:51 2009 From: report at bugs.python.org (Jesse Noller) Date: Thu, 02 Apr 2009 03:57:51 +0000 Subject: [issue3770] test_multiprocessing fails on systems with HAVE_SEM_OPEN=0 In-Reply-To: <1220487838.93.0.477905681389.issue3770@psf.upfronthosting.co.za> Message-ID: <1238644671.75.0.834055235742.issue3770@psf.upfronthosting.co.za> Jesse Noller added the comment: Closing; we've removed hard-coded platform variables for a better autoconf approach. We currently skip the test suite on platforms which don't support or have what we need. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 05:58:25 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 03:58:25 +0000 Subject: [issue965206] importing dynamic modules via embedded python Message-ID: <1238644705.17.0.781513563136.issue965206@psf.upfronthosting.co.za> Brett Cannon added the comment: sys.builtin_module_names lists the modules that are statically linked. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 06:01:02 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 04:01:02 +0000 Subject: [issue856103] reload() fails with modules from zips Message-ID: <1238644862.44.0.591913441085.issue856103@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 06:10:53 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 04:10:53 +0000 Subject: [issue809254] imp.find_module doesn't work in /tmp Message-ID: <1238645453.95.0.99668701247.issue809254@psf.upfronthosting.co.za> Brett Cannon added the comment: It's because /tmp on OS X is a symlink to /private/tmp. Works fine if you specify /private as the search path. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 06:13:36 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 04:13:36 +0000 Subject: [issue787113] zipimport on meta_path fails with mutual importers Message-ID: <1238645616.14.0.244990919298.issue787113@psf.upfronthosting.co.za> Brett Cannon added the comment: The zipimporter is not designed to work on sys.meta_path, so closing as "won't fix". ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 06:14:17 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 04:14:17 +0000 Subject: [issue4347] Circular dependency causes SystemError when adding new syntax In-Reply-To: <1227022091.75.0.852526924329.issue4347@psf.upfronthosting.co.za> Message-ID: <1238645657.83.0.810625575282.issue4347@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: brett.cannon -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 06:21:42 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 04:21:42 +0000 Subject: [issue689895] Imports can deadlock Message-ID: <1238646102.85.0.996330050157.issue689895@psf.upfronthosting.co.za> Brett Cannon added the comment: Obviously we decided not to remove the import lock. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 06:22:43 2009 From: report at bugs.python.org (Jesse Noller) Date: Thu, 02 Apr 2009 04:22:43 +0000 Subject: [issue3551] multiprocessing.Pipe terminates with ERROR_NO_SYSTEM_RESOURCES if large data is sent (win2000) In-Reply-To: <1218712281.34.0.473878484861.issue3551@psf.upfronthosting.co.za> Message-ID: <1238646163.77.0.56412885221.issue3551@psf.upfronthosting.co.za> Jesse Noller added the comment: Patch applied in r71036 on python-trunk ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 06:24:00 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 04:24:00 +0000 Subject: [issue1005113] test__locale fails on MacOS X Message-ID: <1238646240.08.0.763098862214.issue1005113@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 06:35:23 2009 From: report at bugs.python.org (Michael Foord) Date: Thu, 02 Apr 2009 04:35:23 +0000 Subject: [issue5660] Cannot deepcopy unittest.TestCase instances In-Reply-To: <1238632074.64.0.545150493098.issue5660@psf.upfronthosting.co.za> Message-ID: <1238646923.66.0.042586929254.issue5660@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 06:45:00 2009 From: report at bugs.python.org (R. David Murray) Date: Thu, 02 Apr 2009 04:45:00 +0000 Subject: [issue2568] Seconds range in time unit In-Reply-To: <1207551193.66.0.586350051723.issue2568@psf.upfronthosting.co.za> Message-ID: <1238647499.67.0.0881269572254.issue2568@psf.upfronthosting.co.za> R. David Murray added the comment: Doc patch applied in r71037. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 06:45:49 2009 From: report at bugs.python.org (Collin Winter) Date: Thu, 02 Apr 2009 04:45:49 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> New submission from Collin Winter : The attached patch adds more tests for pickling: - Add tests for the module-level load() and dump() functions. - Add tests for cPickle's internal data structures, stressing workloads with many gets/puts. - Add tests for the Pickler and Unpickler classes, in particular the memo attribute. - test_xpickle is extended to test backwards compatibility with Python 2.4, 2.5 and 2.6 by round-tripping pickled objects through a worker process. 2.3 was too difficult to support. I'll port to py3k after reviewed for trunk. ---------- components: Tests files: pickle_tests.patch keywords: needs review, patch messages: 85162 nosy: collinwinter severity: normal status: open title: Add more pickling tests type: behavior versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13571/pickle_tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 06:56:01 2009 From: report at bugs.python.org (Michael Foord) Date: Thu, 02 Apr 2009 04:56:01 +0000 Subject: [issue5660] Cannot deepcopy unittest.TestCase instances In-Reply-To: <1238632074.64.0.545150493098.issue5660@psf.upfronthosting.co.za> Message-ID: <1238648161.87.0.251376309548.issue5660@psf.upfronthosting.co.za> Michael Foord added the comment: This is a workaround: import copy copy._deepcopy_dispatch[types.MethodType] = copy._deepcopy_atomic ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 07:18:12 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 05:18:12 +0000 Subject: [issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6 In-Reply-To: <1236517160.74.0.61108619715.issue5442@psf.upfronthosting.co.za> Message-ID: <1238649492.81.0.97593707481.issue5442@psf.upfronthosting.co.za> Brett Cannon added the comment: Fixed in r71042. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 07:18:15 2009 From: report at bugs.python.org (Jesse Noller) Date: Thu, 02 Apr 2009 05:18:15 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> Message-ID: <1238649495.34.0.225150706427.issue5585@psf.upfronthosting.co.za> Jesse Noller added the comment: committed in r71041 on python trunk, provided clean buildbots, we will merge to python 3.1 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 07:19:21 2009 From: report at bugs.python.org (Michael Foord) Date: Thu, 02 Apr 2009 05:19:21 +0000 Subject: [issue5660] Cannot deepcopy unittest.TestCase instances In-Reply-To: <1238632074.64.0.545150493098.issue5660@psf.upfronthosting.co.za> Message-ID: <1238649561.49.0.67875694212.issue5660@psf.upfronthosting.co.za> Michael Foord added the comment: We can fix this by wrapping the assert functions in our assert register as deep-copyable objects. (And then unwrapping when we fetch them.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 07:35:26 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 05:35:26 +0000 Subject: [issue3619] A more informative message for ImportError In-Reply-To: <1219240834.62.0.382152843898.issue3619@psf.upfronthosting.co.za> Message-ID: <1238650526.27.0.839978217079.issue3619@psf.upfronthosting.co.za> Brett Cannon added the comment: Closing as "won't fix" as this assumes that path information is applicable to all importers which is not correct. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 07:36:16 2009 From: report at bugs.python.org (Jesse Noller) Date: Thu, 02 Apr 2009 05:36:16 +0000 Subject: [issue3831] Multiprocessing: Expose underlying pipe in queues In-Reply-To: <1221095639.45.0.136100950642.issue3831@psf.upfronthosting.co.za> Message-ID: <1238650576.59.0.30044503017.issue3831@psf.upfronthosting.co.za> Jesse Noller added the comment: Can you please provide an example w.r.t to how you would handle the case where poll()/recv returns partial bytes of the object instead of a full object? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 07:36:39 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Thu, 02 Apr 2009 05:36:39 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238650599.72.0.314588389354.issue1641@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : ---------- nosy: +stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 07:42:13 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 05:42:13 +0000 Subject: [issue2227] time.strptime too strict? should it assume current year? In-Reply-To: <1204580486.17.0.196786227347.issue2227@psf.upfronthosting.co.za> Message-ID: <1238650933.14.0.94732146484.issue2227@psf.upfronthosting.co.za> Brett Cannon added the comment: After having thought about this I have decided I am going to stick with the current semantics. Having the year change underneath code based solely on when it executes will cause more problems than it will solve. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 07:43:22 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 05:43:22 +0000 Subject: [issue616247] More documentation for the imp module Message-ID: <1238651002.17.0.958161282996.issue616247@psf.upfronthosting.co.za> Brett Cannon added the comment: As Raymond pointed out, people should not use the undocumented functions. Deprecation should be a separate issue. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 07:52:36 2009 From: report at bugs.python.org (Michael Foord) Date: Thu, 02 Apr 2009 05:52:36 +0000 Subject: [issue5660] Cannot deepcopy unittest.TestCase instances In-Reply-To: <1238632074.64.0.545150493098.issue5660@psf.upfronthosting.co.za> Message-ID: <1238651556.07.0.723571835009.issue5660@psf.upfronthosting.co.za> Michael Foord added the comment: Fixed in revision 71043. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 08:04:34 2009 From: report at bugs.python.org (Hye-Shik Chang) Date: Thu, 02 Apr 2009 06:04:34 +0000 Subject: [issue5640] Wrong print() result when unicode error handler is not 'strict' In-Reply-To: <1238571303.14.0.143713902199.issue5640@psf.upfronthosting.co.za> Message-ID: <1238652274.98.0.318884409898.issue5640@psf.upfronthosting.co.za> Hye-Shik Chang added the comment: Right. Here I upload a patch to fix the addressed problem on cjkcodecs. Please test whether the patch corrects the behavior. ---------- keywords: +patch Added file: http://bugs.python.org/file13572/cjkcodecs-fix-statefulenc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 08:10:11 2009 From: report at bugs.python.org (Hye-Shik Chang) Date: Thu, 02 Apr 2009 06:10:11 +0000 Subject: [issue5640] Wrong print() result when unicode error handler is not 'strict' In-Reply-To: <1238571303.14.0.143713902199.issue5640@psf.upfronthosting.co.za> Message-ID: <1238652611.87.0.0290705450437.issue5640@psf.upfronthosting.co.za> Hye-Shik Chang added the comment: Sorry. I just found that the fix breaks few other test units. I'll check. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 08:34:18 2009 From: report at bugs.python.org (lekma) Date: Thu, 02 Apr 2009 06:34:18 +0000 Subject: [issue5585] implement initializer for multiprocessing.BaseManager.start() In-Reply-To: <1238238986.76.0.311716023622.issue5585@psf.upfronthosting.co.za> Message-ID: <1238654058.44.0.95507774153.issue5585@psf.upfronthosting.co.za> lekma added the comment: thanks guys ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 09:01:32 2009 From: report at bugs.python.org (Hyeshik Chang) Date: Thu, 02 Apr 2009 07:01:32 +0000 Subject: [issue5640] Wrong print() result when unicode error handler is not 'strict' In-Reply-To: <1238571303.14.0.143713902199.issue5640@psf.upfronthosting.co.za> Message-ID: <1238655692.21.0.149091849817.issue5640@psf.upfronthosting.co.za> Hyeshik Chang added the comment: Uploaded a revised patch that solved the newer problem. ---------- Added file: http://bugs.python.org/file13573/cjkcodecs-fix-statefulenc-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 09:01:43 2009 From: report at bugs.python.org (Hyeshik Chang) Date: Thu, 02 Apr 2009 07:01:43 +0000 Subject: [issue5640] Wrong print() result when unicode error handler is not 'strict' In-Reply-To: <1238571303.14.0.143713902199.issue5640@psf.upfronthosting.co.za> Message-ID: <1238655703.75.0.661353864793.issue5640@psf.upfronthosting.co.za> Changes by Hyeshik Chang : Removed file: http://bugs.python.org/file13572/cjkcodecs-fix-statefulenc.diff _______________________________________ Python tracker _______________________________________ From =?utf-8?b?UGhpbGlwcCBUw7Zsa2UgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za Thu Apr 2 09:14:24 2009 From: =?utf-8?b?UGhpbGlwcCBUw7Zsa2UgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za (=?utf-8?b?UGhpbGlwcCBUw7Zsa2UgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za) Date: Thu, 02 Apr 2009 07:14:24 +0000 Subject: [issue5565] Strange behavior when I logout() with IMAP4_SSL In-Reply-To: <1238051545.58.0.380777960062.issue5565@psf.upfronthosting.co.za> Message-ID: <1238656464.56.0.868534779309.issue5565@psf.upfronthosting.co.za> Philipp T?lke added the comment: Just FYI, this issue is in python2.6, too. Only, that in 2.6 the GC does not collect the objects immediately, so that very soon I have a galore of connections in the CLOSE_WAIT-State. And I checked, I can not read anymore data out of the socket. Is this a bug in the ssl-implemantation? ---------- versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 09:25:48 2009 From: report at bugs.python.org (Jani Hakala) Date: Thu, 02 Apr 2009 07:25:48 +0000 Subject: [issue5527] multiprocessing won't work with Tkinter (under Linux) In-Reply-To: <1237574081.02.0.0677822756927.issue5527@psf.upfronthosting.co.za> Message-ID: <1238657148.57.0.394639193495.issue5527@psf.upfronthosting.co.za> Jani Hakala added the comment: The script tk_test.py produces the window with one button after one removes the line 'from Tkinter import *' and adds line 'from Tkinter import Tk, Button' inside Panel.draw() as a first line. So importing Tkinter after the fork seems to solve the problem. Importing it before the fork only makes the parent process consume more memory anyway. Maybe importing the Tkinter (and thus _tkinter) causes some initialisation to be done. If this should be done only in the process that utilises Tkinter there might be problems like this. ---------- components: +Tkinter nosy: +jahakala _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 09:27:55 2009 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 02 Apr 2009 07:27:55 +0000 Subject: [issue5659] logging.FileHandler encoding parameter does not work as expected In-Reply-To: <1238626245.67.0.948477208489.issue5659@psf.upfronthosting.co.za> Message-ID: <1238657275.92.0.439421054928.issue5659@psf.upfronthosting.co.za> Vinay Sajip added the comment: This was a regression in 2.6, previously reported in issue #5170, and was fixed in trunk in r69447 and in the release26-maint branch in r69448. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 09:39:51 2009 From: report at bugs.python.org (Senthil) Date: Thu, 02 Apr 2009 07:39:51 +0000 Subject: [issue1634770] Please provide rsync-method in the urllib[2] module Message-ID: <1238657991.28.0.622251019754.issue1634770@psf.upfronthosting.co.za> Senthil added the comment: Rsync is a tool, which can be written using urllib2. urllib2 is a library adhering to certain SPECs (Internet RFCs). Do not see a reason to include tools in urllib2. Closing it as wont-fix. Thanks. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 09:42:04 2009 From: report at bugs.python.org (Tim Golden) Date: Thu, 02 Apr 2009 07:42:04 +0000 Subject: [issue4573] zsh-style subpattern matching for fnmatch/glob In-Reply-To: <1238635862.52.0.171382539016.issue4573@psf.upfronthosting.co.za> Message-ID: <49D46C69.6060608@timgolden.me.uk> Tim Golden added the comment: Is there mileage for glob.glob to grow a dialect param, with a default value to keep it backwards compatible? Otherwise, presumably, proponents of some other xsh variant will come forward with their scheme of matching, and regex-followers with theirs and so on. ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 10:23:09 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Apr 2009 08:23:09 +0000 Subject: [issue5499] only accept byte for getarg('c') and unicode for getarg('C') In-Reply-To: <1237294698.92.0.380829116259.issue5499@psf.upfronthosting.co.za> Message-ID: <1238660589.15.0.946957983921.issue5499@psf.upfronthosting.co.za> STINNER Victor added the comment: Ooops, I read converterr("a unicode character", ...), but it should be converterr("an unicode character", ...) ;-) Thanks benjamin.peterson, it will help other issues like #5391 and #5410. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 10:32:21 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Apr 2009 08:32:21 +0000 Subject: [issue5410] msvcrt bytes cleanup In-Reply-To: <1236081375.11.0.544682804494.issue5410@psf.upfronthosting.co.za> Message-ID: <1238661141.21.0.670561122278.issue5410@psf.upfronthosting.co.za> STINNER Victor added the comment: issue5499 is fixed, so msvcrt_wchar.patch can now be used :-) Anyone available for a review and/or _a test_? I don't have Windows, so it's hard for me to test my patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 10:35:04 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Apr 2009 08:35:04 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1238661304.47.0.552427083989.issue5391@psf.upfronthosting.co.za> STINNER Victor added the comment: @ocean-city: Can you update your patch to leave Py_BuildValue("c", ...) and PyArg_ParseTuple(args, "c:write_byte", ...) unchanged, since #5499 is fixed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 11:04:55 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 02 Apr 2009 09:04:55 +0000 Subject: [issue5666] Py_BuildValue("c") should return bytes? In-Reply-To: <1238663094.93.0.570643835814.issue5666@psf.upfronthosting.co.za> Message-ID: <1238663094.93.0.570643835814.issue5666@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : This is related to #5499. PyArg_ParseTuple treats "c" as bytes of 1 length now, but Py_BuildValue still treats "c" as unicode of 1 length. ---------- components: Interpreter Core files: py3k_build_value.patch keywords: patch messages: 85184 nosy: ocean-city priority: release blocker severity: normal status: open title: Py_BuildValue("c") should return bytes? versions: Python 3.1 Added file: http://bugs.python.org/file13574/py3k_build_value.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 11:07:06 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 02 Apr 2009 09:07:06 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1238663226.97.0.650330848449.issue5391@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Yes, here is the patch. But I noticed Py_BuildValue('c') still returns unicode. To pass the test, #5666 is needed. ---------- dependencies: +Py_BuildValue("c") should return bytes? Added file: http://bugs.python.org/file13575/py3k_mmap_bytes_cleanup_with_getarg_c.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 11:11:43 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 02 Apr 2009 09:11:43 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1238663503.87.0.912707037754.issue5391@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file13575/py3k_mmap_bytes_cleanup_with_getarg_c.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 11:12:05 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 02 Apr 2009 09:12:05 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1238663525.81.0.418374188553.issue5391@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file13576/py3k_mmap_bytes_cleanup_with_getarg_c.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 11:18:57 2009 From: report at bugs.python.org (Atsuo Ishimoto) Date: Thu, 02 Apr 2009 09:18:57 +0000 Subject: [issue5640] Wrong print() result when unicode error handler is not 'strict' In-Reply-To: <1238571303.14.0.143713902199.issue5640@psf.upfronthosting.co.za> Message-ID: <1238663937.99.0.47307212528.issue5640@psf.upfronthosting.co.za> Atsuo Ishimoto added the comment: I tested with py3k branch and worked fine. Thank you. ---------- versions: +Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 11:25:40 2009 From: report at bugs.python.org (Hyeshik Chang) Date: Thu, 02 Apr 2009 09:25:40 +0000 Subject: [issue5667] Interpreter fails to initialize when IO encoding is one of CJK on build dir In-Reply-To: <1238664339.95.0.0471411238024.issue5667@psf.upfronthosting.co.za> Message-ID: <1238664339.95.0.0471411238024.issue5667@psf.upfronthosting.co.za> New submission from Hyeshik Chang : When a developer uses one of CJK encodings, interpreter crashes while its initialization on build dir (not on installed base). % LC_ALL=ko_KR.eucKR ./python Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: euc_kr zsh: abort (core dumped) LC_ALL=ko_KR.eucKR ./python The problem is that codec lookup function fails to import a relevant codec module because path to dynamic modules is added by site.py, which is a later step than standard I/O object initializations. ---------- components: Interpreter Core messages: 85187 nosy: hyeshik.chang priority: low severity: normal status: open title: Interpreter fails to initialize when IO encoding is one of CJK on build dir type: crash versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 11:27:00 2009 From: report at bugs.python.org (Hyeshik Chang) Date: Thu, 02 Apr 2009 09:27:00 +0000 Subject: [issue5667] Interpreter fails to initialize on build dir when IO encoding is one of CJK In-Reply-To: <1238664339.95.0.0471411238024.issue5667@psf.upfronthosting.co.za> Message-ID: <1238664420.08.0.406332564465.issue5667@psf.upfronthosting.co.za> Changes by Hyeshik Chang : ---------- title: Interpreter fails to initialize when IO encoding is one of CJK on build dir -> Interpreter fails to initialize on build dir when IO encoding is one of CJK _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 11:48:42 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Apr 2009 09:48:42 +0000 Subject: [issue5666] Py_BuildValue("c") should return bytes? In-Reply-To: <1238663094.93.0.570643835814.issue5666@psf.upfronthosting.co.za> Message-ID: <1238665722.33.0.554331597726.issue5666@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 12:07:52 2009 From: report at bugs.python.org (Glin) Date: Thu, 02 Apr 2009 10:07:52 +0000 Subject: [issue5641] Local variables not freed when Exception raises in function called from cycle In-Reply-To: <1238575778.52.0.687578256719.issue5641@psf.upfronthosting.co.za> Message-ID: <1238666872.83.0.770628932779.issue5641@psf.upfronthosting.co.za> Glin added the comment: I'm not talking about exception variable, but about the variables in local scope of function job() (in my example it is the variable 'a' of class A). Sorry, if I did not make myself clear. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 12:26:01 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 02 Apr 2009 10:26:01 +0000 Subject: [issue1590864] import deadlocks when using PyObjC threads Message-ID: <1238667961.0.0.447271128419.issue1590864@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I don't understand why the function-level imports cannot be removed. Wouldn't it be possible to do something like this: from errno import ENOENT as _ENOENT, ENOTDIR as _ENOTDIR def _execvpe(file, args, env=None): pass # Use _ENOENT and _ENOTDIR in this code BTW. it is IMO rather strange to close issues as wont fix when there is a real error in supported and not deprecated code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 12:30:22 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 02 Apr 2009 10:30:22 +0000 Subject: [issue5657] bad repr of itertools.count object with negative value on OS X 10.4 with 10.5 build In-Reply-To: <1238614228.92.0.740866649828.issue5657@psf.upfronthosting.co.za> Message-ID: <1238668222.24.0.4244108778.issue5657@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Raymond: My guess is that this is caused because the binary was build on OSX 10.5, where 'printf("%zd")' works file for negative numbers, and the tests was run on OSX 10.4, where the same printf statement doesn't work correctly. I'll experiment with a fix for this over the weekend. The fix I'm thinking of right now is to patch either configure.in or pymacconfig.h to make sure that PY_FORMAT_SIZE_T is overridden when building a binary that has a DEPLOYMENT_TARGET that is smaller than 10.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 12:31:20 2009 From: report at bugs.python.org (Zbyszek Szmek) Date: Thu, 02 Apr 2009 10:31:20 +0000 Subject: [issue5668] file "" on disk creates garbage output in stack trace In-Reply-To: <1238668280.27.0.69442728469.issue5668@psf.upfronthosting.co.za> Message-ID: <1238668280.27.0.69442728469.issue5668@psf.upfronthosting.co.za> New submission from Zbyszek Szmek : When running interactively, python checks for existence of file "" when trying to display a stack trace with code input from stdin. # cat >> "" asdf asdf asdf # python Python 2.5.2 (r252:60911, Jun 25 2008, 17:58:32) [GCC 4.3.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> asdf Traceback (most recent call last): File "", line 1, in asdf asdf asdf NameError: name 'asdf' is not defined # strace -efile python ... open("", O_RDONLY) = -1 ENOENT (No such file or directory) open("", O_RDONLY) = -1 ENOENT (No such file or directory) open("/home13/zbyszek/pm/", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/python25.zip/", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib64/python2.5/", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib64/python2.5/plat-linux2/", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib64/python2.5/lib-tk/", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib64/python2.5/lib-dynload/", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib64/python2.5/site-packages/", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib64/python2.5/site-packages/Numeric/", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib64/python2.5/site-packages/PIL/", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib64/python2.5/site-packages/gtk-2.0/", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib64/python2.5/site-packages/wx-2.8-gtk2-unicode/", O_RDONLY) = -1 ENOENT (No such file or directory) This is exactly the same in python 2.4, 2.5 and 3.0. I haven't tested other versions. ---------- components: Interpreter Core messages: 85192 nosy: zbysz severity: normal status: open title: file "" on disk creates garbage output in stack trace versions: Python 2.4, Python 2.5, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 12:32:29 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 02 Apr 2009 10:32:29 +0000 Subject: [issue5269] OS X Installer: add options to specify universal build type and deployment target In-Reply-To: <1234687874.34.0.561795974463.issue5269@psf.upfronthosting.co.za> Message-ID: <1238668349.65.0.292601552729.issue5269@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Raymond: I had intended to assign the issue to myself but I obviously need more training with dropdown menu's (your name is just above mine in the assigned-to menu). ---------- assignee: -> ronaldoussoren nosy: -rhettinger status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 12:58:14 2009 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 02 Apr 2009 10:58:14 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1238669894.76.0.782484722027.issue4015@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file13577/executable.scripts.on.nt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 13:13:24 2009 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 02 Apr 2009 11:13:24 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1238670804.19.0.826417090411.issue4015@psf.upfronthosting.co.za> anatoly techtonik added the comment: I've updated the script to parse unlimited number of parameters on NT, to return %errorcode% and to fallback to default Python compiler. It is based on similar workarounds we've made for SCons in http://scons.tigris.org/source/browse/scons/branches/core/src/script/scons.bat?view=log If you look at the SCons .bat closely you'll notice the difference that it includes code to launch main application script directly from site-packages thus removing the requirement to have .py script in Scripts/ In my patch I use Template that has placeholders for product name, author and email. However, the actual data is not written and hints how to get it in place are still welcome. ---------- Added file: http://bugs.python.org/file13578/install_scripts.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 13:17:44 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Apr 2009 11:17:44 +0000 Subject: [issue5666] Py_BuildValue("c") should return bytes? In-Reply-To: <1238663094.93.0.570643835814.issue5666@psf.upfronthosting.co.za> Message-ID: <1238671064.13.0.0771044975788.issue5666@psf.upfronthosting.co.za> STINNER Victor added the comment: Let's try grep on py3k: grep 'Py_BuildValue("[^"]*c' $(find -name "*.c") Py_BuildValue("c") is used for: - mmap.read_byte() result - .getkey() result: this method returns also unicode string => your patch breaks getkey()! - array.__reduce__(): i don't understand if the patch breaks anything I think that curses and array should use "C" format, but... it doesn't exist for Py_BuildValue. It was maybe forgotten. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 13:31:33 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Apr 2009 11:31:33 +0000 Subject: [issue5666] Py_BuildValue("c") should return bytes? In-Reply-To: <1238663094.93.0.570643835814.issue5666@psf.upfronthosting.co.za> Message-ID: <1238671893.85.0.920823161252.issue5666@psf.upfronthosting.co.za> STINNER Victor added the comment: > "C" format, but... it doesn't exist for Py_BuildValue Ooops, it does exist but it looks that nobody uses it. It's also not documented :-( I wrote a new patch: - document "C" format for Py_BuildValue (fix also a typo) - use "C" format in array and _curses - (and leave ocean-city's changes unchanged) ---------- Added file: http://bugs.python.org/file13579/py3k_build_value-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 13:41:49 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Apr 2009 11:41:49 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1238672509.69.0.103121051572.issue5391@psf.upfronthosting.co.za> STINNER Victor added the comment: So .read_byte() gives a byte string of 1 byte, ok. Port from Python2 will be easier. The patch looks correct, thanks for updating it. We know have to wait for #5666 :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 13:59:06 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 02 Apr 2009 11:59:06 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1238673546.16.0.641325606914.issue5391@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Yes, you can do m.write_byte(b"a") but on the other hand you cannot do a = b"abc" m.write_byte(a[1]) instead you should do a = b"abc" m.write_byte(a[1:2]) This is trade off, though. I'll update "with getarg('b') version" to compare. ---------- Added file: http://bugs.python.org/file13580/py3k_mmap_bytes_cleanup_with_getarg_b.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 13:59:18 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 02 Apr 2009 11:59:18 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1238673558.5.0.725832928593.issue5391@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file13215/py3k_mmap_and_bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 14:36:43 2009 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 02 Apr 2009 12:36:43 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238675803.13.0.46679608307.issue2578@psf.upfronthosting.co.za> Nick Coghlan added the comment: Bikeshedding a bit - the 'assertGreaterEqual' and 'assertLessEqual' method names grate on me a little. My brain has to do a double take in order to correctly insert the implied 'Or'. This reaction is made worse when these two methods are juxtaposed with all the other "assert*Equal" methods like DictEqual, ListEqual, SetEqual etc. Would it be possible to lengthen these specific names to the more explicit "assertGreaterOrEqual" and "assertLessOrEqual"? Some really nice additions to the test module here! :) ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 15:48:04 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 02 Apr 2009 13:48:04 +0000 Subject: [issue1741130] struct.pack("I", "foo"); struct.pack("L", "foo") should fail Message-ID: <1238680084.61.0.721680674952.issue1741130@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> marketdickinson _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Thu Apr 2 16:03:33 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Thu, 02 Apr 2009 14:03:33 +0000 Subject: [issue5619] Pass MS CRT debug flags into subprocesses In-Reply-To: <1238665571.66.0.863081444621.issue5619@psf.upfronthosting.co.za> Message-ID: <49D4C595.5090603@v.loewis.de> Martin v. L?wis added the comment: > Since you object to a command line parameter, how about an environment > variable? PYTHONUNATTENDED could be used in the library startup to turn > off any conceivable dialogue boxes and would be passed on to child > processes. This could then also easily be added in the build slave > config script: sys.env[PYTHONUNATTENDED] = "1" That would work for me. I suppose test.bat would set this variable, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 16:17:24 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 02 Apr 2009 14:17:24 +0000 Subject: [issue5641] Local variables not freed when Exception raises in function called from cycle In-Reply-To: <1238575778.52.0.687578256719.issue5641@psf.upfronthosting.co.za> Message-ID: <1238681844.42.0.680794930924.issue5641@psf.upfronthosting.co.za> Georg Brandl added the comment: I know, but that object is kept alive by the frame object that is kept alive by the exception assigned to "e". ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 16:19:23 2009 From: report at bugs.python.org (R. David Murray) Date: Thu, 02 Apr 2009 14:19:23 +0000 Subject: [issue2625] mailbox.MH.get_message() treats result of get_sequences() as list of tuples In-Reply-To: <1208023131.05.0.0270197595247.issue2625@psf.upfronthosting.co.za> Message-ID: <1238681963.71.0.331579894209.issue2625@psf.upfronthosting.co.za> R. David Murray added the comment: Fixed in 71046. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 16:36:50 2009 From: report at bugs.python.org (Mitchell Model) Date: Thu, 02 Apr 2009 14:36:50 +0000 Subject: [issue5658] make html in doc fails because Makefile assigns python to PYTHON In-Reply-To: <1238641160.88.0.0483045491328.issue5658@psf.upfronthosting.co.za> Message-ID: Mitchell Model added the comment: It strikes me as an inconsistency because I wouldn't expect the build process to differ from Python 3.0 to 3.1 except for fixing bugs. A developer, or someone trying to keep up with the most recent versions, who had been successfiully making the html doc in a subversion copy of Python 3.0 and wanted to move over to Python 3.1 finds this surprise if the command python is bound to Python 3. I grant you that this is a lot of ifs, and a transitional issue if we're all going to call Python 3 python3. It might even be worth mentioning in the build instructions that "python" should be bound to a Python 2 executable, not Python 3, because a few things, such as make html in doc, use tools that haven't been updated. Not a big deal. Just fighting for the "Principle of Least Surprise", as in many of the documentation issues I've submitted. My GUI background showing. -- -- --- Mitchell ---------- Added file: http://bugs.python.org/file13581/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Re: [issue5658] make html in doc fails because Makefile as
It strikes me as an inconsistency because I wouldn't expect the build process to differ from Python 3.0 to 3.1 except for fixing bugs.  A developer, or someone trying to keep up with the most recent versions, who had been successfiully making the html doc in a subversion copy of Python 3.0 and wanted to move over to Python 3.1 finds this surprise if the command python is bound to Python 3. I grant you that this is a lot of ifs, and a transitional issue if we're all going to call Python 3 python3.

It might even be worth mentioning in the build instructions that "python" should be bound to a Python 2 executable, not Python 3, because a few things, such as make html in doc, use tools that haven't been updated.

Not a big deal. Just fighting for the "Principle of Least Surprise", as in many of  the documentation issues I've submitted. My GUI background showing.
--
--

        --- Mitchell
From report at bugs.python.org Thu Apr 2 16:52:42 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 02 Apr 2009 14:52:42 +0000 Subject: [issue5634] cPickle error in case of recursion limit In-Reply-To: <1238534752.39.0.574212792554.issue5634@psf.upfronthosting.co.za> Message-ID: <1238683962.14.0.708979961837.issue5634@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Georg, I think that your recent change in r71024 implements the same idea directly in PyErr_ExceptionMatches. Can you confirm this and close the issue? ---------- assignee: -> georg.brandl nosy: +amaury.forgeotdarc, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 17:03:06 2009 From: report at bugs.python.org (Jim Fulton) Date: Thu, 02 Apr 2009 15:03:06 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238684586.65.0.181916403445.issue1641@psf.upfronthosting.co.za> Jim Fulton added the comment: > Looking back, I think Zope and Medusa should have adopted and evolved > their own copy of asynchat a long time ago... This statement is puzzling. No big deal, but I'm curious why you say this. ---------- nosy: +j1m _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 17:03:51 2009 From: report at bugs.python.org (Jim Fulton) Date: Thu, 02 Apr 2009 15:03:51 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238684631.8.0.148210116463.issue1641@psf.upfronthosting.co.za> Jim Fulton added the comment: For the record, afaict, Zope wasn't broken by this. Supervisor isn't part of Zope. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 17:06:18 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 02 Apr 2009 15:06:18 +0000 Subject: [issue5658] make html in doc fails because Makefile assigns python to PYTHON In-Reply-To: <1238620194.29.0.802372876082.issue5658@psf.upfronthosting.co.za> Message-ID: <1238684778.17.0.154277779281.issue5658@psf.upfronthosting.co.za> Georg Brandl added the comment: Even Python 3.0 didn't install its built executable as "python". We just made that decision, which was done for Python 3.0 because it couldn't be considered stable, permanent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 17:09:09 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 02 Apr 2009 15:09:09 +0000 Subject: [issue5215] change value of local variable in debug In-Reply-To: <1234338182.69.0.0258607971835.issue5215@psf.upfronthosting.co.za> Message-ID: <1238684949.44.0.737096211107.issue5215@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r71006. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 17:11:58 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 02 Apr 2009 15:11:58 +0000 Subject: [issue3722] print followed by exception eats print with doctest In-Reply-To: <1220007253.68.0.614144600028.issue3722@psf.upfronthosting.co.za> Message-ID: <1238685118.35.0.67774887137.issue3722@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: -> low type: behavior -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 17:19:35 2009 From: report at bugs.python.org (Chris Withers) Date: Thu, 02 Apr 2009 15:19:35 +0000 Subject: [issue3722] print followed by exception eats print with doctest In-Reply-To: <1220007253.68.0.614144600028.issue3722@psf.upfronthosting.co.za> Message-ID: <1238685575.67.0.558300776426.issue3722@psf.upfronthosting.co.za> Chris Withers added the comment: Hey Georg, I agree with the priority, but I'm still not convinced this is just a feature request. The piece of documentation that Tim is referring to is a tiny footnote in the doctest docs, and, as I said previously, I'm not sure documenting a bug makes it any less of a bug.. ---------- versions: +Python 2.7, Python 3.1 -Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 17:23:30 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 15:23:30 +0000 Subject: [issue1590864] import deadlocks when using PyObjC threads Message-ID: <1238685810.17.0.941460552215.issue1590864@psf.upfronthosting.co.za> Brett Cannon added the comment: First, because os is such a common module that hiding some uncommon imports at the module level helps with startup costs. Second, this is not a bug as the code is not behaving in an improper manner. The import lock is doing what it is supposed to be doing and importing at the module level is still okay. You can open the issue again if you want, but I think this is not worth changing. ---------- assignee: brett.cannon -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 17:36:08 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 15:36:08 +0000 Subject: [issue5646] test_importlib fails for py3k on Windows In-Reply-To: <1238586905.79.0.515263062555.issue5646@psf.upfronthosting.co.za> Message-ID: <1238686568.53.0.523706056365.issue5646@psf.upfronthosting.co.za> Brett Cannon added the comment: Can you svn up and run them again? Some stuff has changed if you are running against 3.1a1. ---------- assignee: -> brett.cannon components: +Library (Lib) -Tests, Windows nosy: +brett.cannon priority: -> critical type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 18:03:14 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 16:03:14 +0000 Subject: [issue5646] test_importlib fails for py3k on Windows In-Reply-To: <1238586905.79.0.515263062555.issue5646@psf.upfronthosting.co.za> Message-ID: <1238688194.88.0.564121082543.issue5646@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks, Kristj?n, for the quick response. I will see if I can figure why the heck this is differing on Vista (almost all the code is platform-agnostic Python so this will be an "interesting" thing to try to fix). ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 18:05:28 2009 From: report at bugs.python.org (Tres Seaver) Date: Thu, 02 Apr 2009 16:05:28 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238688328.45.0.657250530545.issue1641@psf.upfronthosting.co.za> Tres Seaver added the comment: Sidnei da Silva had to put some "straddling" code in the Zope2 trunk to workaround the 2.6 changes to asyncore / asynchat: - http://svn.zope.org/Zope/?rev=91981&view=rev - http://svn.zope.org/Zope/?rev=92023&view=rev ---------- nosy: +tseaver _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 18:14:05 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Thu, 02 Apr 2009 16:14:05 +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: <1238688845.65.0.425680798741.issue2704@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: The issue of the cursor moving to the left of >>> in the shell is separate. See also #3851. The current action of the home key, released in 2.6, is from patch 1196903. @tjreedy, if in 2.6 you type >>> syzygy and hit home, the cursor moves to the left of the 's'. A second 'home' moves it to the left margin. Subsequent presses toggle the cursor between those two position. While the action in the shell could be special cased, I consider this to be cosmetic - and not only that, but moving to the left border is useful when you want to mark a shell region for copy/ paste. So "won't fix" is my response to that 'complaint'. Now back to the subject of this patch.... ---------- priority: -> normal versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 18:16:31 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Thu, 02 Apr 2009 16:16:31 +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: <1238688991.76.0.181730987665.issue2704@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: Why doesn't someone fix this comment widget?? It was like this on SF, too. Guess I've got to dive in at some point...second guessing the wrapping drives me nuts! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 18:27:55 2009 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 02 Apr 2009 16:27:55 +0000 Subject: [issue5604] imp.find_module() mixes UTF8 and MBCS In-Reply-To: <1238423201.33.0.732435229283.issue5604@psf.upfronthosting.co.za> Message-ID: <1238689675.41.0.504459527664.issue5604@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Martin, can you review latest patch and apply it if this one is correct. I want to start working on conversion import.c to use unicode strings (we spoke about Tuesday) this weekend. It will be nice if I will have synchronized svn before making new changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 18:40:02 2009 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 02 Apr 2009 16:40:02 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1238675803.13.0.46679608307.issue2578@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: > Nick Coghlan added the comment: > Bikeshedding a bit - the 'assertGreaterEqual' and 'assertLessEqual' > method names grate on me a little. My brain has to do a double take in > order to correctly insert the implied 'Or'. This reaction is made worse > when these two methods are juxtaposed with all the other "assert*Equal" > methods like DictEqual, ListEqual, SetEqual etc. > > Would it be possible to lengthen these specific names to the more > explicit "assertGreaterOrEqual" and "assertLessOrEqual"? No, please. Get used to it. Maybe it helps if you realize the parallel with '__ge__'? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 18:43:18 2009 From: report at bugs.python.org (George Sakkis) Date: Thu, 02 Apr 2009 16:43:18 +0000 Subject: [issue5669] Extra heap nlargest/nsmallest option for including ties In-Reply-To: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> Message-ID: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> New submission from George Sakkis : It would be useful in many cases if heapq.nlargest and heapq.nsmallest grew an optional boolean parameter, say `ties` (defaulting to False) that when True, it would return more than `n` items if there are ties. To illustrate: >>> s = [4,3,5,7,4,7,4,3] >>> for i in xrange(1,len(s)+1): print i,heapq.nsmallest(i,s) ... 1 [3] 2 [3, 3] 3 [3, 3, 4] 4 [3, 3, 4, 4] 5 [3, 3, 4, 4, 4] 6 [3, 3, 4, 4, 4, 5] 7 [3, 3, 4, 4, 4, 5, 7] 8 [3, 3, 4, 4, 4, 5, 7, 7] >>> for i in xrange(1,len(s)+1): print i,heapq.nsmallest(i,s) ... 1 [3, 3] 2 [3, 3] 3 [3, 3, 4, 4, 4] 4 [3, 3, 4, 4, 4] 5 [3, 3, 4, 4, 4] 6 [3, 3, 4, 4, 4, 5] 7 [3, 3, 4, 4, 4, 5, 7, 7] 8 [3, 3, 4, 4, 4, 5, 7, 7] ---------- components: Library (Lib) messages: 85222 nosy: gsakkis severity: normal status: open title: Extra heap nlargest/nsmallest option for including ties type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 18:45:03 2009 From: report at bugs.python.org (George Sakkis) Date: Thu, 02 Apr 2009 16:45:03 +0000 Subject: [issue5669] Extra heap nlargest/nsmallest option for including ties In-Reply-To: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> Message-ID: <1238690703.69.0.351292500325.issue5669@psf.upfronthosting.co.za> George Sakkis added the comment: The second call should of course be: >>> for i in xrange(1,len(s)+1): print i,heapq.nsmallest(i,s,ties=True) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 18:48:59 2009 From: report at bugs.python.org (George Sakkis) Date: Thu, 02 Apr 2009 16:48:59 +0000 Subject: [issue5669] Extra heapq nlargest/nsmallest option for including ties In-Reply-To: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> Message-ID: <1238690939.37.0.349055020877.issue5669@psf.upfronthosting.co.za> Changes by George Sakkis : ---------- title: Extra heap nlargest/nsmallest option for including ties -> Extra heapq nlargest/nsmallest option for including ties _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 18:49:53 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Apr 2009 16:49:53 +0000 Subject: [issue5669] Extra heapq nlargest/nsmallest option for including ties In-Reply-To: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> Message-ID: <1238690993.12.0.765140159965.issue5669@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 19:15:36 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Apr 2009 17:15:36 +0000 Subject: [issue5669] Extra heapq nlargest/nsmallest option for including ties In-Reply-To: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> Message-ID: <1238692536.78.0.940672569851.issue5669@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I haven't seen this come up before. Am curious about your use cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 19:16:03 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 02 Apr 2009 17:16:03 +0000 Subject: [issue3166] Make conversions from long to float correctly rounded. In-Reply-To: <1214082720.03.0.30402071522.issue3166@psf.upfronthosting.co.za> Message-ID: <1238692563.46.0.593570325648.issue3166@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch; applies cleanly to current trunk. No significant changes. Note that there's now a new reason to apply this patch: it ensures that the result of a long->float conversion is independent of whether we're using 30-bit digits or 15-bit digits for longs. One problem: if long->float conversions are correctly rounded, then int->float conversions should be correctly rounded as well. (And ideally, we should have float(int(n)) == float(long(n)) for any integer n.) This problem only affects 64-bit machines: on 32-bit machines, all integers are exactly representable as floats, and the C99 standard specifies that in that case the conversion should be exact. ---------- Added file: http://bugs.python.org/file13582/long_as_double4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 19:27:00 2009 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 02 Apr 2009 17:27:00 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1238684586.65.0.181916403445.issue1641@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: [Guido] >> Looking back, I think Zope and Medusa should have adopted and evolved >> their own copy of asynchat a long time ago... [Jim] > This statement is puzzling. ?No big deal, but I'm curious why you say > this. ISTR that Zope has or had significant monkeypatches to at least one of asyncore/asynchat. The resulting coupling between Zope and asyn* has meant that the de-facto API of asyn* was much more than the documented API. IMO that's a sign of a poorly designed API (in asyn*). If Zope had had its own copy of asyn* (under a different name of course) that relied only on lower-level APIs (sockets and select), it could have evolved that copy directly without the need for monkeypatching. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 19:36:46 2009 From: report at bugs.python.org (Mitchell Model) Date: Thu, 02 Apr 2009 17:36:46 +0000 Subject: [issue5658] make html in doc fails because Makefile assigns python to PYTHON In-Reply-To: <1238684778.17.0.154277779281.issue5658@psf.upfronthosting.co.za> Message-ID: Mitchell Model added the comment: OK -- -- --- Mitchell ---------- Added file: http://bugs.python.org/file13583/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Re: [issue5658] make html in doc fails because Makefile as
OK
--
--

        --- Mitchell
From report at bugs.python.org Thu Apr 2 19:40:13 2009 From: report at bugs.python.org (Jim Fulton) Date: Thu, 02 Apr 2009 17:40:13 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: Message-ID: <5D447C92-FEFA-41AF-8B0D-448E647AF9E8@zope.com> Jim Fulton added the comment: On Apr 2, 2009, at 1:27 PM, Guido van Rossum wrote: > > Guido van Rossum added the comment: > > [Guido] >>> Looking back, I think Zope and Medusa should have adopted and >>> evolved >>> their own copy of asynchat a long time ago... > > [Jim] >> This statement is puzzling. No big deal, but I'm curious why you say >> this. > > ISTR that Zope has or had significant monkeypatches to at least one of > asyncore/asynchat. Not that I'm aware of. I did add the ability to pass in alternative map objects, which is the only change we needed that I'm aware of. I think I made that change before or soon after asyncore was added to the standard library. > The resulting coupling between Zope and asyn* has > meant that the de-facto API of asyn* was much more than the documented > API. If we were monkey patching it, it would be at our own risk, which is why we'd copy the module if we needed to. That has its own problems of course. I rue the day I forked doctest. :( > IMO that's a sign of a poorly designed API (in asyn*). If Zope > had had its own copy of asyn* (under a different name of course) that > relied only on lower-level APIs (sockets and select), it could have > evolved that copy directly without the need for monkeypatching. I've read a good argument that subclassing across implementation packages is a bad idea. If a framework offers features through subclassing, it should define the subclassing interface very carefully, which asyncore doesn't. Jim ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 19:55:27 2009 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 02 Apr 2009 17:55:27 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1238626930.63.0.618944711325.issue4847@psf.upfronthosting.co.za> Message-ID: <18900.64521.455016.305184@montanaro.dyndns.org> Skip Montanaro added the comment: David> I've added some unit tests for embedded newlines, and py3k csv David> passes (on linux at least) when newline='' is used. Unless David> someone can provide a test case that fails when newline='' is David> used, I propose we fix the documentation and leave the code David> alone. This thread is getting a bit long. Can someone summarize how the expected usage of the csv module is supposed to change? If I read things correctly, instead of requiring (in the general case) that csv files be opened in binary mode, the requirement will be that they be opened with newline=''. This will thwart any attempts by the io module at newline translation, but since the file is still opened in text mode its contents will implicitly be Unicode (or Unicode translated to bytes with a specific encoding). That encoding will also be specified in the call to open(). Is this about correct? Do any test cases need to be updated or added? I notice that something called BytesIO is imported from io but not used. Were some test cases removed which used to involve that class or is that a 2to3 artifact? Skip ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 19:56:58 2009 From: report at bugs.python.org (George Sakkis) Date: Thu, 02 Apr 2009 17:56:58 +0000 Subject: [issue5669] Extra heapq nlargest/nsmallest option for including ties In-Reply-To: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> Message-ID: <1238695018.77.0.0768716193162.issue5669@psf.upfronthosting.co.za> George Sakkis added the comment: There's nothing special about my use cases; I'd even go as far as to suggest that this is more often than not the desired behavior in general. Say that you have to select the top 3 chess players and there are two players with equal Elo rating at positions 3 and 4. Whom do you select? Without a tie-breaking method, it's only fair to select both and return 4 players in total instead of exactly 3. The current method selects "arbitrarily" (at least with respect to the key function) which of the equally-keyed items to return. This is necessary in some cases by external constraints (say, you can hire only 1 person) but there are quite a few cases that "fairness" is more important than a hard constraint on the number of returned objects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 20:06:05 2009 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Apr 2009 18:06:05 +0000 Subject: [issue5646] test_importlib fails for py3k on Windows In-Reply-To: <1238586905.79.0.515263062555.issue5646@psf.upfronthosting.co.za> Message-ID: <1238695565.72.0.734968396605.issue5646@psf.upfronthosting.co.za> Brett Cannon added the comment: I committed a fix in r71057 where instead of hard-coding the paths I moved over to os.path.join(). Let me know if that fixes it. As for the deletion hole that Vista has, it could be added to test.test_support.unlink(), but talking here at PyCon it sounds like it might be up to 15 seconds which is way too long to wait for a file deletion to complete. Might need to create a context manager that creates unique files every time. But all of this should be covered in another issue. ---------- stage: test needed -> commit review status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 20:23:57 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Apr 2009 18:23:57 +0000 Subject: [issue5669] Extra heapq nlargest/nsmallest option for including ties In-Reply-To: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> Message-ID: <1238696637.88.0.0906203298433.issue5669@psf.upfronthosting.co.za> Raymond Hettinger added the comment: In that case, I think it best to leave nsmallest/nlargest as-is. By appending ties to the result, it becomes harder to implement policy decisions on what to do with those ties (perhaps listing them separately or splitting their prizes n-ways). A preferred approach is to use existing tools such as: last=result[1]; [last]*s.count(last). Alternatively, result=sorted(s) works well with bisect to find the cut points. Also, my instincts say that it is weird ask for n-items and get a result with potentially more than n. Looking at the source code for nsmallest/nlargest, I think this build-out would complicate the code quite a bit, so the use cases would need to be more compelling. The way the nsmallest/nlargest work is that they maintain an n-length buffer and loop over the entire input while remembering only the best-n-so-far. That approach doesn't easily extend to tracking best-n-so-far-and-all-ties. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 20:24:55 2009 From: report at bugs.python.org (Tres Seaver) Date: Thu, 02 Apr 2009 18:24:55 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: Message-ID: <49D502EB.20405@agendaless.com> Tres Seaver added the comment: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Guido van Rossum wrote: > ISTR that Zope has or had significant monkeypatches to at least one of > asyncore/asynchat. The resulting coupling between Zope and asyn* has > meant that the de-facto API of asyn* was much more than the documented > API. IMO that's a sign of a poorly designed API (in asyn*). If Zope > had had its own copy of asyn* (under a different name of course) that > relied only on lower-level APIs (sockets and select), it could have > evolved that copy directly without the need for monkeypatching. Zope does not monkeypatch asyncore or asynchat, and hasn't since at least Zope 2.5 (the oldest checkout I have, first released 2002-01-25). Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver at agendaless.com Agendaless Consulting http://agendaless.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJ1QLqFXKVXuSL+CMRAhelAJ9yYgo1RXUhWR2cH8CjYRoXz/qsvACgg13O BFAiRoYP8AWVgQVWBhVhB+4= =wj2y -----END PGP SIGNATURE----- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 20:29:52 2009 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 02 Apr 2009 18:29:52 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1238642596.17.0.713947865855.issue4847@psf.upfronthosting.co.za> Message-ID: <18901.1051.304548.88486@montanaro.dyndns.org> Skip Montanaro added the comment: David> I also deleted the unicode discussion (since CSV obviously David> handles unicode now) ... Maybe there should be a simple example showing use of the encoding parameter to open() to encode Unicode on write and decode to Unicode on read? Skip ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 20:30:43 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Apr 2009 18:30:43 +0000 Subject: [issue5669] Extra heapq nlargest/nsmallest option for including ties In-Reply-To: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> Message-ID: <1238697043.07.0.787703198635.issue5669@psf.upfronthosting.co.za> Raymond Hettinger added the comment: That should have been: last = result[-1]; [last]*s.count(last). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 20:31:58 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 02 Apr 2009 18:31:58 +0000 Subject: [issue3851] IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered. In-Reply-To: <1221250835.7.0.322524713176.issue3851@psf.upfronthosting.co.za> Message-ID: <1238697118.5.0.69395508602.issue3851@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As reported in a comment for #2704, the Home key misbehaves on WinXP for 3.0.1. The 2.6 fix was either not forward ported or otherwise disabled. I removed 2.5 since that is now on security fix only status. ---------- nosy: +kbk versions: +Python 3.0, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 20:36:47 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 02 Apr 2009 18:36:47 +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: <1238697407.87.0.0567507944825.issue2704@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Kurt, do not type hard returns except at the end of code lines and paragraphs. As I said in my previous comment, the HOME key works as I said both in 2.5 AND in 3.0 (and still in 3.0.1). If it was fixed in 2.6, fine, but that fix was either not forward ported to 3.0 or was otherwise disabled. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 20:41:48 2009 From: report at bugs.python.org (R David Murray) Date: Thu, 02 Apr 2009 18:41:48 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <18900.64521.455016.305184@montanaro.dyndns.org> Message-ID: R David Murray added the comment: On Thu, 2 Apr 2009 at 17:55, Skip Montanaro wrote: > This thread is getting a bit long. Can someone summarize how the expected > usage of the csv module is supposed to change? If I read things correctly, > instead of requiring (in the general case) that csv files be opened in > binary mode, the requirement will be that they be opened with newline=''. > This will thwart any attempts by the io module at newline translation, but > since the file is still opened in text mode its contents will implicitly be > Unicode (or Unicode translated to bytes with a specific encoding). That > encoding will also be specified in the call to open(). I believe that is an accurate summary. > Is this about correct? Do any test cases need to be updated or added? I > notice that something called BytesIO is imported from io but not used. Were > some test cases removed which used to involve that class or is that a 2to3 > artifact? I will look in to this, and add an encoding example to the docs as you suggest in another email. --David ---------- nosy: +r.david.murray-old _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 20:53:51 2009 From: report at bugs.python.org (Collin Winter) Date: Thu, 02 Apr 2009 18:53:51 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> New submission from Collin Winter : The attached patch adds another version of cPickle.c's batch_dict(), batch_dict_exact(), which is specialized for "type(x) is dict". This provides a nice performance boost when pickling objects that use dictionaries: Pickle: Min: 2.216 -> 1.858: 19.24% faster Avg: 2.238 -> 1.889: 18.50% faster Significant (t=106.874099, a=0.95) Benchmark is at http://code.google.com/p/unladen-swallow/source/browse/tests/performance/macro_pickle.py (driver is ../perf.py; perf.py was run with "--rigorous -b pickle"). This patch passes all the tests added in issue 5665. I would recommend reviewing that patch first. I'll port to py3k once this is reviewed for trunk. ---------- components: Extension Modules files: cpickle_dict.patch keywords: needs review, patch messages: 85239 nosy: collinwinter severity: normal status: open title: Speed up pickling of dicts in cPickle type: performance versions: Python 2.7 Added file: http://bugs.python.org/file13584/cpickle_dict.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 20:54:24 2009 From: report at bugs.python.org (Kuno) Date: Thu, 02 Apr 2009 18:54:24 +0000 Subject: [issue5659] logging.FileHandler encoding parameter does not work as expected In-Reply-To: <1238626245.67.0.948477208489.issue5659@psf.upfronthosting.co.za> Message-ID: <1238698464.26.0.96540642451.issue5659@psf.upfronthosting.co.za> Kuno added the comment: Ah! Good to know that it has been fixed already. Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:01:26 2009 From: report at bugs.python.org (George Sakkis) Date: Thu, 02 Apr 2009 19:01:26 +0000 Subject: [issue5669] Extra heapq nlargest/nsmallest option for including ties In-Reply-To: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> Message-ID: <1238698886.92.0.914273664873.issue5669@psf.upfronthosting.co.za> George Sakkis added the comment: > In that case, I think it best to leave nsmallest/nlargest as-is. By > appending ties to the result, it becomes harder to implement policy > decisions on what to do with those ties (perhaps listing them separately > or splitting their prizes n-ways). I wouldn't worry about the further post-processing too much; it's optional and up to the client to implement if necessary (in my current use case it's not). Regardless, that's orthogonal to having a general, reliable and efficient function in the standard library that reduces an initial sequence of thousands/millions down to a dozen or two, preserving the ties. > A preferred approach is to use > existing tools such as: last=result[1]; [last]*s.count(last). > Alternatively, result=sorted(s) works well with bisect to find the cut > points. Also, my instincts say that it is weird ask for n-items and get > a result with potentially more than n. That's a documentation issue, it would be explicitly addressed in the description of `ties`. I'm not proposing to change the current default behavior; the whole change would be fully backwards compatible. > Looking at the source code for nsmallest/nlargest, I think this > build-out would complicate the code quite a bit, so the use cases would > need to be more compelling. The way the nsmallest/nlargest work is that > they maintain an n-length buffer and loop over the entire input while > remembering only the best-n-so-far. That approach doesn't easily extend > to tracking best-n-so-far-and-all-ties. I haven't thought about the implementation yet but before I do, would a patch help reopen this ticket ? If so, I'm willing to take a stab at it. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:02:20 2009 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 02 Apr 2009 19:02:20 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1238675803.13.0.46679608307.issue2578@psf.upfronthosting.co.za> Message-ID: <18901.2999.982661.621485@montanaro.dyndns.org> Skip Montanaro added the comment: Am I the only person who wishes all the assert* and fail* methods would simply go away in favor of simply using the assert statement? Skip ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:07:28 2009 From: report at bugs.python.org (Michael Foord) Date: Thu, 02 Apr 2009 19:07:28 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238699248.44.0.737679457678.issue2578@psf.upfronthosting.co.za> Michael Foord added the comment: Why do you need the assert methods to go away in order to use assert statements? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:07:54 2009 From: report at bugs.python.org (George Sakkis) Date: Thu, 02 Apr 2009 19:07:54 +0000 Subject: [issue5669] Extra heapq nlargest/nsmallest option for including ties In-Reply-To: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> Message-ID: <1238699274.47.0.00375187163455.issue5669@psf.upfronthosting.co.za> George Sakkis added the comment: > That should have been: last = result[-1]; [last]*s.count(last). Nice, though that's not equivalent if the objects' identity is significant for what happens next (which typically is the case when ties are preserved). The sorted/bisect solution doesn't have this problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:10:12 2009 From: report at bugs.python.org (George Sakkis) Date: Thu, 02 Apr 2009 19:10:12 +0000 Subject: [issue5669] Extra heapq nlargest/nsmallest option for including ties In-Reply-To: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> Message-ID: <1238699412.82.0.914969066532.issue5669@psf.upfronthosting.co.za> Changes by George Sakkis : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:14:37 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 02 Apr 2009 19:14:37 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238699677.95.0.557963997076.issue5670@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Without taking a very detailed look, the patch looks good. Are there already tests for pickling of dict subclasses? Otherwise, they should be added. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:15:32 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Apr 2009 19:15:32 +0000 Subject: [issue5669] Extra heapq nlargest/nsmallest option for including ties In-Reply-To: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> Message-ID: <1238699732.39.0.97026490058.issue5669@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I recommend posting an ASPN recipe. That's what I do with a lot of ideas that are under development or that don't clear the bar for going into the standard library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:18:45 2009 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 02 Apr 2009 19:18:45 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1238699248.44.0.737679457678.issue2578@psf.upfronthosting.co.za> Message-ID: <18901.3985.823112.130299@montanaro.dyndns.org> Skip Montanaro added the comment: Michael> Why do you need the assert methods to go away in order to use Michael> assert statements? You don't, but use of assert statements seems a hell of a lot more Pythonic to me than all the assert* or fail* method names which I can never remember. S ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:20:21 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 02 Apr 2009 19:20:21 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238700021.86.0.0511171499957.issue5670@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, could the same approach be applied to lists and sets as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:22:44 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 02 Apr 2009 19:22:44 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <18901.3985.823112.130299@montanaro.dyndns.org> Message-ID: <1238700249.8858.33.camel@fsol> Antoine Pitrou added the comment: > You don't, but use of assert statements seems a hell of a lot more Pythonic > to me than all the assert* or fail* method names which I can never remember. Two problems: 1. they are optimized away in "-Oxxx" mode 2. they don't provide good reporting in case of failure ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:28:17 2009 From: report at bugs.python.org (Collin Winter) Date: Thu, 02 Apr 2009 19:28:17 +0000 Subject: [issue5671] Speed up pickling of lists in cPickle In-Reply-To: <1238700497.01.0.638889592432.issue5671@psf.upfronthosting.co.za> Message-ID: <1238700497.01.0.638889592432.issue5671@psf.upfronthosting.co.za> New submission from Collin Winter : The attached patch adds another version of cPickle.c's batch_list(), batch_list_exact(), which is specialized for "type(x) is list". This provides a nice performance boost when pickling objects that use lists. This is similar to the approach taken in issue 5670, though the performance boost on our benchmark is smaller: Pickle: Min: 2.231 -> 2.200: 1.39% faster Avg: 2.266 -> 2.227: 1.72% faster Significant (t=10.994064, a=0.95) Benchmark is at http://code.google.com/p/unladen-swallow/source/browse/tests/performance/macro_pickle.py (driver is ../perf.py; perf.py was run with "--rigorous -b pickle"). Workloads involving more lists will benefit more. This patch passes all the tests added in issue 5665. I would recommend reviewing that patch first. I'll port to py3k once this is reviewed for trunk. ---------- components: Extension Modules files: cpickle_list.patch keywords: needs review, patch messages: 85250 nosy: collinwinter severity: normal status: open title: Speed up pickling of lists in cPickle type: performance versions: Python 2.7 Added file: http://bugs.python.org/file13585/cpickle_list.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:35:10 2009 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 Apr 2009 19:35:10 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1197908693.3.0.330108725692.issue1641@psf.upfronthosting.co.za> Message-ID: <1238700910.13.0.460809917496.issue1641@psf.upfronthosting.co.za> Josiah Carlson added the comment: I'm not defending the documentation, I'm merely reposting it. The documentation for asyncore says, "The full set of methods that can be overridden in your subclass follows:" The documentation for asynchat says, "To make practical use of the code you must subclass async_chat, providing meaningful collect_incoming_data() and found_terminator() methods. The asyncore.dispatcher methods can be used, although not all make sense in a message/response context." How can we make the documentation better? I'm too close to the documentation to really know how to improve it. Ideas? ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Marcelo_Fern=C3=A1ndez_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Thu Apr 2 21:38:05 2009 From: =?utf-8?q?Marcelo_Fern=C3=A1ndez_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Marcelo_Fern=C3=A1ndez_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Thu, 02 Apr 2009 19:38:05 +0000 Subject: [issue5672] Implement a way to change the python process name In-Reply-To: <1238701084.1.0.0781987214897.issue5672@psf.upfronthosting.co.za> Message-ID: <1238701084.1.0.0781987214897.issue5672@psf.upfronthosting.co.za> New submission from Marcelo Fern?ndez : As python gains more popularity, more and more applications run under CPython in a common user desktop. The problem is that if a user has 2 or more python apps running there is no way to identify them correctly from the generic "Task/Process Manager Application" (in Windows/Linux/OSX/any OS), because all appear as a "python" process. Take Ubuntu for an example. There are more cases when this is annoying: - Imagine two python process (doing different things, of course) sending messages to syslog: looks like all coming from "python" process. - A bash script which wants to "killall" one application: how can it identify a given python script between two or more "python" processes? There are some methods [1][2] to work around it, but there are not just Linux/BSD only, moreover, there are not included in the python standard modules. [1] http://davyd.livejournal.com/166352.html [2] http://code.google.com/p/procname/ I hope this issue gets considered in the community to fix it, I really think this is important... :-) Regards, Marcelo ---------- components: Extension Modules messages: 85252 nosy: marcelo_fernandez severity: normal status: open title: Implement a way to change the python process name type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:39:49 2009 From: report at bugs.python.org (Collin Winter) Date: Thu, 02 Apr 2009 19:39:49 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238700021.86.0.0511171499957.issue5670@psf.upfronthosting.co.za> Message-ID: <43aa6ff70904021239g7bfa0a26t98286eb4732810e6@mail.gmail.com> Collin Winter added the comment: On Thu, Apr 2, 2009 at 12:20 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > By the way, could the same approach be applied to lists and sets as well? Certainly; see http://bugs.python.org/issue5671 for the list version. It doesn't make as big an impact on the benchmark, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:40:41 2009 From: report at bugs.python.org (Tony Nelson) Date: Thu, 02 Apr 2009 19:40:41 +0000 Subject: [issue1555570] email parser incorrectly breaks headers with a CRLF at 8192 Message-ID: <1238701241.79.0.548698537178.issue1555570@psf.upfronthosting.co.za> Tony Nelson added the comment: The OP's diagnosis of a buffer boundary problem is correct, but incomplete. The problem can be reproduced by calling feedparser FeedParser.feed() directly, or as my patch test does, by calling BufferedSubFile.push() directly. The proper fix is for push() to treat a last line ending in CR as a partial line, as it does if no part of a line ending is present. The OP's patch only works when FeedParser is called through the old Parser interface. ---------- nosy: +tony_nelson Added file: http://bugs.python.org/file13586/feedparser_pushcr_pushlf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:41:01 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Apr 2009 19:41:01 +0000 Subject: [issue5669] Extra heapq nlargest/nsmallest option for including ties In-Reply-To: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> Message-ID: <1238701261.01.0.331683800754.issue5669@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, an easy way to pare down millions of entries to dozens is to use a bigger heap: from heapq import nsmallest def nsmallest_with_ties(n, iterable, scale=2): ext = n * scale s = nsmallest(ext, iterable) lastplace = s[n-1] if s[-1] == lastplace: raise ValueError('may not have found all ties') for i in range(n, ext): if s[i] != lastplace: break return s[:i] n = 3 s = [4,3,5,7,4,7,4,3] print nsmallest_with_ties(3, s) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:41:16 2009 From: report at bugs.python.org (Reid Kleckner) Date: Thu, 02 Apr 2009 19:41:16 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> New submission from Reid Kleckner : I was looking for a way to run a subprocess with a timeout. While there are a variety of solutions on Google, I feel like this functionality should live in the standard library module. Apparently Guido thought this would be good in 2005 but no one did it: http://mail.python.org/pipermail/python-dev/2005-December/058784.html I'd be willing to implement it, but I'm not a core dev and I'd need someone to review it. I'll start working on a patch now, and if people think this is a good idea I'll submit it for review. My plan was to add a 'timeout' optional keyword argument to wait() and propagate that backwards through communicate(), call(), and check_call(). Does anyone object to this approach? ---------- components: Library (Lib) messages: 85256 nosy: rnk severity: normal status: open title: Add timeout option to subprocess.Popen type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:44:45 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 02 Apr 2009 19:44:45 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <43aa6ff70904021239g7bfa0a26t98286eb4732810e6@mail.gmail.com> Message-ID: <1238701570.8858.36.camel@fsol> Antoine Pitrou added the comment: > Certainly; see http://bugs.python.org/issue5671 for the list version. > It doesn't make as big an impact on the benchmark, though. How about splitting the benchmark in parts: - (un)pickling lists - (un)pickling dicts - (un)pickling sets (etc.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:57:40 2009 From: report at bugs.python.org (Jim Fulton) Date: Thu, 02 Apr 2009 19:57:40 +0000 Subject: [issue1641] asyncore delayed calls feature In-Reply-To: <1238700910.13.0.460809917496.issue1641@psf.upfronthosting.co.za> Message-ID: Jim Fulton added the comment: On Apr 2, 2009, at 3:35 PM, Josiah Carlson wrote: > > Josiah Carlson added the > comment: > > I'm not defending the documentation, I'm merely reposting it. > > The documentation for asyncore says, "The full set of methods that can > be overridden in your subclass follows:" > > The documentation for asynchat says, "To make practical use of the > code > you must subclass async_chat, providing meaningful > collect_incoming_data() and found_terminator() methods. The > asyncore.dispatcher methods can be used, although not all make sense > in > a message/response context." > > How can we make the documentation better? I'm too close to the > documentation to really know how to improve it. Ideas? Actually, the documentation is better than I remember it to be. The problem is that subclassing is a much more intimate interface between components that a call interface. In the case of asyncore, the methods being overridden have non-trivial default implementations. Overriding methods often entails studying the base-class code to get an idea how it should be done. The subclassing interface for asynchat appears to be much cleaner, but even then, you need to study the base class code to make sure you haven't accidentally overridden any base class attributes. I wish classes that exposed subclassing interfaces were more careful with their internal names. Jim ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 21:58:01 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 02 Apr 2009 19:58:01 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1238702281.32.0.21111181005.issue5673@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 22:02:42 2009 From: report at bugs.python.org (Larry Hastings) Date: Thu, 02 Apr 2009 20:02:42 +0000 Subject: [issue5630] Update CObject API so it is safe and regular In-Reply-To: <1238526469.89.0.691687509266.issue5630@psf.upfronthosting.co.za> Message-ID: <1238702562.05.0.277727872881.issue5630@psf.upfronthosting.co.za> Larry Hastings added the comment: Having slept on it, I agree that we only need one API to create an object. Since passing in a "context" will be relatively rare, users who need that can use PyCObject_SetContext(). I'll remove PyCObject_FromVoidPtrWithContext() in my next patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 22:09:47 2009 From: report at bugs.python.org (George Sakkis) Date: Thu, 02 Apr 2009 20:09:47 +0000 Subject: [issue5669] Extra heapq nlargest/nsmallest option for including ties In-Reply-To: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> Message-ID: <1238702987.17.0.484049275698.issue5669@psf.upfronthosting.co.za> George Sakkis added the comment: > I recommend posting an ASPN recipe. That's what I do with a lot of > ideas that are under development or that don't clear the bar for going > into the standard library. Will do. Thanks for the quick turnaround! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 22:14:14 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Apr 2009 20:14:14 +0000 Subject: [issue5669] Extra heapq nlargest/nsmallest option for including ties In-Reply-To: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> Message-ID: <1238703254.43.0.146790030227.issue5669@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Here's a test case for your recipe dataset = [9] * 1000000 + [0,1,2,3,4,5,6,8] for i in range(1, 20): print nsmallest(i, dataset, ties=True) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 22:20:20 2009 From: report at bugs.python.org (Maru Newby) Date: Thu, 02 Apr 2009 20:20:20 +0000 Subject: [issue5142] pdb feature request: Ability to skip standard lib modules and other selected packages/modules In-Reply-To: <1233669109.05.0.519121201366.issue5142@psf.upfronthosting.co.za> Message-ID: <1238703620.43.0.962678966033.issue5142@psf.upfronthosting.co.za> Maru Newby added the comment: Added a skip keyword argument to Bdb and Pdb class constructors to allow skipping of modules based on a list of glob-style matches (see fnmatch), as per the following example: import pdb;Pdb(skip=['django.command*']).set_trace() ---------- keywords: +patch nosy: +maru Added file: http://bugs.python.org/file13587/pdb_skip_modules.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 22:29:28 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Apr 2009 20:29:28 +0000 Subject: [issue5671] Speed up pickling of lists in cPickle In-Reply-To: <1238700497.01.0.638889592432.issue5671@psf.upfronthosting.co.za> Message-ID: <1238704168.36.0.568838787709.issue5671@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Out of curiousity, are you also benchmarking against marshal and json? ISTM, that there is always one of them that will be the fastest and that the others should mimic that approach. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 22:31:31 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 02 Apr 2009 20:31:31 +0000 Subject: [issue5664] 2to3 wont convert Cookie.Cookie properly In-Reply-To: <1238642568.2.0.229238012255.issue5664@psf.upfronthosting.co.za> Message-ID: <1afaf6160904021331o46eb640es298ae87fc53510a5@mail.gmail.com> Benjamin Peterson added the comment: 2009/4/1 Senthil : > > New submission from Senthil : > > In 2.7 code have: > import Cookie > c = Cookie.Cookie('abc') > > 2to3 would do: > c = http.cookies.Cookie('abc') > > This is wrong as there is no class as Cookie in http.cookies. It should > translated to be http.cookies.SimpleCookie. That's unfortunate. I suppose a new custom fixer will have to be written for Cookie now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 22:35:31 2009 From: report at bugs.python.org (Collin Winter) Date: Thu, 02 Apr 2009 20:35:31 +0000 Subject: [issue5671] Speed up pickling of lists in cPickle In-Reply-To: <1238700497.01.0.638889592432.issue5671@psf.upfronthosting.co.za> Message-ID: <1238704531.82.0.944385994466.issue5671@psf.upfronthosting.co.za> Collin Winter added the comment: No, we haven't started looking at other serialization formats yet. Marshal will probably be my next target, with json being a lower priority. There were enough instances of low-hanging fruit in cPickle that I didn't go looking at the other implementations for ideas. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 22:41:49 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 02 Apr 2009 20:41:49 +0000 Subject: [issue5672] Implement a way to change the python process name In-Reply-To: <1238701084.1.0.0781987214897.issue5672@psf.upfronthosting.co.za> Message-ID: <1238704909.05.0.880292262117.issue5672@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 22:49:01 2009 From: report at bugs.python.org (Reid Kleckner) Date: Thu, 02 Apr 2009 20:49:01 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1238705341.32.0.114796377393.issue5673@psf.upfronthosting.co.za> Reid Kleckner added the comment: Ugh. I made the assumption that there must be some natural and easy way to wait for a child process with a timeout in C, and it turns out it's actually a hard problem, which is why this isn't already implemented. So my initial hack for solving this problem in my own project was to run the subprocess, spawn a thread to wait on it, and then use the thread's wait method, which does accept a timeout. On further inspection, it turns out that Thread.wait() actually uses a busy loop to implement the timeout, which is what I was trying to avoid. If it's okay to have a busy loop there, is it okay to have one in Popen.wait()? Obviously, you don't need to busy loop if there is no timeout. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 23:21:32 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 02 Apr 2009 21:21:32 +0000 Subject: [issue2396] Backport memoryview object to Python 2.7 In-Reply-To: <1205856163.49.0.847674946563.issue2396@psf.upfronthosting.co.za> Message-ID: <1238707292.82.0.262215924385.issue2396@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r71070. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 23:22:36 2009 From: report at bugs.python.org (Jim Garrison) Date: Thu, 02 Apr 2009 21:22:36 +0000 Subject: [issue5674] distutils fails to find Linux libs (lib.....so.n) In-Reply-To: <1238707356.06.0.784964091736.issue5674@psf.upfronthosting.co.za> Message-ID: <1238707356.06.0.784964091736.issue5674@psf.upfronthosting.co.za> New submission from Jim Garrison : Trying to build 3.1a1 on Fedora 9, the following extensions get skipped even though the requisite packages are installed _dbm _gdbm _hashlib _sqlite3 _ssl bz2 readline zlib After looking at the code in distutils I *think* the problem is because setup.py isn't coping with library filenames such as "libreadline.so.5" and "libgdm.so.2" (with the .n) second extension. It looks like ccompiler.py#library_filename() just appends the extension, which is .so for unix, and then unixccompiler.py#find_library_file() does a simple os.path.exists() on the name, not allowing for the additional numeric extension. Note that some library filenames in Linux have two or even three such extensions, as in libreadline.so.5.2, and some extensions are not all-numeric, as in libssl.so.0.9.8g. ---------- assignee: tarek components: Distutils messages: 85268 nosy: jgarrison, tarek severity: normal status: open title: distutils fails to find Linux libs (lib.....so.n) type: compile error versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 23:27:05 2009 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 02 Apr 2009 21:27:05 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238707625.13.0.86624865693.issue2578@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks Guido - the __ge__/__le__ parallel does actually help me remember the current names. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 23:46:05 2009 From: report at bugs.python.org (Senthil) Date: Thu, 02 Apr 2009 21:46:05 +0000 Subject: [issue3609] does parse_header really belong in CGI module? In-Reply-To: <1219193477.24.0.768590998992.issue3609@psf.upfronthosting.co.za> Message-ID: <1238708765.18.0.659138371932.issue3609@psf.upfronthosting.co.za> Senthil added the comment: The attached patch takes care of relocating the parse_header function from cgi module to email.header module in Python2.7. Few comments: 1)parse_multipart need not be moved from cgi, because it is discouraged to use parse_multipart and it is advised to use FieldStorage class methods which does the same thing. 2)Should the relocation happen in Python 2.7 as well as in Python 3K or only in Python 3k? ( The patch is for Python 2.7, but can be ported to Python 3k). 4) If changes happen in Python 2.7, then cgi.parse_header will have DeprecationWarning just in case we go for more versions in Python 2.x series. 5)Does anyone have any concerns with this change? I plan to ask at Python-Dev as well? ---------- assignee: -> orsenthil keywords: +patch Added file: http://bugs.python.org/file13588/issue3609-py27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 23:51:14 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 02 Apr 2009 21:51:14 +0000 Subject: [issue5672] Implement a way to change the python process name In-Reply-To: <1238701084.1.0.0781987214897.issue5672@psf.upfronthosting.co.za> Message-ID: <1238709074.89.0.54384485593.issue5672@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 23:56:55 2009 From: report at bugs.python.org (acummings) Date: Thu, 02 Apr 2009 21:56:55 +0000 Subject: [issue5582] Incorrect DST transition on Windows In-Reply-To: <1238196218.64.0.426344630758.issue5582@psf.upfronthosting.co.za> Message-ID: <1238709415.59.0.537654538251.issue5582@psf.upfronthosting.co.za> Changes by acummings : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 2 23:58:17 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 02 Apr 2009 21:58:17 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1238709497.82.0.551035578137.issue5665@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 00:09:20 2009 From: report at bugs.python.org (Tony Nelson) Date: Thu, 02 Apr 2009 22:09:20 +0000 Subject: [issue3169] email/header.py doesn't handle Base64 headers that have been insufficiently padded. In-Reply-To: <1214092738.57.0.399756790289.issue3169@psf.upfronthosting.co.za> Message-ID: <1238710160.71.0.717531186307.issue3169@psf.upfronthosting.co.za> Tony Nelson added the comment: Postel's law suggests that, as bad padding can be repaired, decode_header ought to do so. The patch does that, adds a test for it, and alters another test to still properly fail on really bad encoded data. The test doesn't check a single character encoded string, as such does not specify a complete octet and I felt that base64 decoders might reasonably differ on what to do then. The issue exists in Python2.6.1 (where I made it) and trunk. ---------- keywords: +patch nosy: +tony_nelson Added file: http://bugs.python.org/file13589/header_B_padding.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 00:10:23 2009 From: report at bugs.python.org (Collin Winter) Date: Thu, 02 Apr 2009 22:10:23 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238710223.01.0.36918107185.issue5670@psf.upfronthosting.co.za> Collin Winter added the comment: Antoine: pickletester.py:test_newobj_generic() appears to test dict subclasses, though in a roundabout-ish way. I don't know of any tests for dict subclasses in the C level sense (ie, PyDict_Check() vs PyDict_CheckExact()). I can add more explicit tests for Python-level dict subclasses, if you want. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 00:12:39 2009 From: report at bugs.python.org (Tony Nelson) Date: Thu, 02 Apr 2009 22:12:39 +0000 Subject: [issue3169] email/header.py doesn't handle Base64 headers that have been insufficiently padded. In-Reply-To: <1214092738.57.0.399756790289.issue3169@psf.upfronthosting.co.za> Message-ID: <1238710359.5.0.00876363741564.issue3169@psf.upfronthosting.co.za> Changes by Tony Nelson : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 00:42:25 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 02 Apr 2009 22:42:25 +0000 Subject: [issue1726196] Windows Build Warnings Message-ID: <1238712145.17.0.00400478086861.issue1726196@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This was indeed fixed a long time ago ---------- nosy: +amaury.forgeotdarc resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 00:49:46 2009 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 02 Apr 2009 22:49:46 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1238700249.8858.33.camel@fsol> Message-ID: <18901.16644.855391.440766@montanaro.dyndns.org> Skip Montanaro added the comment: >> You don't, but use of assert statements seems a hell of a lot more >> Pythonic to me than all the assert* or fail* method names which I can >> never remember. Antoine> 1. they are optimized away in "-Oxxx" mode As far as I can tell for Python itself we never use -O while running unit tests. Antoine> 2. they don't provide good reporting in case of failure I've never had a problem with that. It yields a perfectly useful traceback, and in the case of the nose package at least, it does the right thing with it. In any case, your test machinery will have to catch AssertionError exceptions anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 00:53:47 2009 From: report at bugs.python.org (Michael Foord) Date: Thu, 02 Apr 2009 22:53:47 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238712827.13.0.280660228665.issue2578@psf.upfronthosting.co.za> Michael Foord added the comment: No - you catch self.failureException rather than AssertionError directly. I use unittest precisely because of the rich failure information from the assert methods - particularly the new ones in this patch! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 00:56:02 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 02 Apr 2009 22:56:02 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238712962.86.0.458765796813.issue5670@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The patch produces different output for an empty dict: a sequence "MARK SETITEMS" is written, which is useless and wastes 2 bytes. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 00:58:57 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 02 Apr 2009 22:58:57 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238710223.01.0.36918107185.issue5670@psf.upfronthosting.co.za> Message-ID: <1238713218.7628.10.camel@fsol> Antoine Pitrou added the comment: > Antoine: pickletester.py:test_newobj_generic() appears to test dict > subclasses, though in a roundabout-ish way. I don't know of any tests > for dict subclasses in the C level sense (ie, PyDict_Check() vs > PyDict_CheckExact()). I can add more explicit tests for Python-level > dict subclasses, if you want. Well, Python-level dict subclasses are also C-level subclasses (in the PyDict_Check() sense), or am I mistaken? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 01:06:18 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 02 Apr 2009 23:06:18 +0000 Subject: [issue5672] Implement a way to change the python process name In-Reply-To: <1238701084.1.0.0781987214897.issue5672@psf.upfronthosting.co.za> Message-ID: <1238713578.29.0.0187981663795.issue5672@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: There was a similar request in Java bug database: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6299778 And I'd follow the same path: provide a way to build a launcher - a .exe file that simply starts python with the given script. I suggest to close this issue, and join the discussion in issue4015 ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 01:20:26 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 02 Apr 2009 23:20:26 +0000 Subject: [issue5643] test__locale fails with RADIXCHAR on Windows In-Reply-To: <1238586550.45.0.844379263332.issue5643@psf.upfronthosting.co.za> Message-ID: <1238714426.59.0.446857271888.issue5643@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is now failing because an ImportError in a test doesn't cause the test to be skipped like previously. Someone will have to figure out what part of test__locale are applicable to Windows. ---------- nosy: +benjamin.peterson priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 01:54:36 2009 From: report at bugs.python.org (MechPaul) Date: Thu, 02 Apr 2009 23:54:36 +0000 Subject: [issue5675] string module requires bytes type for maketrans, but calling method on regular string does not In-Reply-To: <1238716476.0.0.609350611694.issue5675@psf.upfronthosting.co.za> Message-ID: <1238716476.0.0.609350611694.issue5675@psf.upfronthosting.co.za> New submission from MechPaul : I was making a simple Caesarian cipher when this issue came up. #Following code here >>> import string >>> CAESER_SHIFT = 13 >>> TranslationTableUpper = [string.ascii_uppercase[(index + CAESER_SHIFT) % 26] for index in range(26)] >>> TranslationTableLower = [string.ascii_lowercase[(index + CAESER_SHIFT) % 26] for index in range(26)] >>> TranslationTableCipher = ''.join(TranslationTableUpper + TranslationTableLower) >>> TranslationTableRegular = string.ascii_uppercase[0:27] + string.ascii_lowercase[0:27] >>> Trans = ''.maketrans(TranslationTableCipher, TranslationTableRegular) >>> print(Trans) {65: 78, 66: 79, 67: 80, 68: 81, 69: 82, 70: 83, 71: 84, 72: 85, 73: 86, 74: 87, 75: 88, 76: 89, 77: 90, 78: 65, 79: 66, 80: 67, 81: 68, 82: 69, 83: 70, 84: 71, 85: 72, 86: 73, 87: 74, 88: 75, 89: 76, 90: 77, 97: 110, 98: 111, 99: 112, 100: 113, 101: 114, 102: 115, 103: 116, 104: 117, 105: 118, 106: 119, 107: 120, 108: 121, 109: 122, 110: 97, 111: 98, 112: 99, 113: 100, 114: 101, 115: 102, 116: 103, 117: 104, 118: 105, 119: 106, 120: 107, 121: 108, 122: 109} >>> #Okay... so maketrans() is working okay when calling it on an empty string, buuuut if called from the string module... >>> Trans = string.maketrans(TranslationTableCipher, TranslationTableRegular) Trans = string.maketrans(TranslationTableCipher, TranslationTableRegular) File "D:\Python31\lib\string.py", line 55, in maketrans raise TypeError("maketrans arguments must be bytes objects") TypeError: maketrans arguments must be bytes objects ---------- components: Interpreter Core messages: 85280 nosy: MechPaul severity: normal status: open title: string module requires bytes type for maketrans, but calling method on regular string does not versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 01:59:12 2009 From: report at bugs.python.org (Fredrik Lundh) Date: Thu, 02 Apr 2009 23:59:12 +0000 Subject: [issue1143] Update to latest ElementTree in Python 2.7 In-Reply-To: <1189491195.66.0.621818063137.issue1143@psf.upfronthosting.co.za> Message-ID: <1238716752.37.0.363251708213.issue1143@psf.upfronthosting.co.za> Fredrik Lundh added the comment: ET 1.3 is still in alpha, though. Hopefully, that'll sort itself out over the next few weeks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 02:00:52 2009 From: report at bugs.python.org (Fredrik Lundh) Date: Fri, 03 Apr 2009 00:00:52 +0000 Subject: [issue1538691] Patch cElementTree to export CurrentLineNumber Message-ID: <1238716852.3.0.0142715085849.issue1538691@psf.upfronthosting.co.za> Fredrik Lundh added the comment: In the upstream 1.0.6, the ParseError exception has a position attribute that contains a (line, column) tuple. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 02:05:23 2009 From: report at bugs.python.org (Michael Zamot) Date: Fri, 03 Apr 2009 00:05:23 +0000 Subject: [issue5435] test_httpservers on Debian Testing In-Reply-To: <1237828715.23.0.0494863677693.issue5435@psf.upfronthosting.co.za> Message-ID: <12dead500904021705x119ef323se6759e2778907163@mail.gmail.com> Michael Zamot added the comment: yes it ran with normal user :-) thanks now im enjoying python 3k ;-) 2009/3/23 Facundo Batista > > Facundo Batista added the comment: > > CGI tests shouldn't be run as root, it seems, as it breaks the inherent > protection. > > ---------- > nosy: +facundobatista > resolution: -> invalid > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file13590/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- yes it ran with normal user :-) thanks now im enjoying python 3k ;-)

2009/3/23 Facundo Batista <report at bugs.python.org>

Facundo Batista <facundo at taniquetil.com.ar> added the comment:

CGI tests shouldn't be run as root, it seems, as it breaks the inherent
protection.

----------
nosy: +facundobatista
resolution: ??-> invalid
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5435>
_______________________________________

From report at bugs.python.org Fri Apr 3 02:24:14 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 03 Apr 2009 00:24:14 +0000 Subject: [issue5675] string module requires bytes type for maketrans, but calling method on regular string does not In-Reply-To: <1238716476.0.0.609350611694.issue5675@psf.upfronthosting.co.za> Message-ID: <1238718254.03.0.181887054348.issue5675@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 02:29:55 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Apr 2009 00:29:55 +0000 Subject: [issue1143] Update to latest ElementTree in Python 2.7 In-Reply-To: <1189491195.66.0.621818063137.issue1143@psf.upfronthosting.co.za> Message-ID: <1238718595.17.0.190661174133.issue1143@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm looking forward to it. Thanks F/ ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 02:46:57 2009 From: report at bugs.python.org (Larry Hastings) Date: Fri, 03 Apr 2009 00:46:57 +0000 Subject: [issue5676] Fix "make clean" in py3k/trunk In-Reply-To: <1238719617.07.0.390323030603.issue5676@psf.upfronthosting.co.za> Message-ID: <1238719617.07.0.390323030603.issue5676@psf.upfronthosting.co.za> New submission from Larry Hastings : "make clean" fails in my tree. There's an inscrutable new directory, "@test", which is chmod 400, and therefore "find" isn't allowed to descend into it, so it fails and aborts the clean early. I don't know what the deal is here, but I patched the rules for "clean" and "pycremoval" so they chmod "@test" temporarily to 755 before running and back to "400" afterwards. A better fix: get rid of this "chmod 400 @test" nonsense. But I'm too lazy to investigate why it was done in the first place. Or tell me what I'm doing wrong in the first place... ---------- components: Build files: lch.make.clean.diff keywords: patch messages: 85285 nosy: lhastings severity: normal status: open title: Fix "make clean" in py3k/trunk versions: Python 3.1 Added file: http://bugs.python.org/file13591/lch.make.clean.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 03:24:44 2009 From: report at bugs.python.org (Robert Xiao) Date: Fri, 03 Apr 2009 01:24:44 +0000 Subject: [issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file In-Reply-To: <1238721884.54.0.371516304831.issue5677@psf.upfronthosting.co.za> Message-ID: <1238721884.54.0.371516304831.issue5677@psf.upfronthosting.co.za> New submission from Robert Xiao : (tested and verified on Windows and Solaris SPARC) Running this code in Python 2.4, 2.5 or 2.6 (all minor versions) produces garbage. f=open("anyfile","w") f.write("garbage") f.readline() Mac OS X and Linux appear to simply throw an "IOError: [Errno 9] Bad file descriptor" exception, while using a read method without writing first produces the same exception on Windows and certain versions under Solaris. Under Solaris, it is further possible to segfault the interpreter with this code: f=open("anyfile","w") f.read() In the former case, it appears as if the data is simply read from the disk block containing the file. In the latter, I have no clue what is going on. In Python 3.0, file objects opened with "w" don't even support any .read methods, so this does not affect Py3k. ---------- components: Interpreter Core messages: 85286 nosy: nneonneo severity: normal status: open title: Serious interpreter crash and/or arbitrary memory leak using .read() on writable file type: crash versions: Python 2.4, Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 03:34:51 2009 From: report at bugs.python.org (Robert Xiao) Date: Fri, 03 Apr 2009 01:34:51 +0000 Subject: [issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file In-Reply-To: <1238721884.54.0.371516304831.issue5677@psf.upfronthosting.co.za> Message-ID: <1238722491.07.0.744938034714.issue5677@psf.upfronthosting.co.za> Robert Xiao added the comment: OK, it's not a memory leak, rather, it's something leaking from the files. However, this still winds up filling the affected file full of garbage, which is quite undesirable (and, I think, quite likely to be unwanted behaviour, considering that *some* read methods throw IOError 9 and some others don't). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 03:38:02 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 03 Apr 2009 01:38:02 +0000 Subject: [issue5676] Fix "make clean" in py3k/trunk In-Reply-To: <1238719617.07.0.390323030603.issue5676@psf.upfronthosting.co.za> Message-ID: <1238722682.0.0.305738304372.issue5676@psf.upfronthosting.co.za> Benjamin Peterson added the comment: @test is the file used by tests. It shouldn't be left around by tests, so if it is, I think you should explicitly has to remove it. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 03:45:37 2009 From: report at bugs.python.org (Reid Kleckner) Date: Fri, 03 Apr 2009 01:45:37 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1238723137.97.0.0565230911552.issue5673@psf.upfronthosting.co.za> Reid Kleckner added the comment: I'd like some feedback on this patch. Is the API acceptable? Would it be better to throw an exception in wait() instead of returning None? What should communicate() return if it times out? I can't decide if it should try to return partial output, return None, or raise an exception. If it doesn't return partial output, that output is not recoverable. Maybe it should go into the exception object. On the other hand, the way that communicate() is implemented with threads on Windows makes it hard to "interrupt" the file descriptor read and return partial output. For that matter, I'm not even sure how to stop those extra threads, as you can see in the patch. If anyone can think of a way to avoid using threads entirely, that would be even better. What should call() and check_call() return when they timeout? If they return None, which is the current returncode attribute, there is no way of interacting with the process. They could throw an exception with a reference to the Popen object. ---------- keywords: +patch Added file: http://bugs.python.org/file13592/subprocess-timeout.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 03:48:54 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 03 Apr 2009 01:48:54 +0000 Subject: [issue5675] string module requires bytes type for maketrans, but calling method on regular string does not In-Reply-To: <1238716476.0.0.609350611694.issue5675@psf.upfronthosting.co.za> Message-ID: <1238723334.38.0.950021858404.issue5675@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This seems to have been intentional. I'm assigning it to Georg since he made the commit. ---------- assignee: -> georg.brandl nosy: +benjamin.peterson, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 05:46:26 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 03:46:26 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1238730386.72.0.957471991058.issue5665@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Overall, the patch looks good. I haven't reviewed the patch thoroughly yet, but there is a few things I am not sure about. First, why do you bother supporting 2.4 (i.e. with a copy of run_with_locale) in a patch aimed at 2.7? In test_many_puts_and_gets(), I believe this: for proto in [0, 1, 2]: ... should be changed to: for proto in protocols: ... Also, I think the tests in AbstractPicklerUnpicklerObjectTests could be stronger if they used the pickletools module to decompile to check that only PUT opcodes have changed or not. However, the extra complexity may not worth it. And one last thing, why AbstractCompatTests is hard-coded to use cPickle? Shouldn't the standard pickle module be tested too? ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Marcelo_Fern=C3=A1ndez_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Fri Apr 3 06:59:09 2009 From: =?utf-8?q?Marcelo_Fern=C3=A1ndez_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Marcelo_Fern=C3=A1ndez_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Fri, 03 Apr 2009 04:59:09 +0000 Subject: [issue5672] Implement a way to change the python process name In-Reply-To: <1238701084.1.0.0781987214897.issue5672@psf.upfronthosting.co.za> Message-ID: <1238734749.63.0.0408932749138.issue5672@psf.upfronthosting.co.za> Marcelo Fern?ndez added the comment: Uhm... ok, (looking at issue 4015) I agree with that method at some point (tough is not exactly the same thing)... but only if the launcher will not be for Windows only, and that solution would be consistent across al platforms... Just to know, there is no prctl equivalent in Windows? Regards ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 07:21:07 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 05:21:07 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238736067.04.0.977570949841.issue5670@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I ported the patch to py3k. In addition, I added a special-case when the dict contains only one item; you probably want this special-case in the trunk version as well. ---------- nosy: +alexandre.vassalotti Added file: http://bugs.python.org/file13593/pickle_batch_dict_exact_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 07:23:44 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 05:23:44 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238736223.72.0.785657694739.issue5670@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Oops, I forgot to add the comment on top of batch_dict_exact in the patch. Here is a better patch. ---------- Added file: http://bugs.python.org/file13594/pickle_batch_dict_exact_py3k-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 07:47:00 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 05:47:00 +0000 Subject: [issue5671] Speed up pickling of lists in cPickle In-Reply-To: <1238700497.01.0.638889592432.issue5671@psf.upfronthosting.co.za> Message-ID: <1238737620.85.0.352105645336.issue5671@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Here's a patch for py3k. I also added a special-case for 1-item lists. ---------- nosy: +alexandre.vassalotti Added file: http://bugs.python.org/file13595/pickle_batch_list_exact_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 07:47:18 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 05:47:18 +0000 Subject: [issue5671] Speed up pickling of lists in cPickle In-Reply-To: <1238700497.01.0.638889592432.issue5671@psf.upfronthosting.co.za> Message-ID: <1238737638.33.0.4525894891.issue5671@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 07:51:52 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 05:51:52 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238737912.98.0.1164588955.issue5670@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Oops again, I just remarked that the comment for batch_dict_exact refers to batch_dict as being above, but I copied batch_dict_exact before batch_dict. Here's a good patch (hopefully) that puts batch_dict_exact at the right place. ---------- keywords: -patch versions: +Python 3.1 Added file: http://bugs.python.org/file13596/pickle_batch_dict_exact_py3k-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 07:52:00 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 05:52:00 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238737920.8.0.984736766008.issue5670@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13593/pickle_batch_dict_exact_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 07:52:05 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 05:52:05 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238737925.92.0.390798278947.issue5670@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13594/pickle_batch_dict_exact_py3k-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 08:03:30 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 06:03:30 +0000 Subject: [issue5345] cStringIO class name typo In-Reply-To: <1235286577.45.0.856937584355.issue5345@psf.upfronthosting.co.za> Message-ID: <1238738610.15.0.565279386387.issue5345@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: This is not a typo. cStringIO.StringIO is a factory function that returns either a cStringO object (for writing) or cStringI (for reading). If this behavior causes a problem to you, then consider using StringIO.StringIO. Alternatively, you could upgrade to Python 2.7 or 3.0 and use io.StringIO() which doesn't have this limitation. ---------- nosy: +alexandre.vassalotti resolution: -> wont fix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 09:51:57 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 07:51:57 +0000 Subject: [issue2389] Array pickling exposes internal memory representation of elements In-Reply-To: <1205851091.96.0.575523128038.issue2389@psf.upfronthosting.co.za> Message-ID: <1238745117.35.0.184726311291.issue2389@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Ah, I just remembered the smart way I had devised some time ago to handle this issue without changing the constructor of array.array. The trick would be to add a __reduce__ method to array.array. This method would return a special constructor function, the binary data of the array and a string representing the format of the array. Upon unpickling, the special constructor function would be called with the binary data and its format and then it would recreate the array. Now, the only thing I am not sure about is whether this would work well with subclasses of array.array. I guess we make __reduce__ also return the instance's type which could be used by special constructor to recreate the instance from the proper subclass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 10:10:52 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 08:10:52 +0000 Subject: [issue3675] Python 2.6 can't read sets pickled with Python 3.0 In-Reply-To: <1219666544.55.0.587307324969.issue3675@psf.upfronthosting.co.za> Message-ID: <1238746252.59.0.650041903613.issue3675@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Would it would be sufficient to add a function in the pickletools capable of converting old Python 2 pickles to the new format in Python 3? Alternatively, we could add a compatibility Unpickler class that would override the find_class method to do the name translation on-the-fly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 11:32:04 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 03 Apr 2009 09:32:04 +0000 Subject: [issue5671] Speed up pickling of lists in cPickle In-Reply-To: <1238700497.01.0.638889592432.issue5671@psf.upfronthosting.co.za> Message-ID: <1238751124.89.0.512638359578.issue5671@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A micro-benchmark of Collin's patch: python -m timeit -s "import cPickle; l=range(150)" "cPickle.dumps(l, protocol=-1)" * before: 12.1 usec per loop * after: 10.1 usec per loop => 15% faster on a favorable case ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 14:59:09 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 03 Apr 2009 12:59:09 +0000 Subject: [issue1654429] thread join() with timeout hangs on Windows 2003 x64 Message-ID: <1238763549.7.0.517084598344.issue1654429@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I reproduce the problem with python 2.5, and it seems corrected with python 2.6.1. 2.5 now only accept security fixes: closing as "out of date". ---------- nosy: +amaury.forgeotdarc resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 15:44:16 2009 From: report at bugs.python.org (Friedrich Weber) Date: Fri, 03 Apr 2009 13:44:16 +0000 Subject: [issue5678] typo in future_builtins documentation In-Reply-To: <1238766256.3.0.595291754287.issue5678@psf.upfronthosting.co.za> Message-ID: <1238766256.3.0.595291754287.issue5678@psf.upfronthosting.co.za> New submission from Friedrich Weber : Hi, from http://docs.python.org/library/future_builtins.html: .. function:: oct(object) Works like the builtin :func:`oct`, but instead of :meth:`__oct__` it will use the :meth:`__index__` method on its argument to get an integer that is then converted to hexadecimal. should rather be something like '... that is then converted to octal.' ---------- assignee: georg.brandl components: Documentation messages: 85304 nosy: fredreichbier, georg.brandl severity: normal status: open title: typo in future_builtins documentation versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 16:07:16 2009 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 03 Apr 2009 14:07:16 +0000 Subject: [issue5654] Add C hook in PyDict_SetItem for debuggers In-Reply-To: <1238604905.42.0.578461685574.issue5654@psf.upfronthosting.co.za> Message-ID: <1238767636.92.0.756116959011.issue5654@psf.upfronthosting.co.za> Guido van Rossum added the comment: John, I'm adding a +0 to cancel out Raymond's -1. I've read your motivation and, like you, hope/expect that benchmarking will show this has no real impact. But I need data to decide. Once there are benchmark results I'll revise my view. A good place to start looking for benchmarks might be the Performance section of http://code.google.com/p/unladen-swallow/wiki/ProjectPlan . ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 16:24:03 2009 From: report at bugs.python.org (Stefan van der Walt) Date: Fri, 03 Apr 2009 14:24:03 +0000 Subject: [issue2527] Pass a namespace to timeit In-Reply-To: <1207052027.28.0.27225375953.issue2527@psf.upfronthosting.co.za> Message-ID: <1238768643.77.0.698459714354.issue2527@psf.upfronthosting.co.za> Changes by Stefan van der Walt : ---------- nosy: +stefanv _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 16:26:12 2009 From: report at bugs.python.org (Stefan van der Walt) Date: Fri, 03 Apr 2009 14:26:12 +0000 Subject: [issue2057] difflib: add patch capability In-Reply-To: <1202628772.22.0.236434867196.issue2057@psf.upfronthosting.co.za> Message-ID: <1238768772.67.0.83745520139.issue2057@psf.upfronthosting.co.za> Changes by Stefan van der Walt : ---------- nosy: +stefanv _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 16:37:46 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 14:37:46 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238769466.92.0.243920670005.issue5670@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Silly me, I had changed the PyDict_Size call in outer loop for Py_SIZE and this is of course totally wrong. Here's a good patch (I am pretty sure now! ;-) I ran the whole test suite and I saw no failures. Collin, you can go ahead and commit both patches. Nice work! ---------- assignee: -> collinwinter keywords: +patch resolution: -> accepted stage: -> commit review Added file: http://bugs.python.org/file13597/pickle_batch_dict_exact_py3k-4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 16:42:18 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 14:42:18 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238769738.01.0.465166306546.issue5670@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Sigh... silly me again. There is some other junk in my last patch. ---------- Added file: http://bugs.python.org/file13598/pickle_batch_dict_exact_py3k-5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 16:42:24 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 14:42:24 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238769744.7.0.716943641709.issue5670@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13596/pickle_batch_dict_exact_py3k-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 16:42:29 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 14:42:29 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238769749.92.0.283345603984.issue5670@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13597/pickle_batch_dict_exact_py3k-4.diff _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Walter_D=C3=B6rwald_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Fri Apr 3 16:58:22 2009 From: =?utf-8?q?Walter_D=C3=B6rwald_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Walter_D=C3=B6rwald_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Fri, 03 Apr 2009 14:58:22 +0000 Subject: [issue5640] Wrong print() result when unicode error handler is not 'strict' In-Reply-To: <1238571303.14.0.143713902199.issue5640@psf.upfronthosting.co.za> Message-ID: <1238770702.8.0.377649122475.issue5640@psf.upfronthosting.co.za> Walter D?rwald added the comment: Indeed this patch does fix the bug. Go ahead and check it in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 18:55:25 2009 From: report at bugs.python.org (Michael Foord) Date: Fri, 03 Apr 2009 16:55:25 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1238777725.41.0.596273412108.issue5538@psf.upfronthosting.co.za> Michael Foord added the comment: +1 on adding a cleanUp list where entries are executed unconditionally even on failure of setUp. If there is consensus that this is a good thing (looks like it to me from the discussion here) then I can apply the patch to head. I'll review it first and post any further comments here. ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 19:00:16 2009 From: report at bugs.python.org (Michael Foord) Date: Fri, 03 Apr 2009 17:00:16 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1238778016.5.0.400155141318.issue5538@psf.upfronthosting.co.za> Michael Foord added the comment: OK, so the patch as submitted *isn't* for the cleanUp suggestion (d'oh - I should have read it before posting the last comment). One possibility is that this bug is closed as won't fix (the patch as provided should definitely not be applied as it is a big change to unittest setUp / tearDown semantics) and a new feature request be added for cleanUp. OTOH if we do have consensus that cleanUp is a worthy feature I'll just do it... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 19:29:24 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 03 Apr 2009 17:29:24 +0000 Subject: [issue1705393] Select() failure (race condition) Message-ID: <1238779764.33.0.816522822837.issue1705393@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This older post http://bytes.com/groups/python/786579-python-2-2-1-select describes a similar problem where select() is used on a buffered file object (a pipe to another process) IMO it should be documented that select() does not work so well for objects which have a fileno(), but do data buffering: select() only sees the file descriptor and cannot know whether there is data in the buffer. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 19:56:09 2009 From: report at bugs.python.org (Collin Winter) Date: Fri, 03 Apr 2009 17:56:09 +0000 Subject: [issue5671] Speed up pickling of lists in cPickle In-Reply-To: <1238700497.01.0.638889592432.issue5671@psf.upfronthosting.co.za> Message-ID: <1238781369.7.0.533076126786.issue5671@psf.upfronthosting.co.za> Collin Winter added the comment: I've added a microbenchmark to perf.py called pickle_list. Running that on this change (perf.py -r -b pickle_list): pickle_list: Min: 1.126 -> 0.888: 26.86% faster Avg: 1.154 -> 0.906: 27.43% faster Significant (t=115.404547, a=0.95) That's probably the upper bound on the performance improvement to be realized from this patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 19:57:09 2009 From: report at bugs.python.org (Collin Winter) Date: Fri, 03 Apr 2009 17:57:09 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1238781429.73.0.706920888395.issue5665@psf.upfronthosting.co.za> Collin Winter added the comment: I've made test_xpickle support Python 2.4 because it uses Python 2.4, 2.5 and 2.6 to check that we haven't broken backwards compatibility with those versions. I made AbstractCompatTests use cPickle because that's what I've been changing :) I can add tests for the pure-Python pickle module if you want. At that point, though, test_xpickle will be very slow and we'll want to add a regrtest resource to control how much time test_xpickle spends running. Does xpickle work for the resource name (ie, regrtest.py -u xpickle)? I agree with your other points. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 20:00:13 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 03 Apr 2009 18:00:13 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1238781613.85.0.437807946988.issue5665@psf.upfronthosting.co.za> Antoine Pitrou added the comment: How much is "very slow"? If it's less than 10-15 seconds I think it's ok. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 20:12:05 2009 From: report at bugs.python.org (Collin Winter) Date: Fri, 03 Apr 2009 18:12:05 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1238782325.02.0.817389386024.issue5665@psf.upfronthosting.co.za> Collin Winter added the comment: test_xpickle currently takes over three minutes on my MacBook Pro to test compatibility with Python 2.4, 2.5 and 2.6, and adding tests for the pickle module will at least double that, if not push it well above 10 minutes. That's why I recommend using the resource flag if we want to add the same tests for the pickle module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 20:18:35 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Apr 2009 18:18:35 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1238782715.49.0.0449325466173.issue5665@psf.upfronthosting.co.za> Raymond Hettinger added the comment: We took a similar issue in test_decimal and came up with a better approach to using the resource flag. If the resource is not enabled, the tester runs a random subset of the tests. Over time, that means that all the tests will get run even if testers are routinely not enabling the resource. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 21:09:55 2009 From: report at bugs.python.org (Brett Cannon) Date: Fri, 03 Apr 2009 19:09:55 +0000 Subject: [issue5646] test_importlib fails for py3k on Windows In-Reply-To: <1238586905.79.0.515263062555.issue5646@psf.upfronthosting.co.za> Message-ID: <1238785795.5.0.874159330714.issue5646@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 21:15:50 2009 From: report at bugs.python.org (Michael Foord) Date: Fri, 03 Apr 2009 19:15:50 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238786150.9.0.0548017854713.issue2578@psf.upfronthosting.co.za> Michael Foord added the comment: Why is assertMultiLineEqual not the default assert method for basestring? Even for small strings the output is useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 21:33:30 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 03 Apr 2009 19:33:30 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238782325.02.0.817389386024.issue5665@psf.upfronthosting.co.za> Message-ID: <1238787294.6517.3.camel@fsol> Antoine Pitrou added the comment: > test_xpickle currently takes over three minutes on my MacBook Pro to > test compatibility with Python 2.4, 2.5 and 2.6, and adding tests for > the pickle module will at least double that, if not push it well above > 10 minutes. Ouch! A couple of minutes is already too much for a single test IMHO. I fully agree with the desire to test as deeply as possible, but if all modules were to become as well tested, nobody would bother running the regression suite anymore :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 21:35:25 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Fri, 03 Apr 2009 19:35:25 +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: <1238787325.79.0.755051042138.issue2704@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: As far as typing in the comment widget goes - it works fine if you don't add CR at the end of the lines until you go back and edit it by inserting some text. Then the faulty wordwrapping kicks in, and it has to be fixed by removing all the extra spaces and CR by hand. The only way around it that I've found is to use hard CR. But then you have to second guess the right margin. You'll notice that if you undo the wrapping it did on my comment, that the lines are shorter than in your comments! This paragraph was entered w/o returns. It gets screwed as soon as I click outside the widget. And the screwing depends on the width of my browser window, because that affect the width of the text entry widget. Rev 62545 to 2.6 was forward ported to 3.0 on 4May, r62716. I'm using py3k HEAD and it works the same as 2.6: pressing Home toggles beween the left margin and the start of the code text. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 21:50:04 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 03 Apr 2009 19:50:04 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1238788204.39.0.272367444202.issue5665@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Raymond, how would you reconcile your random approach with the fact that buildbots only display errors after a second verification run? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 21:56:47 2009 From: report at bugs.python.org (Michael Foord) Date: Fri, 03 Apr 2009 19:56:47 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> New submission from Michael Foord : Proposal to add a cleanUp stack to unittest.TestCase. This is a list of callables to be called (LIFO) to cleanup resources. If there are items on the stack it should be called even if setUp fails. Otherwise it should be called after tearDown. Similar functionality is in the testing frameworks used by bzr, Twisted, and Zope. I will create a patch similar to the bzr implementation. The public API is via a new method: def addCleanUpItem(self, callable, *args, **kwargs): Usage is: self.db = self.createDB() self.addCleanUpItem(self.db.close) ---------- assignee: michael.foord components: Library (Lib) messages: 85321 nosy: michael.foord severity: normal status: open title: cleanUp stack for unittest type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 22:02:58 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Fri, 03 Apr 2009 20:02:58 +0000 Subject: [issue3851] IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered. In-Reply-To: <1221250835.7.0.322524713176.issue3851@psf.upfronthosting.co.za> Message-ID: <1238788978.89.0.0819395235735.issue3851@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: Rev 62545 to 2.6 was forward ported to 3.0 on 4May, r62716. I'm using py3k HEAD and it works the same as 2.6: pressing Home toggles beween the left margin and the start of the code text. It works the same way on Linux and Windows XP. Won't fix, because this is not a bug, but a feature. It's useful for copying blocks from the shell. If you press home to get to the start of the code text next to the prompt, why did you press it again except to get to the left margin? And if you did so accidentally, press it a third time! ---------- assignee: -> kbk resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 22:09:46 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 03 Apr 2009 20:09:46 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238789386.47.0.139212159973.issue5679@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I'm used to doing this using a finally clause in the setUp() method (if I do it at all, I'm not used to setUp failing). I guess this would be a convenience to avoid the need for this pattern? I'm not sure we really need a list of cleanup callbacks. Got pointers to good examples of this in bzr/twisted/zope? def setUp(self): try: do_a_bunch_of_stuff_that_could_fail() finally: conditionally_undo_setup() do_more() def conditionally_undo_setup(self): if self.foo: self.foo.close() if self.bar: shutil.rmtree(self.bar) def tearDown(self): conditionally_undo_setup() undo_more() fwiw, in your self.db.close example, normally i'd also want to remove and unlink the database as well as just closing it for a unittest. maybe not the best example. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 22:16:34 2009 From: report at bugs.python.org (Michael Foord) Date: Fri, 03 Apr 2009 20:16:34 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238789794.27.0.0904779058735.issue5679@psf.upfronthosting.co.za> Michael Foord added the comment: This is a nice (simple to use and understand) pattern for resource allocation / deallocation. Supporting the cleaning up of resources when setUp fails (without duplicating clean up code) is just one use case. (I agree setUp failure is unusual.) It provides a clean way to clean up just the resources you have allocated in the event of test failure, without having to keep track yourself of how far the test has got. Manually tracking resource usage is easy to get wrong. bzr: http://bazaar.launchpad.net/~jml/testtools/trunk/annotate/head%3A/testtools/testcase.py And from zope.testing: The documentation: http://svn.zope.org/zope.testing/trunk/src/zope/testing/setupstack.txt?rev=92340&view=auto The module: http://svn.zope.org/zope.testing/trunk/src/zope/testing/setupstack.py?rev=92340&view=auto ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 22:18:05 2009 From: report at bugs.python.org (Michael Foord) Date: Fri, 03 Apr 2009 20:18:05 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238789885.51.0.449352831654.issue5679@psf.upfronthosting.co.za> Michael Foord added the comment: >From your example this would completely remove the need for the conditional checking in the cleanup code. Only resources actually allocated would be in the stack. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 22:28:21 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 03 Apr 2009 20:28:21 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238790501.72.0.789812401049.issue2578@psf.upfronthosting.co.za> Gregory P. Smith added the comment: assertMultiLineEqual might be reasonable as a default assertEqual for unicode. I wouldn't want to do it for bytes (py 2.x string). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 22:29:09 2009 From: report at bugs.python.org (Michael Foord) Date: Fri, 03 Apr 2009 20:29:09 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238790549.76.0.160604240915.issue2578@psf.upfronthosting.co.za> Michael Foord added the comment: Fair point. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 22:34:10 2009 From: report at bugs.python.org (Michael Foord) Date: Fri, 03 Apr 2009 20:34:10 +0000 Subject: [issue5538] tearDown in unittest should be executed regardless of result in setUp In-Reply-To: <1237756583.23.0.244511202702.issue5538@psf.upfronthosting.co.za> Message-ID: <1238790850.08.0.18416464224.issue5538@psf.upfronthosting.co.za> Michael Foord added the comment: Closing. The patch as suggested should not be applied. Instead tearDown should be called in a finally block in the setUp for this specific use case. I've created a new issue (#5679) for the cleanUp idea which I think is good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 22:35:35 2009 From: report at bugs.python.org (Tony Nelson) Date: Fri, 03 Apr 2009 20:35:35 +0000 Subject: [issue4487] Add utf8 alias for email charsets In-Reply-To: <1228223832.43.0.0399583143577.issue4487@psf.upfronthosting.co.za> Message-ID: <1238790935.16.0.685555297042.issue4487@psf.upfronthosting.co.za> Tony Nelson added the comment: This seems entirely reasonable, helpful, and in accord with the mapping of ascii to us-ascii. I recommend accepting this patch or a slightly fancier one that would also do "utf_8". There are pobably other encoding names with the same issue of being accepted by Python but not be understood by other email clients. This issue also affects 2.6.1 and 2.7trunk. I haven't checked 3.x. ---------- nosy: +barry, tony_nelson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 22:36:41 2009 From: report at bugs.python.org (Tony Nelson) Date: Fri, 03 Apr 2009 20:36:41 +0000 Subject: [issue4487] Add utf8 alias for email charsets In-Reply-To: <1228223832.43.0.0399583143577.issue4487@psf.upfronthosting.co.za> Message-ID: <1238791001.72.0.557136667782.issue4487@psf.upfronthosting.co.za> Changes by Tony Nelson : ---------- versions: +Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 22:38:48 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Apr 2009 20:38:48 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1238791128.71.0.642966017178.issue5665@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The buildbots should be running with the resource enabled (run the full set of tests, every time). If we need the reproducible results with the resource disabled, then a random seed (different for each successful run) can be saved in a logfile so that a particular pattern of tests can be re-run. The idea to run some random tests when the resource flag is disabled provides more coverage than not running any tests at all. This was very helpful during the early development of the decimal module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 22:49:00 2009 From: report at bugs.python.org (Collin Winter) Date: Fri, 03 Apr 2009 20:49:00 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1238791740.45.0.334836624059.issue5665@psf.upfronthosting.co.za> Collin Winter added the comment: Updated the patch to include a regrtest xpickle resource, which restricts if the backwards compat tests will be run. For normal development, the existing tests should be fine; you only need these tests if you're mucking with the pickle output. Added backwards compat tests for the pure-Python pickle module. Total run time with -uxpickle maxes out a little above five minutes on my machine, with a lot of variation between runs. Also addressed the comment about [0, 1, 2] -> protocols. ---------- Added file: http://bugs.python.org/file13599/pickle_tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 22:49:10 2009 From: report at bugs.python.org (Collin Winter) Date: Fri, 03 Apr 2009 20:49:10 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1238791750.01.0.0283303986045.issue5665@psf.upfronthosting.co.za> Changes by Collin Winter : Removed file: http://bugs.python.org/file13571/pickle_tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 23:00:31 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Apr 2009 21:00:31 +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: <1238792431.25.0.176121928778.issue2704@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As you said, the Home key issue is #3851, which makes is clearer that it appears to be Windows only. I should have specified that here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 23:09:02 2009 From: report at bugs.python.org (Michael Foord) Date: Fri, 03 Apr 2009 21:09:02 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238792942.2.0.868089600827.issue5679@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- type: behavior -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 23:20:33 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 03 Apr 2009 21:20:33 +0000 Subject: [issue5345] cStringIO class name typo In-Reply-To: <1235286577.45.0.856937584355.issue5345@psf.upfronthosting.co.za> Message-ID: <1238793633.93.0.346393076791.issue5345@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 23:22:09 2009 From: report at bugs.python.org (Collin Winter) Date: Fri, 03 Apr 2009 21:22:09 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238793729.78.0.535853463757.issue5670@psf.upfronthosting.co.za> Collin Winter added the comment: FYI, I just added a pickle_dict microbenchmark to perf.py. Using this new microbenchmark, I see these results (perf.py -r -b pickle_dict): pickle_dict: Min: 2.092 -> 1.341: 56.04% faster Avg: 2.126 -> 1.360: 56.37% faster Significant (t=216.895643, a=0.95) I still need to address the comment about pickling empty dicts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 23:29:09 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Apr 2009 21:29:09 +0000 Subject: [issue3851] IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered. In-Reply-To: <1221250835.7.0.322524713176.issue3851@psf.upfronthosting.co.za> Message-ID: <1238794149.27.0.871034618861.issue3851@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The bug reported here is that on Windows XP, on my machine, in 2.5 and still in multiple releases of 3.0 and 3.0.1, pressing Home sends the cursor DIRECTLY to the left margin, before '<<<', and never stops at the beginning of the text, after '>>> '. I am sorry if I was not clear enough before. Toggle behavior would be fine if it happened, and I never said otherwise. But it does not happen, at least not on my machine, using the PSF .msi installer. There is still a 3.0.2 to come. ---------- resolution: wont fix -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 23:48:37 2009 From: report at bugs.python.org (Collin Winter) Date: Fri, 03 Apr 2009 21:48:37 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238795317.58.0.614742580585.issue5670@psf.upfronthosting.co.za> Collin Winter added the comment: Amaury, I can't reproduce the issue you're seeing with empty dicts. Here's what I'm doing: dhcp-172-19-19-199:trunk collinwinter$ ./python.exe Python 2.7a0 (trunk:71100M, Apr 3 2009, 14:40:49) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import cPickle, pickletools >>> data = cPickle.dumps({}, protocol=2) >>> pickletools.dis(data) 0: \x80 PROTO 2 2: } EMPTY_DICT 3: . STOP highest protocol among opcodes = 2 >>> data '\x80\x02}.' >>> What are you doing to produce the MARK SETITEMS sequence? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 23:56:47 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 03 Apr 2009 21:56:47 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1231175004.95.0.780150738153.issue4847@psf.upfronthosting.co.za> Message-ID: <1238795807.61.0.357746464704.issue4847@psf.upfronthosting.co.za> Benjamin Peterson added the comment: So this is a doc bug? If so, need it still block tomorrow's release? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 23:58:36 2009 From: report at bugs.python.org (Renaud Blanch) Date: Fri, 03 Apr 2009 21:58:36 +0000 Subject: [issue1672568] silent error in email.message.Message.get_payload Message-ID: <1238795916.52.0.278884258304.issue1672568@psf.upfronthosting.co.za> Renaud Blanch added the comment: Daniel: i can't remember the exact scenario (i filled this bug 2 years ago !) after having a look back at email.message.Message.get_payload, i remember the problem: the decoding errors are silented by the method and you have no way to know if the decoding has been successful or not. to find my malformed email i had to patch the module like that (basically just removing the try/except blocks): --- message.py.orig 2009-04-03 23:46:47.000000000 +0200 +++ message.py 2009-04-03 23:48:27.000000000 +0200 @@ -192,19 +192,11 @@ if cte == 'quoted-printable': return utils._qdecode(payload) elif cte == 'base64': - try: - return utils._bdecode(payload) - except binascii.Error: - # Incorrect padding - return payload + return utils._bdecode(payload) elif cte in ('x-uuencode', 'uuencode', 'uue', 'x-uue'): sfp = StringIO() - try: - uu.decode(StringIO(payload+'\n'), sfp, quiet=True) - payload = sfp.getvalue() - except uu.Error: - # Some decoding problem - return payload + uu.decode(StringIO(payload+'\n'), sfp, quiet=True) + return sfp.getvalue() # Everything else, including encodings with 8bit or 7bit are returned # unchanged. return payload once again, the behaviour is documented, so it's not really a bug. but it caused me a lot of trouble (and it does not conforms very well to "Errors should never pass silently.":) but i guess applying such a patch could potentially break number of client code so... is it worth the change? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 3 23:58:38 2009 From: report at bugs.python.org (Aki) Date: Fri, 03 Apr 2009 21:58:38 +0000 Subject: [issue5527] multiprocessing won't work with Tkinter (under Linux) In-Reply-To: <1237574081.02.0.0677822756927.issue5527@psf.upfronthosting.co.za> Message-ID: <1238795918.64.0.283473579067.issue5527@psf.upfronthosting.co.za> Aki added the comment: Hello Jani Hakala, Thank you very much for working on the case I created. And, sorry for not getting back to you. I have confirmed observation that the problem is fixed under Linux if Tkinter is imported after fork(). However, this remains a problem for me and most other Tkinter programmers. It is fairy common to import Tkinter using from Tkinter Import *. This is because otherwise all Tk constants need to be prefixed with Tkinter. That is very painful and I don't see such coding except small examples. If I import Tkinter module after fork(), I cannot use from Tkinter *. Therefore this forces programmers to use Tkinter. prefix for every Tk constants. Is there any way to figure out the cause of this problem? Or, is there any way to do "from Tkinter import *" after fork()? Thank you for your help. Aki- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 00:12:03 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Fri, 03 Apr 2009 22:12:03 +0000 Subject: [issue5594] IDLE startup configuration In-Reply-To: <1238311210.52.0.532490988344.issue5594@psf.upfronthosting.co.za> Message-ID: <1238796723.0.0.137304200393.issue5594@psf.upfronthosting.co.za> Changes by Kurt B. Kaiser : ---------- assignee: -> kbk nosy: +kbk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 00:19:17 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 03 Apr 2009 22:19:17 +0000 Subject: [issue5666] Py_BuildValue("c") should return bytes? In-Reply-To: <1238663094.93.0.570643835814.issue5666@psf.upfronthosting.co.za> Message-ID: <1238797157.86.0.21011419509.issue5666@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Applied the patch in r71107. The issues these depend on can be fixed now. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 00:26:29 2009 From: report at bugs.python.org (Brett Cannon) Date: Fri, 03 Apr 2009 22:26:29 +0000 Subject: [issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6 In-Reply-To: <1236517160.74.0.61108619715.issue5442@psf.upfronthosting.co.za> Message-ID: <1238797589.69.0.677286153938.issue5442@psf.upfronthosting.co.za> Brett Cannon added the comment: If you could, Ismail, can you verify this either from svn or when the next release of 3.1 comes out and update this issue? ---------- status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 00:42:36 2009 From: report at bugs.python.org (Matthew Barnett) Date: Fri, 03 Apr 2009 22:42:36 +0000 Subject: [issue5680] Command-line arguments when running in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> New submission from Matthew Barnett : Patch idle-args.diff adds a dialog for entering command-line arguments for a script from within IDLE itself. ---------- components: IDLE files: idle-args.diff keywords: patch messages: 85341 nosy: mrabarnett severity: normal status: open title: Command-line arguments when running in IDLE type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file13600/idle-args.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 01:09:17 2009 From: report at bugs.python.org (Collin Winter) Date: Fri, 03 Apr 2009 23:09:17 +0000 Subject: [issue5681] Add a simple pickle optimizer to cPickle Message-ID: <1238800156.56.0.0582072136327.issue5681@psf.upfronthosting.co.za> Changes by Collin Winter : ---------- components: Extension Modules files: cpickle_writes.patch keywords: needs review, patch nosy: alexandre.vassalotti, collinwinter severity: normal status: open title: Add a simple pickle optimizer to cPickle type: performance versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13601/cpickle_writes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 01:10:16 2009 From: report at bugs.python.org (Collin Winter) Date: Fri, 03 Apr 2009 23:10:16 +0000 Subject: [issue5681] Add a simple pickle optimizer to cPickle In-Reply-To: <1238800216.58.0.586005137807.issue5681@psf.upfronthosting.co.za> Message-ID: <1238800216.58.0.586005137807.issue5681@psf.upfronthosting.co.za> New submission from Collin Winter : Bah, hit enter too soon. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 01:20:00 2009 From: report at bugs.python.org (Jani Hakala) Date: Fri, 03 Apr 2009 23:20:00 +0000 Subject: [issue5527] multiprocessing won't work with Tkinter (under Linux) In-Reply-To: <1237574081.02.0.0677822756927.issue5527@psf.upfronthosting.co.za> Message-ID: <1238800800.56.0.11104238364.issue5527@psf.upfronthosting.co.za> Jani Hakala added the comment: You can do something like import gui gui.start() in your Panel.draw() and 'from Tkinter import *' in the gui module which should contain your GUI-related code. Or you could just do 'from Tkconstants import *' in your tk_test.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 01:50:16 2009 From: report at bugs.python.org (Michael Foord) Date: Fri, 03 Apr 2009 23:50:16 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238802616.38.0.253486032642.issue5679@psf.upfronthosting.co.za> Michael Foord added the comment: And actually your conditionally_undo_setup() call in setUp is incorrect. It should in an except block that re-raises rather than a finally block (which will do the cleanup even in non-exceptional circumstances). Easy code to get wrong... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 01:55:33 2009 From: report at bugs.python.org (Michael Foord) Date: Fri, 03 Apr 2009 23:55:33 +0000 Subject: [issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6 In-Reply-To: <1199635442.3.0.37215467231.issue1745@psf.upfronthosting.co.za> Message-ID: <1238802933.22.0.803396755082.issue1745@psf.upfronthosting.co.za> Michael Foord added the comment: Running out of time for 2.7 as well... ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 01:55:42 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 23:55:42 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> Message-ID: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> New submission from Alexandre Vassalotti : Here is a patch that moves the source files of the _io module (and closely related modules) into subdirectory of Modules. The new file hierarchy proposed is the following: Modules/ _io/ _iomodule.h _iomodule.c iobase.c fileio.c bufferedio.c textio.c bytesio.c stringio.c I believe that moving the io module into its own subdirectory will make clear whether the different I/O implementations share common bugs. Currently, it is quite easy to miss a module when doing a bug fix. The patch was not tested on Windows. I tried my best to configure by hand PCbuild and PC/{VC, VS7.1, VS8.0}. However, I would be surprised if my changes were flawless. ---------- components: Build keywords: needs review, patch messages: 85346 nosy: alexandre.vassalotti, benjamin.peterson priority: normal severity: normal status: open title: Move io-in-c modules into a subdirectory of Modules/ versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 01:56:40 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 03 Apr 2009 23:56:40 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> Message-ID: <1238803000.36.0.947336330733.issue5682@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Where's the patch? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 01:58:18 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 03 Apr 2009 23:58:18 +0000 Subject: [issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6 In-Reply-To: <1238802933.22.0.803396755082.issue1745@psf.upfronthosting.co.za> Message-ID: <1afaf6160904031658m1b89e680lb36b87a585e88974@mail.gmail.com> Benjamin Peterson added the comment: 2009/4/3 Michael Foord : > > Michael Foord added the comment: > > Running out of time for 2.7 as well... How so? The first 2.7 alpha probably won't be until the end of summer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 01:59:35 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 03 Apr 2009 23:59:35 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> Message-ID: <1238803175.88.0.85458790843.issue5682@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file13602/move-iomodule-in-subdir.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 02:02:19 2009 From: report at bugs.python.org (Collin Winter) Date: Sat, 04 Apr 2009 00:02:19 +0000 Subject: [issue5683] Speed up cPickle's pickling generally In-Reply-To: <1238803338.21.0.932870288543.issue5683@psf.upfronthosting.co.za> Message-ID: <1238803338.21.0.932870288543.issue5683@psf.upfronthosting.co.za> New submission from Collin Winter : This patch simplifies cPickle's complicated internal buffering system. The new version uses a single buffer closer to the Pickler object, flushing to a file object only when necessary. This avoids the overhead of several indirection layers for what are frequently very small writes. Benchmarked against virgin trunk r71058 using "perf.py -r -b pickle,pickle_list,pickle_dict": pickle: Min: 2.225 -> 1.962: 13.37% faster Avg: 2.254 -> 1.994: 13.03% faster Significant (t=70.763434, a=0.95) pickle_dict: Min: 2.097 -> 1.418: 47.83% faster Avg: 2.136 -> 1.446: 47.75% faster Significant (t=214.900146, a=0.95) pickle_list: Min: 1.128 -> 0.777: 45.22% faster Avg: 1.152 -> 0.807: 42.65% faster Significant (t=169.789433, a=0.95) A similar patch for unpickling will follow. As issue 5670 and 5671 are committed, I'll update this patch to support them. This patch passes all the tests added in issue 5665. I would recommend reviewing that patch first. I'll port to py3k once this is reviewed for trunk. This patch is available on Rietveld at http://codereview.appspot.com/33070. ---------- components: Extension Modules files: cpickle_writes.patch keywords: needs review, patch messages: 85349 nosy: alexandre.vassalotti, collinwinter severity: normal stage: patch review status: open title: Speed up cPickle's pickling generally type: performance versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13603/cpickle_writes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 02:08:38 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 00:08:38 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> Message-ID: <1238803718.04.0.567572090377.issue5682@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Some comments: - there are some unrelated pickle changes in your patch - in Makefile.pre.in, it seems the IO_OBJS definition might need updating Otherwise I don't have any objections. Please note, when committing, it would be good to use "svn mv" for the actual moving of the files, so that their history can be followed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 02:13:15 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 04 Apr 2009 00:13:15 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> Message-ID: <1238803995.71.0.240911267759.issue5682@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Antoine, you're too quick. :-) By the way, the patch is fairly large due to the renaming. So, here's quick-and-dirty summary of the important changes. PCbuild/pythoncore.vcproj: Renamed the paths and added a tag for the _io directory. PC/VS7.1/pythoncore.vcproj: Same as above. PC/VS8.0/pythoncore.vcproj: Same as above. PC/VC6/pythoncore.dsp: Renamed the paths. Makefile.pre.in: Updated the path to _iomodule.h Modules/Setup.dist: Renamed the paths. Oh, my last patch had some junk for pickle. Here's a clean patch. ---------- Added file: http://bugs.python.org/file13604/move-iomodule-in-subdir-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 02:25:51 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Apr 2009 00:25:51 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1231175004.95.0.780150738153.issue4847@psf.upfronthosting.co.za> Message-ID: <1238804751.6.0.290832842577.issue4847@psf.upfronthosting.co.za> R. David Murray added the comment: Nope. Sorry I forgot to change the priority. ---------- priority: release blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 02:27:35 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 04 Apr 2009 00:27:35 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> Message-ID: <1238804855.48.0.853470730916.issue5682@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Antoine wrote: > - in Makefile.pre.in, it seems the IO_OBJS definition might need updating I updated the patch to also fix IO_OBJS. Also, I added stringio.c to IO_OBJS. > Please note, when committing, it would be good to use "svn mv" for the > actual moving of the files, so that their history can be followed. Yes, I used "svn move" to rename the file in my local checkout, but unfortunately "svn diff" doesn't support renames. ---------- Added file: http://bugs.python.org/file13605/move-iomodule-in-subdir-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 02:28:40 2009 From: report at bugs.python.org (Collin Winter) Date: Sat, 04 Apr 2009 00:28:40 +0000 Subject: [issue5634] cPickle error in case of recursion limit In-Reply-To: <1238534752.39.0.574212792554.issue5634@psf.upfronthosting.co.za> Message-ID: <1238804920.31.0.0131150852897.issue5634@psf.upfronthosting.co.za> Changes by Collin Winter : ---------- nosy: +collinwinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 02:28:43 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 04 Apr 2009 00:28:43 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> Message-ID: <1238804923.66.0.336937307328.issue5682@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13602/move-iomodule-in-subdir.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 02:28:49 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 04 Apr 2009 00:28:49 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> Message-ID: <1238804929.96.0.933406025248.issue5682@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13604/move-iomodule-in-subdir-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 02:31:27 2009 From: report at bugs.python.org (Collin Winter) Date: Sat, 04 Apr 2009 00:31:27 +0000 Subject: [issue3675] Python 2.6 can't read sets pickled with Python 3.0 In-Reply-To: <1219666544.55.0.587307324969.issue3675@psf.upfronthosting.co.za> Message-ID: <1238805087.32.0.638783867573.issue3675@psf.upfronthosting.co.za> Changes by Collin Winter : ---------- nosy: +collinwinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 02:31:47 2009 From: report at bugs.python.org (STINNER Victor) Date: Sat, 04 Apr 2009 00:31:47 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1238805107.75.0.280528709871.issue5391@psf.upfronthosting.co.za> STINNER Victor added the comment: #5666 is closed. I finally prefers getarg('c') (byte string of lenght 1). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 02:32:11 2009 From: report at bugs.python.org (Collin Winter) Date: Sat, 04 Apr 2009 00:32:11 +0000 Subject: [issue2389] Array pickling exposes internal memory representation of elements In-Reply-To: <1205851091.96.0.575523128038.issue2389@psf.upfronthosting.co.za> Message-ID: <1238805131.56.0.886868703234.issue2389@psf.upfronthosting.co.za> Changes by Collin Winter : ---------- nosy: +collinwinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 02:33:08 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 00:33:08 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> Message-ID: <1238805188.6.0.350201512513.issue5682@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think you can commit! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 02:36:09 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 04 Apr 2009 00:36:09 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> Message-ID: <1238805369.84.0.0551917522896.issue5682@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Have you tested PCbuild changes? As, this is the part I am the most unsure about. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 02:40:51 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 00:40:51 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238805369.84.0.0551917522896.issue5682@psf.upfronthosting.co.za> Message-ID: <1238805735.6517.50.camel@fsol> Antoine Pitrou added the comment: > Have you tested PCbuild changes? As, this is the part I am the most > unsure about. Ok, unless someone beats me to it, I'm gonna fire a Windows VM and test this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 02:55:03 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 00:55:03 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> Message-ID: <1238806503.93.0.506311699175.issue5682@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Some failures: _iomodule.c c1 : fatal error C1083: Impossible d'ouvrir le fichier source?: '..\..\Modules\_io\_iomodule.c'?: No such file or directory textio.c c1 : fatal error C1083: Impossible d'ouvrir le fichier source?: '..\..\Modules\_io\textio.c'?: No such file or directory iobase.c c1 : fatal error C1083: Impossible d'ouvrir le fichier source?: '..\..\Modules\_io\iobase.c'?: No such file or directory bufferedio.c c1 : fatal error C1083: Impossible d'ouvrir le fichier source?: '..\..\Modules\_io\bufferedio.c'?: No such file or directory stringio.c c1 : fatal error C1083: Impossible d'ouvrir le fichier source?: '..\..\Modules\_io\stringio.c'?: No such file or directory bytesio.c c1 : fatal error C1083: Impossible d'ouvrir le fichier source?: '..\..\Modules\_io\bytesio.c'?: No such file or directory fileio.c c1 : fatal error C1083: Impossible d'ouvrir le fichier source?: '..\..\Modules\_io\fileio.c'?: No such file or directory It looks like a mistake in file names (missing leading underscores, and a non-existent _iomodule.c instead of io.c). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 02:57:43 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 00:57:43 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> Message-ID: <1238806663.54.0.457274963905.issue5682@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Or perhaps these are really meant as the new file names? Initially I thought the purpose was initially to move the files into a subdir. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 03:10:00 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Apr 2009 01:10:00 +0000 Subject: [issue1633600] using locale does not display the intended behavior Message-ID: <1238807400.34.0.467486178592.issue1633600@psf.upfronthosting.co.za> R. David Murray added the comment: rdmurray at backup:~/trunk>echo $LC_ALL tr_TR rdmurray at backup:~/trunk>./python Python 2.7a0 (unknown, Apr 3 2009, 19:56:38) [GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import string >>> string.lowercase 'abcdefghijklmnopqrstuvwxyz' >>> string.letters 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' >>> import locale >>> locale.setlocale(locale.LC_ALL, '') 'tr_TR' >>> string.letters 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\xaa\xb5\xba\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff' >>> string.lowercase 'abcdefghijklmnopqrstuvwxyz\xb5\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff' >>> It's possible that the particular python version used in the bug report had a bug, but if so it is no longer a problem. Note that these attributes do not exist in the 3.x string module. For background on this decision see eg: http://www.mail-archive.com/python-3000 at python.org/msg06518.html). ---------- nosy: +r.david.murray resolution: -> works for me stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 03:13:44 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 01:13:44 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> Message-ID: <1238807624.83.0.788462192176.issue5682@psf.upfronthosting.co.za> Antoine Pitrou added the comment: After also renaming the files, there is a slight bug in PCbuild/pythoncore.vcproj. Here is a subpatch incorporating the changes to this only file. ---------- Added file: http://bugs.python.org/file13606/pythoncore.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 03:21:15 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 01:21:15 +0000 Subject: [issue5683] Speed up cPickle's pickling generally In-Reply-To: <1238803338.21.0.932870288543.issue5683@psf.upfronthosting.co.za> Message-ID: <1238808075.54.0.299800167263.issue5683@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 03:31:39 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Apr 2009 01:31:39 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1231175004.95.0.780150738153.issue4847@psf.upfronthosting.co.za> Message-ID: <1238808699.99.0.81717785675.issue4847@psf.upfronthosting.co.za> R. David Murray added the comment: > Is this about correct? Do any test cases need to be updated or added? I > notice that something called BytesIO is imported from io but not used. Were > some test cases removed which used to involve that class or is that a 2to3 > artifact? The set of test cases is almost exactly parallel between 2.7 and 3.1. 3.1 adds an additional DictReader test, and refactors one set of tests to make the code simpler. Other than that, it is just a matter of replacing the file opening and closing code that uses binary mode with 'with' statements where the open uses newline=''. BytesIO is not used so would appear to be a conversion artifact. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 03:33:55 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Apr 2009 01:33:55 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1231175004.95.0.780150738153.issue4847@psf.upfronthosting.co.za> Message-ID: <1238808835.1.0.750529167613.issue4847@psf.upfronthosting.co.za> R. David Murray added the comment: Oh, yeah, other 3.1 differences are that the unicode test is uncommented and updated, and a test is added to make sure nulls are handled correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 03:46:54 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 04 Apr 2009 01:46:54 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> Message-ID: <1238809614.67.0.945618114106.issue5682@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Thanks! Here is the updated patch. ---------- Added file: http://bugs.python.org/file13607/move-iomodule-in-subdir-4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 03:48:03 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Apr 2009 01:48:03 +0000 Subject: [issue4847] csv fails when file is opened in binary mode In-Reply-To: <1231175004.95.0.780150738153.issue4847@psf.upfronthosting.co.za> Message-ID: <1238809683.89.0.874484816107.issue4847@psf.upfronthosting.co.za> R. David Murray added the comment: Doc patch applied in r71116. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 04:08:51 2009 From: report at bugs.python.org (Tony Nelson) Date: Sat, 04 Apr 2009 02:08:51 +0000 Subject: [issue1079] decode_header does not follow RFC 2047 In-Reply-To: <1188637019.25.0.0476259625696.issue1079@psf.upfronthosting.co.za> Message-ID: <1238810931.84.0.362768728642.issue1079@psf.upfronthosting.co.za> Tony Nelson added the comment: I think the problem is best viewed as headers are not being parsed according to RFC2822 and decoded after that, so the recognition of encoded words should be looser, and not require whitespace around them, as it is not required in all contexts. Patch and test, tested on 2.6.1, 2.7trunk. The test mostly just reverses the sense of test_rfc2047_without_whitespace(). ---------- keywords: +patch nosy: +barry, tony_nelson versions: +Python 2.6, Python 2.7 Added file: http://bugs.python.org/file13608/header_encwd_nows.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 04:12:06 2009 From: report at bugs.python.org (Tony Nelson) Date: Sat, 04 Apr 2009 02:12:06 +0000 Subject: [issue4491] email.Header.decode_header() doesn't work if encoded-word was separeted by CRLF In-Reply-To: <1228234559.58.0.381415224429.issue4491@psf.upfronthosting.co.za> Message-ID: <1238811126.82.0.184335541939.issue4491@psf.upfronthosting.co.za> Tony Nelson added the comment: See patch in issue1079. I don't think email.header can require whitespace until it decodes parsed headers, as whitespace is not always required. ---------- nosy: +barry, tony_nelson versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 04:13:53 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 04 Apr 2009 02:13:53 +0000 Subject: [issue5645] test_memoryio fails for py3k on windows In-Reply-To: <1238586810.86.0.465926636353.issue5645@psf.upfronthosting.co.za> Message-ID: <1238811233.51.0.911495113235.issue5645@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I'm sure, but with following test code, def run(module): print("///////////////////////////////") print("//", module) memio = module.StringIO(newline=None) # The C StringIO decodes newlines in write() calls, but the Python # implementation only does when reading. This function forces them to # be decoded for testing. def force_decode(): memio.seek(0) print("-------->", repr(memio.getvalue())) memio.seek(0) print("========>", repr(memio.read())) def print_newlines(): print(repr(memio.newlines)) print_newlines() # None memio.write("a\n") force_decode() print_newlines() # "\n" memio.write("b\r\n") force_decode() print_newlines() # ("\n", "\r\n") memio.write("c\rd") force_decode() print_newlines() # ("\r", "\n", "\r\n") def main(): import _pyio, _io run(_pyio) run(_io) if __name__ == '__main__': main() //--------------------------------------------- I get result /////////////////////////////// // 'a\r\n' ========> 'a\n' '\r\n' --------> 'a\r\nb\r\r\n' ========> 'a\nb\n\n' ('\r', '\r\n') --------> 'a\r\nb\r\r\nc\rd' ========> 'a\nb\n\nc\nd' ('\r', '\r\n') /////////////////////////////// // None --------> 'a\n' ========> 'a\n' '\n' --------> 'a\nb\n' ========> 'a\nb\n' ('\n', '\r\n') --------> 'a\nb\nc\nd' ========> 'a\nb\nc\nd' ('\r', '\n', '\r\n') //--------------------------------------------- Maybe universal new line decode behavior is inverse between _pyio and _io? That is, _pyio's write() converts '\n' to platform new line, and _io's write() converts platform new line to '\n'. ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 04:19:54 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Apr 2009 02:19:54 +0000 Subject: [issue1169679] modules missing from list of Carbon modules Message-ID: <1238811594.33.0.215133469734.issue1169679@psf.upfronthosting.co.za> R. David Murray added the comment: Duplicate of 896199, fixed in r70719. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Some Carbon modules missing from documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 04:23:17 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 04 Apr 2009 02:23:17 +0000 Subject: [issue5645] test_memoryio fails for py3k on windows In-Reply-To: <1238586810.86.0.465926636353.issue5645@psf.upfronthosting.co.za> Message-ID: <1238811797.46.0.662117868455.issue5645@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 06:23:55 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Apr 2009 04:23:55 +0000 Subject: [issue1680159] Misleading exception from unicode.__contains__ Message-ID: <1238819035.69.0.958758075288.issue1680159@psf.upfronthosting.co.za> R. David Murray added the comment: Still gives the same message in 2.7a0. Looks to be simple enough to fix: just stop masking the UnicodeDecode and TypeError messages produced by the PyUnicode_FromObject call in the PyUnicode_Contains method. Test and patch attached. If you have no objection, Mark, I'll apply it. ---------- components: +Interpreter Core -Unicode keywords: +patch nosy: +r.david.murray stage: -> commit review type: -> behavior versions: +Python 2.6, Python 2.7 Added file: http://bugs.python.org/file13609/Issue1680159.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 06:45:41 2009 From: report at bugs.python.org (Aki) Date: Sat, 04 Apr 2009 04:45:41 +0000 Subject: [issue5527] multiprocessing won't work with Tkinter (under Linux) In-Reply-To: <1237574081.02.0.0677822756927.issue5527@psf.upfronthosting.co.za> Message-ID: <1238820340.73.0.0843938131934.issue5527@psf.upfronthosting.co.za> Aki added the comment: Hello Jani Hakala, Thank you for your suggestions. Yes, from Tkconstants import * would ease the pain. The second suggestion, importing gui in another file didn't work well with my code as I'm using a class to host both gui process and non-gui process such that separating gui into another class will create another problem. The first suggestion worked ... almost. I needed to import a bunch of Tkinter related modules in not only gui() but also other call back methods. It solves the problem but the code became pretty messy. It would be nice if the problem is solved so that I don't need to resort to these workarounds. It is a bit frustrating as things work flawlessly under Solaris. I will play around trying to find a bit nicer workaround. Thank you! Aki- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 08:10:29 2009 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 04 Apr 2009 06:10:29 +0000 Subject: [issue5110] Printing Unicode chars from the interpreter in a non-UTF8 terminal raises an error (Py3) In-Reply-To: <1233329209.55.0.55287436123.issue5110@psf.upfronthosting.co.za> Message-ID: <1238825429.52.0.82379650006.issue5110@psf.upfronthosting.co.za> Ezio Melotti added the comment: What I'm proposing is not to change the default error handler to 'backslashreplace', but just the behavior of sys.displayhook. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 08:18:59 2009 From: report at bugs.python.org (Ismail Donmez) Date: Sat, 04 Apr 2009 06:18:59 +0000 Subject: [issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6 In-Reply-To: <1236517160.74.0.61108619715.issue5442@psf.upfronthosting.co.za> Message-ID: <1238825939.26.0.451341208145.issue5442@psf.upfronthosting.co.za> Ismail Donmez added the comment: Sure thing, I am waiting for alpha2. Regards. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 08:32:14 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sat, 04 Apr 2009 06:32:14 +0000 Subject: [issue3851] IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered. In-Reply-To: <1221250835.7.0.322524713176.issue3851@psf.upfronthosting.co.za> Message-ID: <1238826734.38.0.667956936587.issue3851@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: This wasn't backported to 2.5 as it's trivial and life is short. I have a clean install of 3.0.1 from the msi installer, running on an eeePC 1000HA, XP Home, tk 8.5. If I type a string at the >>> prompt in the IDLE shell and hit the home key, the cursor goes to the left of the string. A second press puts it at the left margin. Subseqent presses toggle. I suggest you do a clean install. I get the same result on Linux and XP, for 2.6.1, 3.0.1, 2. HEAD, and 3. HEAD. If you look at EditorWindow.py:282 in 3.0.1 you can see the fix. Please check yours. Are you saying you have 2.6.1 and 3.0.1 installed and they act differently? Do they both show the same version for Tk? Please try to find out why 2.6 and 3.0 act differently on your machine! ---------- resolution: -> works for me status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 08:47:00 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Apr 2009 06:47:00 +0000 Subject: [issue5678] typo in future_builtins documentation In-Reply-To: <1238766256.3.0.595291754287.issue5678@psf.upfronthosting.co.za> Message-ID: <1238827620.32.0.939211209643.issue5678@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks. Fixed in r71123. ---------- nosy: +r.david.murray priority: -> low resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior versions: -Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 08:51:09 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sat, 04 Apr 2009 06:51:09 +0000 Subject: [issue3851] IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered. In-Reply-To: <1221250835.7.0.322524713176.issue3851@psf.upfronthosting.co.za> Message-ID: <1238827869.08.0.424266379996.issue3851@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: Weeble found the problem: it's the numlock key interacting with a bug. I can reproduce it when I latch numlock. http://bugs.python.org/msg80478 ---------- nosy: +weeble resolution: works for me -> accepted status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 08:56:51 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sat, 04 Apr 2009 06:56:51 +0000 Subject: [issue4676] python3 closes + home keys In-Reply-To: <1229456623.89.0.997761344417.issue4676@psf.upfronthosting.co.za> Message-ID: <1238828211.42.0.624275746255.issue4676@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: Thanks for the research on the home key toggle. Let's take that to issue3851, it seems it's different from the rest of this issue. ---------- nosy: +kbk superseder: -> IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 09:24:52 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Apr 2009 07:24:52 +0000 Subject: [issue5674] distutils fails to find Linux libs (lib.....so.n) In-Reply-To: <1238707356.06.0.784964091736.issue5674@psf.upfronthosting.co.za> Message-ID: <1238829892.9.0.534365294446.issue5674@psf.upfronthosting.co.za> R. David Murray added the comment: Are you sure it isn't your Fedora installation that has the problem? My understanding is that the linker name (the libxxx.so name) should exist and be a symbolic link to the most recent soname (libxxx.N). So I think distutils is doing the right thing. See for example http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html, the first section of which (I didn't read the whole thing) matches my understanding of how this works. Do you have any doc pointers that says Fedora doesn't work this way? (Note that the libxxx.so linker name may not be in the same directory as the sonames or the actual library files.) ---------- nosy: +r.david.murray priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 09:34:51 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Apr 2009 07:34:51 +0000 Subject: [issue459007] Document sys.path on Windows Message-ID: <1238830491.21.0.730647501126.issue459007@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- keywords: +easy versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 09:35:45 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sat, 04 Apr 2009 07:35:45 +0000 Subject: [issue1529142] Allowing multiple instances of IDLE with sub-processes Message-ID: <1238830545.21.0.934820932234.issue1529142@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: r71126. Thanks to everyone for all the work on this! Note: I still need to patch the Windows install to bind .py files to a different command string. The -e option now only opens an editor window, but I need to remove the -n option. ---------- resolution: -> accepted status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 09:39:11 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sat, 04 Apr 2009 07:39:11 +0000 Subject: [issue1757831] Allow opening just an editor window Message-ID: <1238830751.48.0.558591750718.issue1757831@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: r71126 -e only opens edit window, not shell ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sat Apr 4 10:17:11 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sat, 04 Apr 2009 08:17:11 +0000 Subject: [issue5257] test_zipfle and test_distutils write in the test directories In-Reply-To: <1234610432.5.0.115375457394.issue5257@psf.upfronthosting.co.za> Message-ID: <1238833031.48.0.974459488443.issue5257@psf.upfronthosting.co.za> Tarek Ziad? added the comment: done in distutils, will open a specific issue for zip. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sat Apr 4 10:19:50 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sat, 04 Apr 2009 08:19:50 +0000 Subject: [issue5684] test_zipfile writes in its test directory In-Reply-To: <1238833190.77.0.866792563675.issue5684@psf.upfronthosting.co.za> Message-ID: <1238833190.77.0.866792563675.issue5684@psf.upfronthosting.co.za> New submission from Tarek Ziad? : test_zipfile writes in its test directory, which can be a problem if this directory is read-only in some installations. ---------- messages: 85382 nosy: tarek priority: low severity: normal status: open title: test_zipfile writes in its test directory type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sat Apr 4 10:21:25 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sat, 04 Apr 2009 08:21:25 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1238833285.68.0.394492585066.issue2953@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- priority: -> normal versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sat Apr 4 10:24:29 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sat, 04 Apr 2009 08:24:29 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1238833469.27.0.958661587438.issue4015@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- priority: -> normal type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sat Apr 4 10:25:21 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sat, 04 Apr 2009 08:25:21 +0000 Subject: [issue5616] Distutils 2to3 support doesn't have the doctest_only flag. In-Reply-To: <1238452498.24.0.140926416369.issue5616@psf.upfronthosting.co.za> Message-ID: <1238833521.94.0.250291311882.issue5616@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- priority: -> normal _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sat Apr 4 10:27:24 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sat, 04 Apr 2009 08:27:24 +0000 Subject: [issue5302] Allow package_data globs match directories In-Reply-To: <1234909934.56.0.127417684931.issue5302@psf.upfronthosting.co.za> Message-ID: <1238833644.27.0.93342731346.issue5302@psf.upfronthosting.co.za> Tarek Ziad? added the comment: After some discussion at Pycon, I was convinced that MANIFEST.in should be removed. I'll send a mail about this in Distutils-SIG and if there's a consensus, I'll deprecate it and also add glob pattern for package_data. ---------- priority: -> high versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sat Apr 4 10:31:40 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sat, 04 Apr 2009 08:31:40 +0000 Subject: [issue5685] use tarinfo module in distutils In-Reply-To: <1238833900.11.0.222660239752.issue5685@psf.upfronthosting.co.za> Message-ID: <1238833900.11.0.222660239752.issue5685@psf.upfronthosting.co.za> New submission from Tarek Ziad? : Currently, Distutils makes a system call to tar files, using the tar command. Let's use Python's tarinfo module, so we don't rely on the tar program anymore. ---------- assignee: tarek components: Distutils messages: 85384 nosy: tarek priority: high severity: normal status: open title: use tarinfo module in distutils type: behavior versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 12:51:16 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 10:51:16 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> Message-ID: <1238842276.37.0.63884459003.issue5682@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You should commit. If there is a problem with other Windows build files, it will certainly be noticed and fixed by a true Windows developer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 13:02:35 2009 From: report at bugs.python.org (STINNER Victor) Date: Sat, 04 Apr 2009 11:02:35 +0000 Subject: [issue5110] Printing Unicode chars from the interpreter in a non-UTF8 terminal raises an error (Py3) In-Reply-To: <1233329209.55.0.55287436123.issue5110@psf.upfronthosting.co.za> Message-ID: <1238842955.44.0.987348912245.issue5110@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 14:20:17 2009 From: report at bugs.python.org (Eric Smith) Date: Sat, 04 Apr 2009 12:20:17 +0000 Subject: [issue5686] Float formatting with no type code produces incorrect output for exponential notation In-Reply-To: <1238847617.81.0.331181634269.issue5686@psf.upfronthosting.co.za> Message-ID: <1238847617.81.0.331181634269.issue5686@psf.upfronthosting.co.za> New submission from Eric Smith : If no format specifier is supplied to a float, it's supposed to work like 'g', but with at least one digit after the decimal. This works for non-exponential notation: >>> format(1., '') '1.0' >>> format(1., 'g') '1' But for exponential notation, it does not: >>> format(1e200, '') '1e+200' >>> >>> format(1e200, 'g') '1e+200' ---------- assignee: eric.smith components: Interpreter Core messages: 85386 nosy: eric.smith severity: normal status: open title: Float formatting with no type code produces incorrect output for exponential notation versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 14:20:39 2009 From: report at bugs.python.org (Eric Smith) Date: Sat, 04 Apr 2009 12:20:39 +0000 Subject: [issue5686] Float formatting with no type code produces incorrect output for exponential notation In-Reply-To: <1238847617.81.0.331181634269.issue5686@psf.upfronthosting.co.za> Message-ID: <1238847639.22.0.868382239497.issue5686@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 14:23:23 2009 From: report at bugs.python.org (Eric Smith) Date: Sat, 04 Apr 2009 12:23:23 +0000 Subject: [issue5686] Float formatting with no type code produces incorrect output for exponential notation In-Reply-To: <1238847617.81.0.331181634269.issue5686@psf.upfronthosting.co.za> Message-ID: <1238847803.27.0.825340257191.issue5686@psf.upfronthosting.co.za> Eric Smith added the comment: The documentation doesn't agree with the PEP. The docs at http://docs.python.org/library/string.html#formatstrings just say '' is the same as 'g'. It does not draw a distinction between exponential and fixed output. The PEP has the "at least one digit after the decimal" language. It also does not draw a distinction between exponential and fixed output. ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 14:30:57 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 12:30:57 +0000 Subject: [issue5645] test_memoryio fails for py3k on windows In-Reply-To: <1238586810.86.0.465926636353.issue5645@psf.upfronthosting.co.za> Message-ID: <1238848257.1.0.274874577184.issue5645@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It looks like there is a disagreement between c-io and py-io as to what the newline parameter in StringIO means. I think the c-io version makes more sense (but I'm biased, since I wrote it), while the py-io results are quite difficult to interpret. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 14:36:57 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 12:36:57 +0000 Subject: [issue5645] test_memoryio fails for py3k on windows In-Reply-To: <1238586810.86.0.465926636353.issue5645@psf.upfronthosting.co.za> Message-ID: <1238848617.1.0.109512831544.issue5645@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Can you test with the following patch? ---------- keywords: +patch Added file: http://bugs.python.org/file13610/memio.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 14:52:58 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 12:52:58 +0000 Subject: [issue5645] test_memoryio fails for py3k on windows In-Reply-To: <1238586810.86.0.465926636353.issue5645@psf.upfronthosting.co.za> Message-ID: <1238849578.28.0.605056249065.issue5645@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Buildbots should be green for the release. ---------- priority: -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 14:53:14 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 12:53:14 +0000 Subject: [issue5645] test_memoryio fails for py3k on windows In-Reply-To: <1238586810.86.0.465926636353.issue5645@psf.upfronthosting.co.za> Message-ID: <1238849594.67.0.747348109544.issue5645@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 15:14:27 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 04 Apr 2009 13:14:27 +0000 Subject: [issue5686] Float formatting with no type code produces incorrect output for exponential notation In-Reply-To: <1238847617.81.0.331181634269.issue5686@psf.upfronthosting.co.za> Message-ID: <1238850867.72.0.0715678895152.issue5686@psf.upfronthosting.co.za> Mark Dickinson added the comment: I don't really see this as a bug in the behaviour. I'd always understood the purpose of the "at least one digit after the decimal" to be to make it possible to visually distinguish floats and integers, in the same way that repr and str already do. >>> repr(1e100) '1e+100' >>> repr(1e5) '100000.0' If an exponent's present then the string's already clearly not an integer, so there's no need for the '.0'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 15:34:26 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 04 Apr 2009 13:34:26 +0000 Subject: [issue5687] Docstring typo in _io Message-ID: <1238852066.0.0.111619925707.issue5687@psf.upfronthosting.co.za> Changes by Brian Quinlan : ---------- components: Extension Modules files: docstring.diff keywords: patch nosy: bquinlan severity: normal status: open title: Docstring typo in _io versions: Python 3.1 Added file: http://bugs.python.org/file13611/docstring.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 15:39:35 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 04 Apr 2009 13:39:35 +0000 Subject: [issue5634] cPickle error in case of recursion limit In-Reply-To: <1238534752.39.0.574212792554.issue5634@psf.upfronthosting.co.za> Message-ID: <1238852375.43.0.732729421738.issue5634@psf.upfronthosting.co.za> Georg Brandl added the comment: Yes, that's true. It should be more generally helpful in there. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 15:42:45 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 04 Apr 2009 13:42:45 +0000 Subject: [issue5642] multiprocessing.Pool.map() docs slightly misleading In-Reply-To: <1238579388.2.0.737750854681.issue5642@psf.upfronthosting.co.za> Message-ID: <1238852565.19.0.810107379927.issue5642@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r71149. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 15:46:00 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 04 Apr 2009 13:46:00 +0000 Subject: [issue5601] webbrowser doesn't just open browsers In-Reply-To: <1238384777.3.0.774822780209.issue5601@psf.upfronthosting.co.za> Message-ID: <1238852760.32.0.857930506977.issue5601@psf.upfronthosting.co.za> Georg Brandl added the comment: Updated docs in r71150. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 16:07:38 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 04 Apr 2009 14:07:38 +0000 Subject: [issue5645] test_memoryio fails for py3k on windows In-Reply-To: <1238586810.86.0.465926636353.issue5645@psf.upfronthosting.co.za> Message-ID: <1238854058.17.0.382692294388.issue5645@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I confirmed the patch works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 16:10:03 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 14:10:03 +0000 Subject: [issue5645] test_memoryio fails for py3k on windows In-Reply-To: <1238586810.86.0.465926636353.issue5645@psf.upfronthosting.co.za> Message-ID: <1238854203.23.0.572438074143.issue5645@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r71151, thanks! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 16:34:05 2009 From: report at bugs.python.org (Matthias Klose) Date: Sat, 04 Apr 2009 14:34:05 +0000 Subject: [issue3845] memory access before short string when checking suffix In-Reply-To: <1221221516.48.0.283023383502.issue3845@psf.upfronthosting.co.za> Message-ID: <1238855645.53.0.955953939317.issue3845@psf.upfronthosting.co.za> Matthias Klose added the comment: fixed for 2.7, 2.6, 3.1 ---------- assignee: -> doko resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 16:48:32 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 04 Apr 2009 14:48:32 +0000 Subject: [issue4375] inspect.getsource doesn't work with PYTHONPATH and source compiled from a different dir In-Reply-To: <1227261204.44.0.0137459794576.issue4375@psf.upfronthosting.co.za> Message-ID: <1238856512.15.0.96788910792.issue4375@psf.upfronthosting.co.za> Georg Brandl added the comment: Easily done. :) ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 17:06:22 2009 From: report at bugs.python.org (Michael Foord) Date: Sat, 04 Apr 2009 15:06:22 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238857582.51.0.946630342732.issue2578@psf.upfronthosting.co.za> Michael Foord added the comment: I'd like to add assertIs and assertNotIs. We have these at work and I would find them useful whilst writing tests for another set of changes to unittest I'm currently working on! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 17:10:41 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 15:10:41 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1238857582.51.0.946630342732.issue2578@psf.upfronthosting.co.za> Message-ID: <1238857927.6865.2.camel@fsol> Antoine Pitrou added the comment: Le samedi 04 avril 2009 ? 15:06 +0000, Michael Foord a ?crit : > Michael Foord added the comment: > > I'd like to add assertIs and assertNotIs. Let's call it AssertIsNot (we type "x is not None", not "x not is None"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 17:12:17 2009 From: report at bugs.python.org (Michael Foord) Date: Sat, 04 Apr 2009 15:12:17 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238857937.23.0.99583328841.issue2578@psf.upfronthosting.co.za> Michael Foord added the comment: I would *mmuch* prefer assertIsNot but it is not symmetrical with the other asserts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 17:29:21 2009 From: report at bugs.python.org (Matthias Klose) Date: Sat, 04 Apr 2009 15:29:21 +0000 Subject: [issue5688] inability to ignore multiline warnings -- request to add re.DOTALL to re.compile In-Reply-To: <1238858961.61.0.698895898394.issue5688@psf.upfronthosting.co.za> Message-ID: <1238858961.61.0.698895898394.issue5688@psf.upfronthosting.co.za> New submission from Matthias Klose : [forwarded from http://bugs.debian.org/519454] """ As of now, warnings.py provides only re.I flag to re.compile on warnings.py:160. Recent python-numpy issues way too many warnings, I was trying to filter them out using warnings.filterwarnings, but was unable to filter out multiline warning (numpy.histogram). Adding re.DOTALL to re.I should help to resolve the problem and allow users to match also multiline warning messages. """ ---------- messages: 85402 nosy: doko severity: normal status: open title: inability to ignore multiline warnings -- request to add re.DOTALL to re.compile type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 17:50:59 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 04 Apr 2009 15:50:59 +0000 Subject: [issue5142] pdb feature request: Ability to skip standard lib modules and other selected packages/modules In-Reply-To: <1233669109.05.0.519121201366.issue5142@psf.upfronthosting.co.za> Message-ID: <1238860259.57.0.262949334758.issue5142@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> georg.brandl nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 17:51:05 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 04 Apr 2009 15:51:05 +0000 Subject: [issue5687] Docstring typo in _io Message-ID: <1238860265.66.0.671126049058.issue5687@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> georg.brandl nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 18:08:35 2009 From: report at bugs.python.org (Matthias Klose) Date: Sat, 04 Apr 2009 16:08:35 +0000 Subject: [issue5689] please support lzma compression as an extension and in the tarfile module In-Reply-To: <1238861315.81.0.348941469726.issue5689@psf.upfronthosting.co.za> Message-ID: <1238861315.81.0.348941469726.issue5689@psf.upfronthosting.co.za> New submission from Matthias Klose : GNU tar now supports lzma compression as a compression method. Please consider adding lzma support to the tarfile module (either by using the external lzma program or by adding a lzma extension to the standard library). lzma extension at http://svn.fancycode.com/repos/python/pylzma/trunk/ lzma is used in many tools (7zip, dpkg, rpm), offers faster decompression than bzip2, slower compression than gzip and bzip2. ---------- components: Extension Modules messages: 85403 nosy: doko severity: normal status: open title: please support lzma compression as an extension and in the tarfile module type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 18:10:35 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 16:10:35 +0000 Subject: [issue5689] please support lzma compression as an extension and in the tarfile module In-Reply-To: <1238861315.81.0.348941469726.issue5689@psf.upfronthosting.co.za> Message-ID: <1238861435.89.0.400718696329.issue5689@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- priority: -> normal versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 18:10:44 2009 From: report at bugs.python.org (Michael Foord) Date: Sat, 04 Apr 2009 16:10:44 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238861444.89.0.426269303954.issue5679@psf.upfronthosting.co.za> Michael Foord added the comment: Patch attached. No docs, if it is agreed I can apply I'll write docs. After a long discussion we arrived at some semblance of consensus on the Testing In Python mailing list that this was a good thing (tm). Only one -1 (thought that cleanUp should be a method) and Holger Krekel was only +0 because he thinks changes in unittest should be conservative (but he isn't actually using it). Many others were +1 - Fred Drake, Titus Brown, Laura Creighton, Robert Collins, Jonathan Lange, Kumar McMillan and others. It provides a clean and simple pattern for the cleaning up of resources - avoiding the need for nested try finallys and the manual tracking of resources. It can also avoid the need for duplication of cleanup code. ---------- keywords: +patch Added file: http://bugs.python.org/file13612/unittest-cleanup.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 18:40:55 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 16:40:55 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1238857937.23.0.99583328841.issue2578@psf.upfronthosting.co.za> Message-ID: <1238863342.6865.3.camel@fsol> Antoine Pitrou added the comment: > I would *mmuch* prefer assertIsNot but it is not symmetrical with the > other asserts. Well, apparently assertIsNotNone() has been added, so it would be good to be symmetrical with that :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 18:41:00 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Apr 2009 16:41:00 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238863260.82.0.991744815773.issue2578@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I found while merging this to Py3k that dicts can't be used in assertSameElements because they are unorderable in py3k. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 18:42:24 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 16:42:24 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238863344.27.0.18858758679.issue5679@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure why it is called after tearDown. It would be better to call it before tearDown, so that test cases can also use it to initialize additional resources and finalize them in a LIFO way wrt the main tearDown. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 18:50:49 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Apr 2009 16:50:49 +0000 Subject: [issue5470] MSI installer misses zipdir.zip file in Lib\test In-Reply-To: <1236704713.71.0.795823631214.issue5470@psf.upfronthosting.co.za> Message-ID: <1238863849.13.0.800186754706.issue5470@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I don't think I'm going to let this block today's release. Martin, I assume you can just apply the patch locally when you are building the installers? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 18:54:38 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 16:54:38 +0000 Subject: [issue5690] test_types fails under Windows In-Reply-To: <1238864078.6.0.552957987991.issue5690@psf.upfronthosting.co.za> Message-ID: <1238864078.6.0.552957987991.issue5690@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Compiled with VS 2008 Express: test test_types failed -- Traceback (most recent call last): File "Z:\py3k\__svn__\lib\test\test_types.py", line 343, in test_int__format__ test(1234, ',', '1,234') File "Z:\py3k\__svn__\lib\test\test_types.py", line 235, in test self.assertEqual(i.__format__(format_spec), result) AssertionError: '1234\x00' != '1,234' ---------- components: Tests messages: 85409 nosy: benjamin.peterson, pitrou priority: release blocker severity: normal stage: needs patch status: open title: test_types fails under Windows type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 18:56:48 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 16:56:48 +0000 Subject: [issue5410] msvcrt bytes cleanup In-Reply-To: <1236081375.11.0.544682804494.issue5410@psf.upfronthosting.co.za> Message-ID: <1238864208.0.0.317909565476.issue5410@psf.upfronthosting.co.za> Antoine Pitrou added the comment: There seems to be a problem with ungetwch(): >>> s = msvcrt.getwch() # Here I type the Euro sign (?) >>> ascii(s) "'\\u20ac'" >>> msvcrt.ungetwch(s) >>> u = msvcrt.getwch() >>> ascii(u) "'\\xac'" ---------- nosy: +pitrou type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 19:07:25 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 17:07:25 +0000 Subject: [issue5691] test_collections fails under Windows In-Reply-To: <1238864845.26.0.288121922542.issue5691@psf.upfronthosting.co.za> Message-ID: <1238864845.26.0.288121922542.issue5691@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This is under Windows XP with VS 2008 Express: test test_collections failed -- Traceback (most recent call last): File "Z:\py3k\__svn__\lib\test\test_collections.py", line 714, in test_equalit y self.assertNotEqual(od1, od2) # different order implies inequality AssertionError: OrderedDict([('f', 6), ('e', 5), ('a', 3), ('b', 2), ('c', 1), ( 'd', 4)]) == OrderedDict([('a', 3), ('b', 2), ('c', 1), ('d', 4), ('f', 6), ('e' , 5)]) ---------- components: Tests messages: 85411 nosy: pitrou, rhettinger priority: release blocker severity: normal stage: needs patch status: open title: test_collections fails under Windows type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 19:10:30 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Apr 2009 17:10:30 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1238865030.08.0.67399419725.issue5391@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r71174. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 19:11:24 2009 From: report at bugs.python.org (Michael Foord) Date: Sat, 04 Apr 2009 17:11:24 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238865084.18.0.725356578921.issue5679@psf.upfronthosting.co.za> Michael Foord added the comment: I'm agnostic on before / after tearDown, so happy to make that change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 19:14:45 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Apr 2009 17:14:45 +0000 Subject: [issue5690] test_types fails under Windows In-Reply-To: <1238864078.6.0.552957987991.issue5690@psf.upfronthosting.co.za> Message-ID: <1238865285.95.0.678832407574.issue5690@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 19:17:13 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 17:17:13 +0000 Subject: [issue5692] test_zipfile fails under Windows In-Reply-To: <1238865433.18.0.587625961619.issue5692@psf.upfronthosting.co.za> Message-ID: <1238865433.18.0.587625961619.issue5692@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Under Windows XP with VS 2008 Express: test test_zipfile failed -- Traceback (most recent call last): File "Z:\py3k\__svn__\lib\test\test_zipfile.py", line 334, in testExtract self.assertEqual(writtenfile, correctfile) AssertionError: 'c:_ziptest1' != 'c:\\_ziptest1' ---------- components: Tests messages: 85414 nosy: pitrou priority: release blocker severity: normal status: open title: test_zipfile fails under Windows type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 19:27:15 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Apr 2009 17:27:15 +0000 Subject: [issue5691] test_collections fails under Windows In-Reply-To: <1238864845.26.0.288121922542.issue5691@psf.upfronthosting.co.za> Message-ID: <1238866035.88.0.744450343535.issue5691@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r71176. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 19:27:19 2009 From: report at bugs.python.org (Michael Foord) Date: Sat, 04 Apr 2009 17:27:19 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238866039.14.0.69544223105.issue2578@psf.upfronthosting.co.za> Michael Foord added the comment: Patch with assertIs and assertIsNot. Docs but nothing in NEWS as already covered. Ok to apply? ---------- Added file: http://bugs.python.org/file13613/unittest-assertis.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 19:37:33 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 17:37:33 +0000 Subject: [issue5691] test_collections fails under Windows In-Reply-To: <1238866035.88.0.744450343535.issue5691@psf.upfronthosting.co.za> Message-ID: <1238866737.6865.4.camel@fsol> Antoine Pitrou added the comment: > Fixed in r71176. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 19:51:13 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 04 Apr 2009 17:51:13 +0000 Subject: [issue5690] test_types fails under Windows In-Reply-To: <1238864078.6.0.552957987991.issue5690@psf.upfronthosting.co.za> Message-ID: <1238867473.02.0.598684959403.issue5690@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I got SEGV on test_types on VC6, but after clean build, it seems SEGV was gone. Maybe build problem? ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Apr 4 19:58:45 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Sat, 04 Apr 2009 17:58:45 +0000 Subject: [issue5672] Implement a way to change the python process name In-Reply-To: <1238701084.1.0.0781987214897.issue5672@psf.upfronthosting.co.za> Message-ID: <1238867925.57.0.851163580257.issue5672@psf.upfronthosting.co.za> Martin v. L?wis added the comment: If somebody would provide a patch that adds prctl to the posix module, that would be fine with me - we have a long tradition of exposing all available system calls if somebody wants them. As for Windows: no, there is no equivalent of prctl. The task manager often displays the Window title, or else the name of the executable module. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 20:07:47 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 18:07:47 +0000 Subject: [issue5690] test_types fails under Windows In-Reply-To: <1238864078.6.0.552957987991.issue5690@psf.upfronthosting.co.za> Message-ID: <1238868467.91.0.383081602623.issue5690@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Actually, it works in debug mode, but not in release mode. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Apr 4 20:10:05 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Sat, 04 Apr 2009 18:10:05 +0000 Subject: [issue5674] distutils fails to find Linux libs (lib.....so.n) In-Reply-To: <1238707356.06.0.784964091736.issue5674@psf.upfronthosting.co.za> Message-ID: <1238868605.65.0.402478750646.issue5674@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I agree with David. The .so name must exist; if it doesn't, your installation does indeed lack the necessary prerequisite. Closing as invalid. ---------- nosy: +loewis resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 20:18:23 2009 From: report at bugs.python.org (Michael Foord) Date: Sat, 04 Apr 2009 18:18:23 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238869103.8.0.170056097857.issue2578@psf.upfronthosting.co.za> Michael Foord added the comment: Patch for Py3k with fallback for comparing unsortable sequences in assertSameElements. Removed the expected failure and added another test case to confirm that this patch works for unsortable sequences that are the same (no fail) and different (fail). ---------- Added file: http://bugs.python.org/file13614/unittest-sameelements.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 20:20:33 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 18:20:33 +0000 Subject: [issue5690] test_types fails in non-debug mopde In-Reply-To: <1238864078.6.0.552957987991.issue5690@psf.upfronthosting.co.za> Message-ID: <1238869233.38.0.25541818679.issue5690@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, actually it also happens under Linux in non-debug mode. ---------- title: test_types fails under Windows -> test_types fails in non-debug mopde _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 20:20:46 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 18:20:46 +0000 Subject: [issue5690] test_types fails in non-debug mode In-Reply-To: <1238864078.6.0.552957987991.issue5690@psf.upfronthosting.co.za> Message-ID: <1238869246.53.0.324769365656.issue5690@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- title: test_types fails in non-debug mopde -> test_types fails in non-debug mode _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Apr 4 20:36:38 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Sat, 04 Apr 2009 18:36:38 +0000 Subject: [issue5689] please support lzma compression as an extension and in the tarfile module In-Reply-To: <1238861315.81.0.348941469726.issue5689@psf.upfronthosting.co.za> Message-ID: <1238870198.73.0.892189424401.issue5689@psf.upfronthosting.co.za> Martin v. L?wis added the comment: As for an lzma module - I would prefer one that isn't LGPL'ed. Instead, it should link against a system-provide lzma library (which then might or might not licensed under lpgl). I would probably exclude the lzma module from Windows, as distributing the lzma sources along with the Python binaries is too painful. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Apr 4 20:54:06 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Sat, 04 Apr 2009 18:54:06 +0000 Subject: [issue5470] MSI installer misses zipdir.zip file in Lib\test In-Reply-To: <1236704713.71.0.795823631214.issue5470@psf.upfronthosting.co.za> Message-ID: <1238871246.3.0.35140180958.issue5470@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Tim, thanks for the patch. Applied in r71179, r71180, r71181 and r71182. Hope it still goes into the tag. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 20:58:32 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Apr 2009 18:58:32 +0000 Subject: [issue5410] msvcrt bytes cleanup In-Reply-To: <1236081375.11.0.544682804494.issue5410@psf.upfronthosting.co.za> Message-ID: <1238871512.73.0.285953528472.issue5410@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think this can wait until the first beta. ---------- nosy: +benjamin.peterson priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 20:58:47 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Apr 2009 18:58:47 +0000 Subject: [issue5692] test_zipfile fails under Windows In-Reply-To: <1238865433.18.0.587625961619.issue5692@psf.upfronthosting.co.za> Message-ID: <1238871527.86.0.406911109893.issue5692@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Let's worry about this after the alpha. ---------- nosy: +benjamin.peterson priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 21:00:10 2009 From: report at bugs.python.org (Eric Smith) Date: Sat, 04 Apr 2009 19:00:10 +0000 Subject: [issue5690] test_types fails in non-debug mode In-Reply-To: <1238864078.6.0.552957987991.issue5690@psf.upfronthosting.co.za> Message-ID: <1238871610.77.0.936877629373.issue5690@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 21:36:04 2009 From: report at bugs.python.org (Eric Smith) Date: Sat, 04 Apr 2009 19:36:04 +0000 Subject: [issue5690] test_types fails in non-debug mode In-Reply-To: <1238864078.6.0.552957987991.issue5690@psf.upfronthosting.co.za> Message-ID: <1238873764.23.0.65002460379.issue5690@psf.upfronthosting.co.za> Eric Smith added the comment: Problem was a debug #ifdef in the wrong place. Sorry for not testing in non-debug mode. Fixed in r71184. ---------- priority: release blocker -> normal resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 21:59:25 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 04 Apr 2009 19:59:25 +0000 Subject: [issue5682] Move io-in-c modules into a subdirectory of Modules/ In-Reply-To: <1238802942.81.0.198764911967.issue5682@psf.upfronthosting.co.za> Message-ID: <1238875165.91.0.109777211162.issue5682@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Committed in r71185. Thanks Antoine for the review! ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 22:08:37 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 04 Apr 2009 20:08:37 +0000 Subject: [issue5692] test_zipfile fails under Windows In-Reply-To: <1238865433.18.0.587625961619.issue5692@psf.upfronthosting.co.za> Message-ID: <1238875717.68.0.86927940028.issue5692@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: This happens when running test from root directory. Following patch can workaround this, but this code is there because it is needed, isn't it? (Related to #4710?) Index: Lib/zipfile.py =================================================================== --- Lib/zipfile.py (revision 71184) +++ Lib/zipfile.py (working copy) @@ -957,11 +957,6 @@ """Extract the ZipInfo object 'member' to a physical file on the path targetpath. """ - # build the destination pathname, replacing - # forward slashes to platform specific separators. - if targetpath[-1:] in (os.path.sep, os.path.altsep): - targetpath = targetpath[:-1] - # don't include leading "/" from file name if present if member.filename[0] == '/': targetpath = os.path.join(targetpath, member.filename[1:]) When targetpath is "C:/", targetpath becomes "C:" and os.path.join("C:", "foo") returns "C:foo" instead of "C:/foo" ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 22:50:52 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 20:50:52 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238878252.17.0.671611465016.issue2578@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Seeing how a change in assertNotEqual unveiled a bug in OrderedDict, would it be desireable for each of assertEqual and assertNotEqual to test both the '!=' and '==' operators? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 23:53:29 2009 From: report at bugs.python.org (Robert Collins) Date: Sat, 04 Apr 2009 21:53:29 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238882009.47.0.515181840237.issue5679@psf.upfronthosting.co.za> Robert Collins added the comment: It should run after tearDown so that teardown can do actions that may require cleanup; because the cleanups run in LIFO you can acquire resources in setUp and have cleanups clean them up, ---------- nosy: +rbcollins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 23:56:31 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 04 Apr 2009 21:56:31 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1238882191.9.0.69251554433.issue5670@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Sorry, I was wrong. I think I noticed that the case size==1 was handled differently, and incorrectly inferred the same for size==0. (btw, the patch for trunk was not updated) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 4 23:56:50 2009 From: report at bugs.python.org (Robert Collins) Date: Sat, 04 Apr 2009 21:56:50 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238882210.77.0.991586339971.issue5679@psf.upfronthosting.co.za> Robert Collins added the comment: Actually let me phrase that differently. standard practice for setUp is super.setUp() my_setup_code() and tearDown is my_teardown_code() super.tearDown() because of the LIFO need. If you imagine that clean ups are being done in the base class teardown, at the end of that method, then it becomes a lot more obvious why it should run after tearDown - because thats the right place, and because many users may be failing to call the base class tearDown which has historically done nothing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 00:01:07 2009 From: report at bugs.python.org (Robert Collins) Date: Sat, 04 Apr 2009 22:01:07 +0000 Subject: [issue5693] TestSuite.__iter__ is not hookable. In-Reply-To: <1238882466.94.0.961337180903.issue5693@psf.upfronthosting.co.za> Message-ID: <1238882466.94.0.961337180903.issue5693@psf.upfronthosting.co.za> New submission from Robert Collins : Currently if you alter the way TestSuite iterates one must always implement countTestCases, run, debug etc. The attached patch would make this simpler. If this looks ok I'll write up a test for it. ---------- components: Library (Lib) files: testsuite.patch keywords: patch messages: 85435 nosy: rbcollins severity: normal status: open title: TestSuite.__iter__ is not hookable. type: feature request Added file: http://bugs.python.org/file13615/testsuite.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 00:09:03 2009 From: report at bugs.python.org (Michael Foord) Date: Sat, 04 Apr 2009 22:09:03 +0000 Subject: [issue5693] TestSuite.__iter__ is not hookable. In-Reply-To: <1238882466.94.0.961337180903.issue5693@psf.upfronthosting.co.za> Message-ID: <1238882943.0.0.390742398147.issue5693@psf.upfronthosting.co.za> Michael Foord added the comment: +1 it's a minor change. ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 00:09:13 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 22:09:13 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238882210.77.0.991586339971.issue5679@psf.upfronthosting.co.za> Message-ID: <1238883040.6865.28.camel@fsol> Antoine Pitrou added the comment: teardown Why should they? It's only an implementation choice, and not a wise one I would say (precisely because people are used to the fact that the standard tearDown() method does nothing, and doesn't need to be called). I explained my proposal in terms of actual use cases, but I don't see any actual use case of addCleanup() in your argument. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 00:09:14 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Apr 2009 22:09:14 +0000 Subject: [issue5693] TestSuite.__iter__ is not hookable. In-Reply-To: <1238882466.94.0.961337180903.issue5693@psf.upfronthosting.co.za> Message-ID: <1238882954.38.0.48357116462.issue5693@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This looks correct. Just while your at it, you can fix the if statement in the debug() method by putting the body on another line. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 00:14:12 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 22:14:12 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238883252.52.0.231241744929.issue5679@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sorry, roundup screwed the quoting. I was responding to the following sentence: ?If you imagine that clean ups are being done in the base class teardown?. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Marcelo_Fern=C3=A1ndez_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sun Apr 5 00:15:44 2009 From: =?utf-8?q?Marcelo_Fern=C3=A1ndez_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Marcelo_Fern=C3=A1ndez_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sat, 04 Apr 2009 22:15:44 +0000 Subject: [issue5672] Implement a way to change the python process name In-Reply-To: <1238701084.1.0.0781987214897.issue5672@psf.upfronthosting.co.za> Message-ID: <1238883344.74.0.791581053293.issue5672@psf.upfronthosting.co.za> Marcelo Fern?ndez added the comment: Fine, I'll try to make a patch based on the procname project in Google Code. Here are some more links with more approaches to solve this issue (while I learn how to make a patch :-) ) http://abock.org/2006/02/09/changing-process-name-in-mono/ http://shiny.thorne.id.au/2006/02/changing-python-process-titles.html http://ubuntuforums.org/showthread.php?t=694331 Regards ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 00:21:05 2009 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Apr 2009 22:21:05 +0000 Subject: [issue1079] decode_header does not follow RFC 2047 In-Reply-To: <1188637019.25.0.0476259625696.issue1079@psf.upfronthosting.co.za> Message-ID: <1238883665.79.0.752267037682.issue1079@psf.upfronthosting.co.za> R. David Murray added the comment: Tony, I don't think I agree with your reading of the RFC. IMO, your inversion of test_rfc2047_without_whitespace is not correct. '=' is not a 'special' in RFC[2]822 terms, so the atom does not end at the apparent end of the encoded word. I say apparent because if I'm interpreting the RFC correctly it isn't a valid encoded word. I presume you are thinking that once you've got an atom composed of several encoded words, there's no reason not to parse them into individual words (and I'm inclined to agree with you), but the RFC BNF doesn't support that interpretation as far as I can see. That is, there is no indication I could find that an atom can be composed of multiple encoded words. The encoded word followed by a 'special' is more subtle. In section 5, the RFC says: An 'encoded-word' that appears within a 'phrase' MUST be separated from any adjacent 'word', 'text' or 'special' by 'linear-white-space'. This would apply to encoded words in names in To and From headers. But in other places where an encoded word can appear the requirement of white-space separation from specials is not asserted. It's not clear how to make this RFC compliant without implementing a full BNF parser :( It would probably be reasonable to fix this case so that a word followed by a special with no intervening white space was allowed. I've attached a test case for the 'special' example based on that idea. ---------- nosy: +r.david.murray stage: -> needs patch type: -> behavior versions: +Python 3.0, Python 3.1 -Python 2.5 Added file: http://bugs.python.org/file13616/issue1079-test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 00:47:58 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 04 Apr 2009 22:47:58 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238885278.19.0.0910258085949.issue2578@psf.upfronthosting.co.za> Nick Coghlan added the comment: No, because the rich comparison docs explicitly state that the interpreter makes no assumptions about the relationship between != and == (or, more precisely, __eq__ and __ne__). """There are no implied relationships among the comparison operators. The truth of x==y does not imply that x!=y is false. """ (from http://docs.python.org/reference/datamodel.html#basic-customization) If someone is writing unit tests for comparison methods they should explicitly test all 6 operations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 00:57:30 2009 From: report at bugs.python.org (Robert Collins) Date: Sat, 04 Apr 2009 22:57:30 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238883040.6865.28.camel@fsol> Message-ID: <1238885834.2700.288.camel@lifeless-64> Robert Collins added the comment: On Sat, 2009-04-04 at 22:09 +0000, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > > teardown > > Why should they? It's only an implementation choice, and not a wise one > I would say (precisely because people are used to the fact that the > standard tearDown() method does nothing, and doesn't need to be called). > > I explained my proposal in terms of actual use cases, but I don't see > any actual use case of addCleanup() in your argument. I was arguing by analogy: if we were to implement addCleanup as something called at the end of the base class tearDown, then it would clearly support LIFO tearing down of anything people have done [except that we can't rely on them having called the base tearDown]. The next best thing then is to call it from run() after calling tearDown. If you want a worked example: --- class TestSample(TestCase): def setUp(self): dirname = mkdtemp() self.addCleanup(shutils.rmtree, dirname, ignore_errors=True) db = make_db(dirname) self.addCleanup(db.tearDown) .... --- This depends on db being torn down before the rmtree, or else the db teardown will blow up (and it must be torn down to release locks correctly on windows). -Rob ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 01:02:15 2009 From: report at bugs.python.org (Michael Foord) Date: Sat, 04 Apr 2009 23:02:15 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238886135.58.0.221288891971.issue5679@psf.upfronthosting.co.za> Michael Foord added the comment: Antoine, Robert suggests calling it after tearDown so that tearDown can also perform actions that need clean up. Not a common use case but at least a use case. What do you mean by: "so that test cases can also use it to initialize additional resources and finalize them in a LIFO way wrt the main tearDown" Can you give an example? You seem to imply that clean up be used to initialize resources which seems very odd. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 01:02:28 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 23:02:28 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238886148.76.0.59826319843.issue5679@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > def setUp(self): > dirname = mkdtemp() > self.addCleanup(shutils.rmtree, dirname, ignore_errors=True) > db = make_db(dirname) > self.addCleanup(db.tearDown) Sure, but that's an example of doing something which is already doable without addCleanup (resource allocation in setUp). I was talking about doing resource allocation in the test methods themselves, which is /only/ possible using addCleanup, and needs cleanups to be run before tearDown, not after. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 01:04:14 2009 From: report at bugs.python.org (Michael Foord) Date: Sat, 04 Apr 2009 23:04:14 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238886254.75.0.632319950294.issue5679@psf.upfronthosting.co.za> Michael Foord added the comment: The main use case for addCleanup is resource allocation in tests. Why does this require clean ups to be executed before tearDown? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 01:06:27 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Apr 2009 23:06:27 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238886254.75.0.632319950294.issue5679@psf.upfronthosting.co.za> Message-ID: <1238886469.6865.30.camel@fsol> Antoine Pitrou added the comment: > The main use case for addCleanup is resource allocation in tests. Why > does this require clean ups to be executed before tearDown? If your cleanup relies on something which has been set up during setUp and will be dropped during tearDown (a database connection, a temp dir, an ssh session, whatever), then the cleanup must be run before the teardown. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 01:17:23 2009 From: report at bugs.python.org (Tony Nelson) Date: Sat, 04 Apr 2009 23:17:23 +0000 Subject: [issue1079] decode_header does not follow RFC 2047 In-Reply-To: <1188637019.25.0.0476259625696.issue1079@psf.upfronthosting.co.za> Message-ID: <1238887043.59.0.394644173784.issue1079@psf.upfronthosting.co.za> Tony Nelson added the comment: The email package does not follow the RFCs in anything to do with header parsing or decoding. This is a known deficiency. So no, I am not thinking of atoms at all -- and neither is email.header.decode_header()! :-( Until email.header actually parses headers into atoms and then decodes atoms, it doesn't matter what parsed atoms would look like. Currently, email.header.decode_header() just stumbles through raw text, and doesn't know if it is looking at atoms or not, or usually even what header the text came from. In order to interpret the RFC correctly, email.header.decode_header() needs either a parser and the name of the header it is decoding, or parsed header data. I think the latter is being considered for a redesign of the email package for 3.1 or 3.2 (3 months to a year or so, and not for 2.x at all), but until then, it is better to decode every likely encoded-word than to skip encoded-words that, for example, have a parenthesis on one side or the other. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 01:34:45 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Apr 2009 23:34:45 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1238888085.77.0.817887785425.issue4136@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 01:34:52 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Apr 2009 23:34:52 +0000 Subject: [issue5410] msvcrt bytes cleanup In-Reply-To: <1236081375.11.0.544682804494.issue5410@psf.upfronthosting.co.za> Message-ID: <1238888092.5.0.541959162524.issue5410@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 01:34:58 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Apr 2009 23:34:58 +0000 Subject: [issue5692] test_zipfile fails under Windows In-Reply-To: <1238865433.18.0.587625961619.issue5692@psf.upfronthosting.co.za> Message-ID: <1238888098.88.0.803322745987.issue5692@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 02:03:37 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 05 Apr 2009 00:03:37 +0000 Subject: [issue5596] memory leaks in 3.1 In-Reply-To: <1238336388.84.0.581148968517.issue5596@psf.upfronthosting.co.za> Message-ID: <1238889817.86.0.314749424985.issue5596@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I have the following tests leaking on my Linux build of py3k: test_structmembers leaked [102, 102, 102] references, sum=306 test_structmembers leaked [102, 102, 102] references, sum=306 test_structmembers leaked [102, 102, 102, 102] references, sum=408 test_structmembers leaked [102, 102, 102, 102] references, sum=408 test_structmembers leaked [102, 102, 102, 102] references, sum=408 test_structmembers leaked [102, 102, 102, 102] references, sum=408 test_structmembers leaked [102, 102, 102, 102] references, sum=408 test_structmembers leaked [102, 102, 102, 102] references, sum=408 test_structmembers leaked [17, 17, 17, 17] references, sum=68 test_structmembers leaked [102, 102, 102, 102] references, sum=408 test_structmembers leaked [102, 102, 102, 102] references, sum=408 test_structmembers leaked [102, 102, 102, 102] references, sum=408 test_structmembers leaked [102, 102, 102, 102, 102, 102] references, sum=612 test_structmembers leaked [106, 102, 102] references, sum=310 test_structmembers leaked [102, 102, 102] references, sum=306 test_structmembers leaked [106, 102, 102] references, sum=310 test_structmembers leaked [106, 102, 102] references, sum=310 test_docxmlrpc leaked [166, -251, 0] references, sum=-85 test_httpservers leaked [-195, 0, 0] references, sum=-195 test_os leaked [0, 0, 23] references, sum=23 test_popen leaked [-23, 23, -23] references, sum=-23 test_telnetlib leaked [0, 0, 84] references, sum=84 test_threading leaked [-119, 119, -28] references, sum=-28 test_urllib2 leaked [227, 227, 227] references, sum=681 test_urllib2_localnet leaked [-251, 3, 3] references, sum=-245 ---------- nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 02:05:18 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 05 Apr 2009 00:05:18 +0000 Subject: [issue3851] IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered. In-Reply-To: <1221250835.7.0.322524713176.issue3851@psf.upfronthosting.co.za> Message-ID: <1238889918.39.0.584793831157.issue3851@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Bingo. I can also switch behaviors with Numlock (which I routinely have engaged). Neither of us was crazy ;-) Thank you 'weeble'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 02:05:34 2009 From: report at bugs.python.org (Tim Wegener) Date: Sun, 05 Apr 2009 00:05:34 +0000 Subject: [issue1600182] Tix ComboBox entry is blank when not editable Message-ID: <1238889934.31.0.0242568428463.issue1600182@psf.upfronthosting.co.za> Tim Wegener added the comment: I encountered this bug at my previous place of employment. I've since moved on, so I don't have access to the code/setup where this originally occurred. I tried to setup a test case to reproduce this, but was thwarted by another bug, probably related to my Linux distro (Fedora 10): $ python issue_1600182.py Traceback (most recent call last): File "issue_1600182.py", line 10, in c = Tix.ComboBox() File "/usr/lib/python2.5/lib-tk/Tix.py", line 579, in __init__ cnf, kw) File "/usr/lib/python2.5/lib-tk/Tix.py", line 307, in __init__ self.tk.call(widgetName, self._w, *extra) _tkinter.TclError: invalid command name "tixComboBox" I can't comment further until I resolve this other problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 02:07:56 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 05 Apr 2009 00:07:56 +0000 Subject: [issue5596] memory leaks in 3.1 In-Reply-To: <1238336388.84.0.581148968517.issue5596@psf.upfronthosting.co.za> Message-ID: <1238890076.18.0.795056050024.issue5596@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Strange, I don't see any leaks in test_structmembers here. test_structmembers beginning 9 repetitions 123456789 ......... 1 test OK. [89785 refs] This is with r71202 on a 64-bit build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 02:16:23 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 05 Apr 2009 00:16:23 +0000 Subject: [issue5694] spurious output in test_distutils In-Reply-To: <1238890583.06.0.607271052329.issue5694@psf.upfronthosting.co.za> Message-ID: <1238890583.06.0.607271052329.issue5694@psf.upfronthosting.co.za> New submission from Antoine Pitrou : test_distutils produces the following kind of output. It doesn't make it fail, but is a bit distracting. test_distutils removing '/tmp/tmpY0RHnV/foo/build_temp' (and everything under it) removing '/tmp/tmpY0RHnV/foo/build_lib' (and everything under it) removing '/tmp/tmpY0RHnV/foo/bdist_base' (and everything under it) removing '/tmp/tmpY0RHnV/foo/build_scripts' (and everything under it) removing '/tmp/tmpY0RHnV/foo/build_base' '/tmp/tmpY0RHnV/foo/build_lib' does not exist -- can't clean it '/tmp/tmpY0RHnV/foo/bdist_base' does not exist -- can't clean it '/tmp/tmpY0RHnV/foo/build_scripts' does not exist -- can't clean it ---------- components: Tests messages: 85453 nosy: pitrou, tarek priority: low severity: normal stage: needs patch status: open title: spurious output in test_distutils type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 02:30:51 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 05 Apr 2009 00:30:51 +0000 Subject: [issue5695] test_logging fails when run twice in a row In-Reply-To: <1238891451.8.0.0993541274648.issue5695@psf.upfronthosting.co.za> Message-ID: <1238891451.8.0.0993541274648.issue5695@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This happens e.g. when searching for refleaks (the -R option to regrtest). ./python -m test.regrtest test_logging test_logging Could not find '/home/antoine/py3k/debug/Lib/test' in sys.path to remove it test_logging test_logging test test_logging failed -- Traceback (most recent call last): File "/home/antoine/py3k/debug/Lib/test/test_logging.py", line 932, in test_warnings file, "Dummy line") File "/home/antoine/py3k/debug/Lib/logging/__init__.py", line 1534, in _showwarning _warnings_showwarning(message, category, filename, lineno, file, line) File "/home/antoine/py3k/debug/Lib/logging/__init__.py", line 1534, in _showwarning _warnings_showwarning(message, category, filename, lineno, file, line) [...] File "/home/antoine/py3k/debug/Lib/logging/__init__.py", line 1534, in _showwarning _warnings_showwarning(message, category, filename, lineno, file, line) RuntimeError: maximum recursion depth exceeded ---------- assignee: vsajip components: Library (Lib), Tests messages: 85454 nosy: pitrou, vsajip priority: normal severity: normal stage: needs patch status: open title: test_logging fails when run twice in a row type: crash versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 02:39:58 2009 From: report at bugs.python.org (STINNER Victor) Date: Sun, 05 Apr 2009 00:39:58 +0000 Subject: [issue5410] msvcrt bytes cleanup In-Reply-To: <1236081375.11.0.544682804494.issue5410@psf.upfronthosting.co.za> Message-ID: <1238891998.79.0.200853751869.issue5410@psf.upfronthosting.co.za> STINNER Victor added the comment: > There seems to be a problem with ungetwch() I tested Visual C++ Express 2008 and it looks like _ungetwch() only keep 8 lower bits (like _ungetwch(x & 255)). But it's a bug in Microsoft library, not in Python code (I added some printf to be sure). My patch (msvcrt_wchar.patch) makes the situation better, but it's not perfect because of a bug in Microsoft's library. msvcrt.getwch() works correctly with characters with code > 255 (eg. euro sign, U+20ac, 8364 in decimal). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 02:46:40 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 05 Apr 2009 00:46:40 +0000 Subject: [issue5687] Docstring typo in _io In-Reply-To: <1238892400.77.0.702312912805.issue5687@psf.upfronthosting.co.za> Message-ID: <1238892400.77.0.702312912805.issue5687@psf.upfronthosting.co.za> New submission from Benjamin Peterson : Thanks! Fixed in r71205. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 03:13:51 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sun, 05 Apr 2009 01:13:51 +0000 Subject: [issue5596] memory leaks in 3.1 In-Reply-To: <1238336388.84.0.581148968517.issue5596@psf.upfronthosting.co.za> Message-ID: <1238894031.67.0.542442547203.issue5596@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Dismiss my last comment. These are the tests actually leaking for my build: test_docxmlrpc leaked [85, -6, 0, 39] references, sum=118 test_httpservers leaked [-195, 195, 0, 64] references, sum=64 test_os leaked [23, -23, 0, 23] references, sum=23 test_pipes leaked [0, 0, 0, -23] references, sum=-23 test_popen leaked [0, -23, 0, 0] references, sum=-23 test_urllib2 leaked [227, 227, 227, 227] references, sum=908 test_urllib2_localnet leaked [3, 3, 3, 3] references, sum=12 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 03:15:38 2009 From: report at bugs.python.org (Michael Foord) Date: Sun, 05 Apr 2009 01:15:38 +0000 Subject: [issue5693] TestSuite.__iter__ is not hookable. In-Reply-To: <1238882466.94.0.961337180903.issue5693@psf.upfronthosting.co.za> Message-ID: <1238894138.98.0.724763189919.issue5693@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 03:23:10 2009 From: report at bugs.python.org (STINNER Victor) Date: Sun, 05 Apr 2009 01:23:10 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1238894590.15.0.456381103673.issue3873@psf.upfronthosting.co.za> STINNER Victor added the comment: alexandre.vassalotti wrote: > The solution is to add a read buffer to Unpickler (...) > would mitigate much of the (quite large) Python function > call overhead. (...) cPickle has a performance hack to make it > uses cStringIO and PyFile directly (via C function calls). In > Python 3, the hack was removed (...) Yes, unpickler_read() calls Buffered_read() through PyObject_Call+PyCFunction_Call which is expensive. And unpickle main loop starts with unpickler_read(self, &s, 1): just read *one* byte (the "opcode"). If Buffered_read() call is expensive, a solution is to avoid calling it (eg. read more bytes and... go backward at the end?). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 03:25:20 2009 From: report at bugs.python.org (STINNER Victor) Date: Sun, 05 Apr 2009 01:25:20 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1238894720.65.0.74608267608.issue3873@psf.upfronthosting.co.za> STINNER Victor added the comment: Unladen Swallow has a project to optimize pickle. Currently, it uses 3 benchmarks: pickle - use the cPickle module to pickle a variety of datasets. pickle_dict - microbenchmark; use the cPickle module to pickle a lot of dicts. pickle_list - microbenchmark; use the cPickle module to pickle a lot of lists. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 03:46:02 2009 From: report at bugs.python.org (Jack Diederich) Date: Sun, 05 Apr 2009 01:46:02 +0000 Subject: [issue5696] test_telnetlib augmentation In-Reply-To: <1238895962.87.0.497816781262.issue5696@psf.upfronthosting.co.za> Message-ID: <1238895962.87.0.497816781262.issue5696@psf.upfronthosting.co.za> New submission from Jack Diederich : The first part of my telnetlib work is testing what already is. Attached is a patch to test_telnetlib that tests mosts of the guarantees of the telnetlib.Telnet.read_* methods (as guaranteed by the docs, at least). Theoretically every test I added has a race condition. ReadTests.blocking_timeout is currently set to 0.1 seconds and works on my platform (it also works at 0.0 seconds). Is this acceptable or do I need to include semaphores will 100% predictable behavior? TIA ---------- assignee: jackdied files: test_telnetlib.patch keywords: patch messages: 85460 nosy: jackdied severity: normal status: open title: test_telnetlib augmentation Added file: http://bugs.python.org/file13617/test_telnetlib.patch _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sun Apr 5 03:53:32 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sun, 05 Apr 2009 01:53:32 +0000 Subject: [issue5694] spurious output in test_distutils In-Reply-To: <1238890583.06.0.607271052329.issue5694@psf.upfronthosting.co.za> Message-ID: <1238896412.94.0.246682122292.issue5694@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek components: +Distutils _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 03:59:41 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 05 Apr 2009 01:59:41 +0000 Subject: [issue5410] msvcrt bytes cleanup In-Reply-To: <1236081375.11.0.544682804494.issue5410@psf.upfronthosting.co.za> Message-ID: <1238896781.07.0.913195825193.issue5410@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: MSDN says _ungetwch returns WEOF instead of EOF when error occurs. http://msdn.microsoft.com/en-us/library/yezzac74(VS.80).aspx I cannot see any remarks about masking behavior. :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 04:02:13 2009 From: report at bugs.python.org (STINNER Victor) Date: Sun, 05 Apr 2009 02:02:13 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1238896933.69.0.486000272028.issue3873@psf.upfronthosting.co.za> STINNER Victor added the comment: gprof (--enable-profiler) results: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls ms/call ms/call name 18.18 0.16 0.16 2011055 0.00 0.00 vgetargs1 7.95 0.23 0.07 2017033 0.00 0.00 PyObject_GenericGetAttr 6.82 0.29 0.06 2002006 0.00 0.00 _BufferedReader_read_unlocked 5.68 0.34 0.05 2012123 0.00 0.00 convertsimple 4.55 0.38 0.04 2013284 0.00 0.00 PyCFunction_Call 4.55 0.42 0.04 2004543 0.00 0.00 PyLong_AsSsize_t 3.41 0.45 0.03 2004565 0.00 0.00 PyNumber_Index 3.41 0.48 0.03 2002177 0.00 0.00 float_argument_error 3.41 0.51 0.03 1000497 0.00 0.00 PyLong_AsLongAndOverflow 2.27 0.53 0.02 2012123 0.00 0.00 convertitem It looks like PyArg_ParseTuple() should be optimized ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 06:46:44 2009 From: report at bugs.python.org (Robert Collins) Date: Sun, 05 Apr 2009 04:46:44 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238886469.6865.30.camel@fsol> Message-ID: <1238906768.2700.373.camel@lifeless-64> Robert Collins added the comment: On Sat, 2009-04-04 at 23:06 +0000, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > > > The main use case for addCleanup is resource allocation in tests. Why > > does this require clean ups to be executed before tearDown? > > If your cleanup relies on something which has been set up during setUp > and will be dropped during tearDown (a database connection, a temp dir, > an ssh session, whatever), then the cleanup must be run before the > teardown. I don't think you can sensibly define an ordering between setup/teardown and cleanups that works for all cases. Either cleanups happen after teardown, and then you can use them when allocating things in setup/run/teardown, or they happen before teardown and you cannot safely use them except in run because things setup by a child will not have been torn down when cleanups run. [see the two where-it-breaks sequences below]. The issue is that cleanups are not connected to the inheritance heirarchy. They are safe and trivial to use with resources that are not connected to each other *however* they are defined, but the interaction with things being freed in tearDown cannot meet all cases unless you have per-class-in the-MRO-queues (which is overly complex). I assert that its better to be able to use cleanups in all three test methods rather than only in run, all other things being equal. Our experience in bzr (we use this heavily, and migrated to it incrementally across our 17K fixture suite) is that we rarely need to use cleanups on dependent resources, and when we need to it has been very easy to migrate the dependent resource to use cleanups as well. -Rob sequence 1: cleanup after teardowns prevents using cleanups on things freed in teardown: setup self.foo = thing() run self.bar = something(self.foo) self.addCleanUp(free, self.bar) teardown unthing(self.foo) cleanups free(self.bar) *boom* self.foo is already gone sequence 2: cleanup before teardown prevents using cleanups in base class setup methods base.setup self.foo = thing() self.addCleanup(unthing, self.foo) setup super.setup() self.bar = something(self.foo) run assertWhatever cleanups unthing(self.foo) teardown free(self.bar) *boom* self.foo is already gone ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 06:59:12 2009 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 05 Apr 2009 04:59:12 +0000 Subject: [issue5604] imp.find_module() mixes UTF8 and MBCS In-Reply-To: <1238423201.33.0.732435229283.issue5604@psf.upfronthosting.co.za> Message-ID: <1238907551.93.0.874544460865.issue5604@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Continuing work on problem I figured out: * on Windows it's impossible to convert filenames to file system encoding without and don't miss something. * Windows can work properly only with unicode (wchar_t) characters. * all other systems feels itself good using utf-8 (or another filesystem encoding). * it's very errorprone to change 'char*' to 'PyUnicode*'. To solve this problem I assume: * all char* in Python API is utf-8. * if there are need call to operation system api like fopen - call imp_fopen, this function will do need conversions. Inside import.c there are 4 calls: fopen, open_exclusive, unlink, stat. I want to write stubs for this calls. * also loaders for dynamic modules aka 'C extensions' have to expect utf-8 as pathname parameter, not 'filesystem encoded'. Patch for windows is applied (STILL NOT CONVERTED TO OTHER OS). But for Windows it works (regression tests passed). If this solution is applicable for 3.1 (as I know Cannon works on excellent importlib but this library will replace imp functionality only in 3.2) - I can continue switching. Unfortunately I cannot test py3k trunk on non-windows machines - but I can 'make all OS calls as expected' and wait for buildbot answer. Please review import_patch_4th_edition.zip and if I ran in wrong way - let me know. ---------- nosy: +brett.cannon Added file: http://bugs.python.org/file13618/import_patch_4th_edition.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 09:25:54 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 05 Apr 2009 07:25:54 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238916354.62.0.874223291437.issue5679@psf.upfronthosting.co.za> Garrett Cooper added the comment: I think some perspective is required on this enhancement request. I originally filed this issue -- http://bugs.python.org/issue5538 -- because of the unneeded complexity involved with duplicating teardown-related code in setUp because of a step in setUp failing. >From my perspective, there are two issues: - setUp failing doesn't cleanup on failure unless the test writer explicitly adds cleanup logic. - cleanup shouldn't partially replace tearDown -- either supplement it or completely replace it longterm. Otherwise the unittest code and expectations associated with it will potentially confuse end users. Another thought: Why not have an option for defining a method called `incrementalTearDown', which replaces `tearDown' from a functional standpoint? A method like that would clearly convey that this is designed to replace tearDown, it's not the same functionally, and would ease migration over the long-term if people chose to use this design when writing testcases. I personally think that doing something like this would be trivial (yet novel) functionality as it makes more sense than the current implementation of setUp->test->tearDown. ---------- nosy: +yaneurabeya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 10:03:51 2009 From: report at bugs.python.org (Robert Collins) Date: Sun, 05 Apr 2009 08:03:51 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238916354.62.0.874223291437.issue5679@psf.upfronthosting.co.za> Message-ID: <1238918616.2700.387.camel@lifeless-64> Robert Collins added the comment: On Sun, 2009-04-05 at 07:25 +0000, Garrett Cooper wrote: > Garrett Cooper added the comment: > > I think some perspective is required on this enhancement request. I > originally filed this issue -- http://bugs.python.org/issue5538 -- > because of the unneeded complexity involved with duplicating > teardown-related code in setUp because of a step in setUp failing. Indeed, and in bzr and other unittest extension libraries one of the first things done is to make tearDown be called always. > >From my perspective, there are two issues: > > - setUp failing doesn't cleanup on failure unless the test writer > explicitly adds cleanup logic. the proposed patch in 5679 runs cleanups always, so this shouldn't be an issue with the addCleanup functionality. > - cleanup shouldn't partially replace tearDown -- either supplement it > or completely replace it longterm. Otherwise the unittest code and > expectations associated with it will potentially confuse end users. I'm conceptually fine with this, certainly I've not written a tearDown for tests in bzr in a very long time. > Another thought: Why not have an option for defining a method called > `incrementalTearDown', which replaces `tearDown' from a functional > standpoint? A method like that would clearly convey that this is > designed to replace tearDown, it's not the same functionally, and would > ease migration over the long-term if people chose to use this design > when writing testcases. Its much more complex than addCleanup [it will be tied to the MRO], not as flexible (and in big suites that starts to matter a lot), and unable to trivially hook into actually used resources [which addCleanup does]. -Rob ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 10:56:50 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 08:56:50 +0000 Subject: [issue5688] inability to ignore multiline warnings -- request to add re.DOTALL to re.compile In-Reply-To: <1238858961.61.0.698895898394.issue5688@psf.upfronthosting.co.za> Message-ID: <1238921810.36.0.499781727213.issue5688@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't really understand this; first, the regex doesn't have to match the entire warning message (and I hope the important things are in the first line, otherwise the warning message is bad) and second, it's always possible to use ``(.|\n)`` instead of plain ``.``. Ah yes, third, there are also inline flags: ``(?s)``. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 10:58:35 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 08:58:35 +0000 Subject: [issue5689] please support lzma compression as an extension and in the tarfile module In-Reply-To: <1238861315.81.0.348941469726.issue5689@psf.upfronthosting.co.za> Message-ID: <1238921915.4.0.783870454809.issue5689@psf.upfronthosting.co.za> Georg Brandl added the comment: If we support LZMA, we should do so on all platforms; it kind of restricts usefulness to only have it on some. Maybe the LZMA code in one of the many archival tools in existence that supports it is not LGPL'd? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 11:03:37 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 09:03:37 +0000 Subject: [issue5696] test_telnetlib augmentation In-Reply-To: <1238895962.87.0.497816781262.issue5696@psf.upfronthosting.co.za> Message-ID: <1238922217.45.0.534676193697.issue5696@psf.upfronthosting.co.za> Georg Brandl added the comment: FWIW, it works here too with 0.0 and 0.1 seconds (it's Linux x86). ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 12:06:08 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 10:06:08 +0000 Subject: [issue1742940] can't run single lamba funcs as unittest Message-ID: <1238925968.29.0.810606247462.issue1742940@psf.upfronthosting.co.za> Georg Brandl added the comment: This is fixed in at least 2.6 and trunk. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 12:15:04 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 05 Apr 2009 10:15:04 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238906768.2700.373.camel@lifeless-64> Message-ID: <1238926585.6499.5.camel@fsol> Antoine Pitrou added the comment: > Our experience in bzr (we use this heavily, and migrated to it > incrementally across our 17K fixture suite) is that we rarely need to > use cleanups on dependent resources, and when we need to it has been > very easy to migrate the dependent resource to use cleanups as well. I'm baffled. If you say you don't care about the order, why are you arguing at all? [...] > sequence 2: cleanup before teardown prevents using cleanups in base > class setup methods The point is that sequence 2 can already be emulated using careful "try...finally" in tearDown, while sequence 1 cannot. That is, sequence 1 *needs* the addCleanup, while for sequence 2 it is a mere additional convenience. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 12:24:32 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 10:24:32 +0000 Subject: [issue1742837] Documentation for BaseHTTPServer.HTTPServer Message-ID: <1238927072.18.0.339773998747.issue1742837@psf.upfronthosting.co.za> Georg Brandl added the comment: Should be covered now in r71212. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 12:24:37 2009 From: report at bugs.python.org (Ismail Donmez) Date: Sun, 05 Apr 2009 10:24:37 +0000 Subject: [issue5442] [3.1alpha1,2] test_importlib fails on Mac OSX 10.5.6 In-Reply-To: <1236517160.74.0.61108619715.issue5442@psf.upfronthosting.co.za> Message-ID: <1238927077.94.0.284450863885.issue5442@psf.upfronthosting.co.za> Ismail Donmez added the comment: Still fails with 3.1 alpha2: ====================================================================== ERROR: test_is_package (importlib.test.frozen.test_loader.InspectLoaderTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/frozen/test_loader.py", line 80, in test_is_package result = machinery.FrozenImporter.is_package(name) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/_bootstrap.py", line 191, in wrapper return fxn(self, fullname) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/_bootstrap.py", line 301, in is_package return imp.is_frozen_package(fullname) AttributeError: 'module' object has no attribute 'is_frozen_package' ====================================================================== ERROR: test_lacking_parent (importlib.test.source.test_abc_loader.PyLoaderTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 162, in test_lacking_parent __loader__=mock) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 128, in eq_attrs "{} attribute: {} != {}".format(attr, found, val)) ValueError: zero length field name in format ====================================================================== ERROR: test_module (importlib.test.source.test_abc_loader.PyLoaderTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 138, in test_module __loader__=mock) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 128, in eq_attrs "{} attribute: {} != {}".format(attr, found, val)) ValueError: zero length field name in format ====================================================================== ERROR: test_package (importlib.test.source.test_abc_loader.PyLoaderTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 151, in test_package __loader__=mock) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 128, in eq_attrs "{} attribute: {} != {}".format(attr, found, val)) ValueError: zero length field name in format ====================================================================== ERROR: test_lacking_parent (importlib.test.source.test_abc_loader.PyPycLoaderTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 270, in test_lacking_parent mock, name = super().test_lacking_parent() File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 162, in test_lacking_parent __loader__=mock) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 128, in eq_attrs "{} attribute: {} != {}".format(attr, found, val)) ValueError: zero length field name in format ====================================================================== ERROR: test_module (importlib.test.source.test_abc_loader.PyPycLoaderTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 262, in test_module mock, name = super().test_module() File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 138, in test_module __loader__=mock) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 128, in eq_attrs "{} attribute: {} != {}".format(attr, found, val)) ValueError: zero length field name in format ====================================================================== ERROR: test_package (importlib.test.source.test_abc_loader.PyPycLoaderTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 266, in test_package mock, name = super().test_package() File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 151, in test_package __loader__=mock) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 128, in eq_attrs "{} attribute: {} != {}".format(attr, found, val)) ValueError: zero length field name in format ====================================================================== FAIL: test_case_insensitivity (importlib.test.extension.test_case_sensitivity.ExtensionModuleCaseSensi tivityTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/extension/test_case_sensitivity.py", line 29, in test_case_insensitivity self.assert_(hasattr(loader, 'load_module')) AssertionError: False is not True ====================================================================== FAIL: test_module_reuse (importlib.test.source.test_abc_loader.PyPycLoaderTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 275, in test_module_reuse self.verify_bytecode(mock, name) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/util.py", line 18, in wrapper to_return = fxn(*args, **kwargs) File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_abc_loader.py", line 253, in verify_bytecode self.assert_(name in mock.module_bytecode) AssertionError: False is not True ====================================================================== FAIL: test_insensitive (importlib.test.source.test_case_sensitivity.CaseSensitivityTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/cartman/Downloads/Python- 3.1a2/Lib/importlib/test/source/test_case_sensitivity.py", line 49, in test_insensitive self.assert_(hasattr(insensitive, 'load_module')) AssertionError: False is not True ---------- title: [3.1alpha1] test_importlib fails on Mac OSX 10.5.6 -> [3.1alpha1,2] test_importlib fails on Mac OSX 10.5.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 12:27:02 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 10:27:02 +0000 Subject: [issue1707768] os.path.normpath changes path (chops of trailing slash) Message-ID: <1238927222.5.0.58800468271.issue1707768@psf.upfronthosting.co.za> Georg Brandl added the comment: The amount of discussion on this bug is already an indication that the proposed change is questionable. Combine this with backwards-compatibility concerns, and it's enough reason not to change this. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 12:41:20 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 10:41:20 +0000 Subject: [issue1718017] posixpath and friends have uses that should be documented Message-ID: <1238928080.15.0.863796586652.issue1718017@psf.upfronthosting.co.za> Georg Brandl added the comment: Should be covered with r71216. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sun Apr 5 12:43:46 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sun, 05 Apr 2009 10:43:46 +0000 Subject: [issue5694] spurious output in test_distutils In-Reply-To: <1238890583.06.0.607271052329.issue5694@psf.upfronthosting.co.za> Message-ID: <1238928226.78.0.181957189362.issue5694@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Antoine, I can't reproduce this with the current trunk and py3k branch. how do you launch the tests ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 12:49:01 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 10:49:01 +0000 Subject: [issue1726172] ftplib.py: IndexError in voidresp occasionally Message-ID: <1238928541.47.0.685644260345.issue1726172@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r71217. Thanks! ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 12:52:55 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 10:52:55 +0000 Subject: [issue1732662] socket makefile objects are not independent Message-ID: <1238928775.35.0.78708473684.issue1732662@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing as "works for me". ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 13:11:10 2009 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 05 Apr 2009 11:11:10 +0000 Subject: [issue5695] test_logging fails when run twice in a row In-Reply-To: <1238891451.8.0.0993541274648.issue5695@psf.upfronthosting.co.za> Message-ID: <1238929870.66.0.363687552424.issue5695@psf.upfronthosting.co.za> Vinay Sajip added the comment: The problem was caused by the logging.captureWarnings(True) call being left outside the "with warnings.catch_warnings()" during Brett's change to test_logging (r70975). Since logging.captureWarnings grabs warnings.showwarning, in order for warnings.catch_warnings to restore things to how they were before, ISTM that this capture needs to be inside the with. Fix checked into trunk (r71221). ---------- nosy: +brett.cannon resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 13:11:26 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 11:11:26 +0000 Subject: [issue5606] The makefile dependencies listing formatter.h are wrong In-Reply-To: <1238429536.66.0.981803111622.issue5606@psf.upfronthosting.co.za> Message-ID: <1238929886.09.0.127444699587.issue5606@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed as r71223. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 13:16:54 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 11:16:54 +0000 Subject: [issue1538556] PyThreadState_SetAsyncExc bug Message-ID: <1238930214.38.0.201410929708.issue1538556@psf.upfronthosting.co.za> Georg Brandl added the comment: Agreed. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 13:18:32 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 11:18:32 +0000 Subject: [issue1538691] Patch cElementTree to export CurrentLineNumber Message-ID: <1238930312.66.0.769183270127.issue1538691@psf.upfronthosting.co.za> Georg Brandl added the comment: Which will be synced into core at some point, I guess? ---------- nosy: +georg.brandl resolution: -> postponed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 13:28:44 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 11:28:44 +0000 Subject: [issue5586] The documentation of os.makedirs is misleading In-Reply-To: <1238249792.26.0.0616878005738.issue5586@psf.upfronthosting.co.za> Message-ID: <1238930924.94.0.42899733566.issue5586@psf.upfronthosting.co.za> Georg Brandl added the comment: Actually, it works as documented: >>> import os >>> os.makedirs("/tmp") Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 17] File exists: '/tmp' ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 13:47:47 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 11:47:47 +0000 Subject: [issue5615] linking fails when configured --without-threads In-Reply-To: <1238450584.26.0.327846530944.issue5615@psf.upfronthosting.co.za> Message-ID: <1238932067.04.0.465593599743.issue5615@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed 2.6 and 3k in r71222 and r71224, respectively. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 13:49:17 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 11:49:17 +0000 Subject: [issue5579] Display for OrderedDict In-Reply-To: <1238165659.22.0.188261777341.issue5579@psf.upfronthosting.co.za> Message-ID: <1238932157.42.0.405718541132.issue5579@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't think this is going to fly -- 1. because we don't lightly add new syntax for every data type and 2. because it doesn't scale beyond simple keys and values. A list of tuples is explicit and works fine. ---------- nosy: +georg.brandl resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 13:54:15 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 11:54:15 +0000 Subject: [issue5580] Strange error message in Python/getargs.c In-Reply-To: <1238168158.76.0.166850509675.issue5580@psf.upfronthosting.co.za> Message-ID: <1238932455.62.0.932355116184.issue5580@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r71225. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 15:11:43 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 13:11:43 +0000 Subject: [issue1659410] Minor AST tweaks Message-ID: <1238937103.46.0.535779684567.issue1659410@psf.upfronthosting.co.za> Georg Brandl added the comment: Note that change #1 is already implemented as of r62051. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 15:19:11 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 13:19:11 +0000 Subject: [issue5611] Auto-detect indentation in C source in vimrc In-Reply-To: <1238436646.8.0.898787236764.issue5611@psf.upfronthosting.co.za> Message-ID: <1238937551.0.0.933000058229.issue5611@psf.upfronthosting.co.za> Georg Brandl added the comment: You should restrict the search to the first 100 lines or so, if possible. Many of our C files have inconsistent indentation, and using this script with such a file, automatically relying on it to do the right thing, will result in even more inconsistencies. Restricting the search to the beginning of a file greatly reduces the probability of it finding a stray tab indentation. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 15:26:39 2009 From: report at bugs.python.org (Eric Smith) Date: Sun, 05 Apr 2009 13:26:39 +0000 Subject: [issue5686] Float formatting with no type code produces incorrect output for exponential notation In-Reply-To: <1238847617.81.0.331181634269.issue5686@psf.upfronthosting.co.za> Message-ID: <1238937999.16.0.513375086315.issue5686@psf.upfronthosting.co.za> Eric Smith added the comment: This isn't testing what I thought it was testing. I'd forgotten that format(x, '') is exactly equivalent to str(x). The better test is using a format string of '<': >>> 1e200.__format__('<') '1.0e+200' >>> 1e200.__format__(' invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 15:31:26 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 13:31:26 +0000 Subject: [issue5533] unittest can't deal with packages In-Reply-To: <1237659397.93.0.630701014314.issue5533@psf.upfronthosting.co.za> Message-ID: <1238938286.08.0.391927598039.issue5533@psf.upfronthosting.co.za> Georg Brandl added the comment: Your script is flawed in two parts: * it doesn't filter the return value of listdir(), which leads to each test being executed twice in the presence of .pyc files * __import__("foo.bar") does *not* return the foo.bar submodule, but the foo module. But that is all not relevant because your run_tests is not even called if unittest finds command line arguments that give test names. See unittest.TestProgram.parseArgs. ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 15:34:45 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 13:34:45 +0000 Subject: [issue1473979] test test_capi crashed -- thread.error: can't allocate lock Message-ID: <1238938485.81.0.984888035756.issue1473979@psf.upfronthosting.co.za> Georg Brandl added the comment: Can you retry with a new Python release? ---------- nosy: +georg.brandl resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 15:35:17 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 13:35:17 +0000 Subject: [issue1477450] test_bsddb skipped -- Failed to load on HP-UX 11.2i Message-ID: <1238938517.6.0.267445244937.issue1477450@psf.upfronthosting.co.za> Georg Brandl added the comment: Seems like that's the case. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 15:45:12 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 13:45:12 +0000 Subject: [issue1470540] XMLGenerator creates a mess with UTF-16 Message-ID: <1238939112.48.0.479084518737.issue1470540@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- dependencies: -Bugfix for #1470540 (XMLGenerator cannot output UTF-16) resolution: -> duplicate status: open -> closed superseder: -> Bugfix for #1470540 (XMLGenerator cannot output UTF-16) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 15:47:28 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 13:47:28 +0000 Subject: [issue1457119] Unifying pickle and cPickle exception class hierarchies Message-ID: <1238939248.63.0.847889266581.issue1457119@psf.upfronthosting.co.za> Georg Brandl added the comment: This is fine in Py3k, where there is only one set of pickling exceptions that can be raised. In 2.x it's best not to break backwards compatibility right now. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 15:48:32 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 13:48:32 +0000 Subject: [issue1438185] os.renames() crashes NTFS junctions Message-ID: <1238939312.87.0.138455875645.issue1438185@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- dependencies: -os.renames() crashes NTFS junctions resolution: -> duplicate status: open -> closed superseder: -> os.renames() crashes NTFS junctions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 15:48:59 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 13:48:59 +0000 Subject: [issue1436206] CGIHTTPServer doesn't handle path names with embeded space Message-ID: <1238939339.66.0.15930464067.issue1436206@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- dependencies: -CGIHTTPServer doesn't handle path names with embeded space resolution: -> duplicate status: open -> closed superseder: -> CGIHTTPServer doesn't handle path names with embeded space _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 15:49:59 2009 From: report at bugs.python.org (Robert Collins) Date: Sun, 05 Apr 2009 13:49:59 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238926585.6499.5.camel@fsol> Message-ID: <1238939379.28697.4.camel@lifeless-64> Robert Collins added the comment: On Sun, 2009-04-05 at 10:15 +0000, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > > > Our experience in bzr (we use this heavily, and migrated to it > > incrementally across our 17K fixture suite) is that we rarely need to > > use cleanups on dependent resources, and when we need to it has been > > very easy to migrate the dependent resource to use cleanups as well. > > I'm baffled. If you say you don't care about the order, why are you > arguing at all? I didn't say I don't care; I do - I care that it is robust and hard to misuse. Having addCleanup() when called from a tearDown lead to cleanups not being called would be an easy route to misuse. > [...] > > sequence 2: cleanup before teardown prevents using cleanups in base > > class setup methods > > The point is that sequence 2 can already be emulated using careful > "try...finally" in tearDown, while sequence 1 cannot. That is, sequence > 1 *needs* the addCleanup, while for sequence 2 it is a mere additional > convenience. I don't understand; neither sequence works - they are showing how any choice [that retains the current simple proposed mechanism] cannot interact without some failure modes with tearDown. Whichever point we choose to have cleanups execute can be entirely emulated using careful try:finally: in tearDown methods, so surely this is not an argument for either order. -Rob ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 15:50:59 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 13:50:59 +0000 Subject: [issue1396258] KeyboardInterrupt prevents return to Windows console Message-ID: <1238939459.52.0.497139507156.issue1396258@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing then. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 15:52:26 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 13:52:26 +0000 Subject: [issue1324770] Adding redblack tree to collections module Message-ID: <1238939546.55.0.247677136479.issue1324770@psf.upfronthosting.co.za> Georg Brandl added the comment: Let's reject it then. ---------- nosy: +georg.brandl resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 15:59:03 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 05 Apr 2009 13:59:03 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238939379.28697.4.camel@lifeless-64> Message-ID: <1238940022.6499.8.camel@fsol> Antoine Pitrou added the comment: > I don't understand; neither sequence works ???? > - they are showing how any > choice [that retains the current simple proposed mechanism] cannot > interact without some failure modes with tearDown. And I'm telling you one failure mode is more desireable than the other. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 16:10:08 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 05 Apr 2009 14:10:08 +0000 Subject: [issue1438185] os.renames() crashes NTFS junctions Message-ID: <1238940608.97.0.814584528161.issue1438185@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- superseder: os.renames() crashes NTFS junctions -> Patch for bug 1438185: os.renames deletes junction points _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 16:17:29 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 05 Apr 2009 14:17:29 +0000 Subject: [issue5694] spurious output in test_distutils In-Reply-To: <1238928226.78.0.181957189362.issue5694@psf.upfronthosting.co.za> Message-ID: <1238941126.6499.10.camel@fsol> Antoine Pitrou added the comment: > Antoine, I can't reproduce this with the current trunk and py3k branch. > > how do you launch the tests ? By doing `./python -m test.regrtest test_distutils` Apparently it happens in test_clean.cleanTestCase.test_simple_run. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 16:27:12 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 14:27:12 +0000 Subject: [issue1306484] compile() converts "filename" parameter to StringType Message-ID: <1238941632.37.0.533166464129.issue1306484@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't think this will be dealt with in the 2.x series. Python 3 already has support for Unicode file names, so it's out of date there. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 16:29:02 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 14:29:02 +0000 Subject: [issue1326077] traceback.py formats SyntaxError differently Message-ID: <1238941742.34.0.353542328466.issue1326077@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in trunk in r71237, 3k in r71239. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 16:31:49 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 14:31:49 +0000 Subject: [issue1283289] PyArg_ParseTupleAndKeywords gives misleading error message Message-ID: <1238941909.71.0.88418720849.issue1283289@psf.upfronthosting.co.za> Georg Brandl added the comment: Looks like the new message is in 2.6 as well. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 16:32:21 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 14:32:21 +0000 Subject: [issue1298835] vendor-packages directory. Message-ID: <1238941941.07.0.326473531149.issue1298835@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> tarek nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 16:38:23 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 14:38:23 +0000 Subject: [issue5508] maximum recursion depth exceeded in __subclasscheck__ In-Reply-To: <1237389950.95.0.980403444987.issue5508@psf.upfronthosting.co.za> Message-ID: <1238942303.14.0.870070932746.issue5508@psf.upfronthosting.co.za> Georg Brandl added the comment: The messages are now suppressed by the temporary bump of the recursion limit in PyErr_GivenExceptionMatches. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 16:40:16 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 14:40:16 +0000 Subject: [issue5370] unpickling vs. __getattr__ In-Reply-To: <1235597176.48.0.557535954175.issue5370@psf.upfronthosting.co.za> Message-ID: <1238942416.33.0.631727234286.issue5370@psf.upfronthosting.co.za> Georg Brandl added the comment: Updated docs in r71240. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 16:41:02 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 14:41:02 +0000 Subject: [issue5506] io.BytesIO doesn't support the buffer protocol In-Reply-To: <1237372813.02.0.863937398422.issue5506@psf.upfronthosting.co.za> Message-ID: <1238942462.46.0.598711700413.issue5506@psf.upfronthosting.co.za> Georg Brandl added the comment: Is this still unimplemented? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 16:47:09 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 14:47:09 +0000 Subject: [issue5461] python3 symlink In-Reply-To: <1236626563.57.0.797071883805.issue5461@psf.upfronthosting.co.za> Message-ID: <1238942829.15.0.513253962102.issue5461@psf.upfronthosting.co.za> Georg Brandl added the comment: Assigning to Benjamin to make sure that Python is installed as "python3" starting with 3.1. ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson, georg.brandl priority: -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 16:49:02 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 14:49:02 +0000 Subject: [issue5471] os.path.expanduser('~') doesnt works correctly when HOME is '/' In-Reply-To: <1236712575.55.0.379860744016.issue5471@psf.upfronthosting.co.za> Message-ID: <1238942942.34.0.284181040034.issue5471@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, committed in r71241. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 16:52:10 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 05 Apr 2009 14:52:10 +0000 Subject: [issue5506] io.BytesIO doesn't support the buffer protocol In-Reply-To: <1237372813.02.0.863937398422.issue5506@psf.upfronthosting.co.za> Message-ID: <1238943130.73.0.213241400953.issue5506@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes. I don't remember which use case I was thinking about when I suggested this, but it may be useful to e.g. write() all the data to a file object without actually making a copy (getvalue() does). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 16:55:18 2009 From: report at bugs.python.org (George Sakkis) Date: Sun, 05 Apr 2009 14:55:18 +0000 Subject: [issue5697] heapq.nlargest does not perform stable sort In-Reply-To: <1238943318.15.0.801467733966.issue5697@psf.upfronthosting.co.za> Message-ID: <1238943318.15.0.801467733966.issue5697@psf.upfronthosting.co.za> New submission from George Sakkis : According to the docs, heapq.nlargest should be equivalent to sorted(iterable, key=key, reverse=True)[:n], and since sorted() is stable, so should heapq.nlargest be. This is not the case: >>> s =[ ('Mike', -1), ('John', 3), ('George', 2), ('Adam', 3), ('Paul', -3), ('Peter', -2), ('Mary', -1) ] >>> heapq.nlargest(2, s, key=lambda x:abs(x[1])) [('Paul', -3), ('Adam', 3)] >>> sorted(s, key=lambda x:abs(x[1]), reverse=True)[:2] [('John', 3), ('Adam', 3)] The fix should be easy: --- heapq.py 2009-04-04 23:27:53.125000000 -0400 +++ heapq2.py 2009-04-05 10:51:32.187500000 -0400 @@ -133 +133 @@ -from operator import itemgetter +from operator import itemgetter, neg @@ -334 +334 @@ - it = izip(imap(key, in1), count(), in2) # decorate + it = izip(imap(key, in1), imap(neg, count()), in2) # decorate ---------- components: Library (Lib) messages: 85508 nosy: gsakkis severity: normal status: open title: heapq.nlargest does not perform stable sort type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:03:35 2009 From: report at bugs.python.org (Matthias Klose) Date: Sun, 05 Apr 2009 15:03:35 +0000 Subject: [issue5698] pydoc -w doesn't produce proper HTML In-Reply-To: <1238943815.07.0.410392153276.issue5698@psf.upfronthosting.co.za> Message-ID: <1238943815.07.0.410392153276.issue5698@psf.upfronthosting.co.za> New submission from Matthias Klose : [forwarded from http://bugs.debian.org/411524] """ If you feed the output of pydoc -w [some module] to the w3 validator, it complains about two issues: firstly, the doctype is wrong. It should be: not in the head would probably do. """ ---------- assignee: georg.brandl components: Documentation files: pydoc.diff keywords: needs review, patch, patch messages: 85509 nosy: doko, georg.brandl severity: normal status: open title: pydoc -w doesn't produce proper HTML type: behavior Added file: http://bugs.python.org/file13619/pydoc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:05:57 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 15:05:57 +0000 Subject: [issue5453] pydoc -k fails (release30-maint patch) In-Reply-To: <1236564146.1.0.579118375216.issue5453@psf.upfronthosting.co.za> Message-ID: <1238943957.06.0.659562610615.issue5453@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r71242. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:08:17 2009 From: report at bugs.python.org (Mher Movsisyan) Date: Sun, 05 Apr 2009 15:08:17 +0000 Subject: [issue5586] The documentation of os.makedirs is misleading In-Reply-To: <1238249792.26.0.0616878005738.issue5586@psf.upfronthosting.co.za> Message-ID: <1238944097.43.0.990228324067.issue5586@psf.upfronthosting.co.za> Mher Movsisyan added the comment: Sorry for confusion. I thought a "leaf directory" is an intermediate-level directory. >>> import os >>> os.makedirs("/tmp/a/b") >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:08:18 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 15:08:18 +0000 Subject: [issue5699] Strange interaction between -m and pydoc In-Reply-To: <1238944098.24.0.423048107372.issue5699@psf.upfronthosting.co.za> Message-ID: <1238944098.24.0.423048107372.issue5699@psf.upfronthosting.co.za> New submission from Georg Brandl : If you use "python -m pydoc", pydoc will not find standard modules written in Python. This leads to a traceback for example using "python -m pydoc -k sys". Somehow, sys.path gets modified in a strange way, which can be seen from $ python -i -m pydoc (...) >>> import sys >>> sys.path [... does not include /lib/python2.6 or /Lib ...] ---------- assignee: ncoghlan messages: 85512 nosy: georg.brandl, ncoghlan priority: normal severity: normal status: open title: Strange interaction between -m and pydoc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:08:28 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 15:08:28 +0000 Subject: [issue5699] Strange interaction between -m and pydoc In-Reply-To: <1238944098.24.0.423048107372.issue5699@psf.upfronthosting.co.za> Message-ID: <1238944108.23.0.831268305703.issue5699@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- components: +Library (Lib) versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:11:21 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 15:11:21 +0000 Subject: [issue5443] trivial typo in itertools documentation In-Reply-To: <1236531469.71.0.843632021292.issue5443@psf.upfronthosting.co.za> Message-ID: <1238944281.72.0.155752407328.issue5443@psf.upfronthosting.co.za> Georg Brandl added the comment: Has been fixed in trunk for some time. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:12:52 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 15:12:52 +0000 Subject: [issue5436] test_distutils fails with official Mac OS X Installer Disk Image (3.0.1) In-Reply-To: <1236446128.5.0.33521760843.issue5436@psf.upfronthosting.co.za> Message-ID: <1238944372.52.0.314366880885.issue5436@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing as fixed then. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:14:41 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 15:14:41 +0000 Subject: [issue5432] plistlib contains unescaped hex sequence in doc string In-Reply-To: <1236365621.57.0.647888417793.issue5432@psf.upfronthosting.co.za> Message-ID: <1238944481.79.0.391894431785.issue5432@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r71243, thanks! ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:17:19 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 15:17:19 +0000 Subject: [issue5416] str.replace does strange things when given a negative count In-Reply-To: <1236163931.77.0.818123555808.issue5416@psf.upfronthosting.co.za> Message-ID: <1238944639.18.0.260667513582.issue5416@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> georg.brandl nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:18:39 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 15:18:39 +0000 Subject: [issue5406] asyncore doc issue In-Reply-To: <1236019589.34.0.225430476333.issue5406@psf.upfronthosting.co.za> Message-ID: <1238944719.71.0.575052106429.issue5406@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing as "works for me". ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:20:57 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 15:20:57 +0000 Subject: [issue5390] Item 'Python x.x.x' in Add/Remove Programs list still lacks an icon In-Reply-To: <1235806015.04.0.902011396347.issue5390@psf.upfronthosting.co.za> Message-ID: <1238944857.26.0.408679204654.issue5390@psf.upfronthosting.co.za> Georg Brandl added the comment: It is also completely low-priority, and so it is perfectly understandable that Martin wants to fix more important problems. ---------- nosy: +georg.brandl priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:24:04 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 15:24:04 +0000 Subject: [issue5364] documentation in epub format In-Reply-To: <1235557178.12.0.454366670328.issue5364@psf.upfronthosting.co.za> Message-ID: <1238945044.35.0.400794458489.issue5364@psf.upfronthosting.co.za> Georg Brandl added the comment: In any case, this belongs in the Sphinx tracker: http://bitbucket.org/birkenfeld/sphinx/issue/140/ ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:25:15 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 15:25:15 +0000 Subject: [issue5351] Python tutorial error In-Reply-To: <1235396735.05.0.192999547844.issue5351@psf.upfronthosting.co.za> Message-ID: <1238945115.94.0.599595924569.issue5351@psf.upfronthosting.co.za> Georg Brandl added the comment: I still think that the section covers basic file I/O quite well, and since this is not Python-specific at all, you'll be better served with an introduction to programming in general if you want to know all about working with files. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:28:58 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 15:28:58 +0000 Subject: [issue5343] remove or make work pdb retval and rv In-Reply-To: <1235270046.51.0.683603570643.issue5343@psf.upfronthosting.co.za> Message-ID: <1238945338.28.0.775633867129.issue5343@psf.upfronthosting.co.za> Georg Brandl added the comment: It seems to me that retval works quite well, provided you call it in the frame where the return occurs: > /home/gbr/devel/python/x.py(2)f() -> return 123 (Pdb) step --Return-- > /home/gbr/devel/python/x.py(2)f()->123 -> return 123 (Pdb) retval 123 (Pdb) ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:30:24 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 15:30:24 +0000 Subject: [issue5330] profile and cProfile do not report C functions called with keyword arguments In-Reply-To: <1235135420.93.0.617344393794.issue5330@psf.upfronthosting.co.za> Message-ID: <1238945424.09.0.413036597828.issue5330@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:35:58 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sun, 05 Apr 2009 15:35:58 +0000 Subject: [issue5700] io.FileIO calls flush() after file closed In-Reply-To: <1238945758.46.0.01809197792.issue5700@psf.upfronthosting.co.za> Message-ID: <1238945758.46.0.01809197792.issue5700@psf.upfronthosting.co.za> New submission from Brian Quinlan : >>> import io >>> class MyIO(io.FileIO): ... def flush(self): ... print('closed:', self.closed) ... >>> f = MyIO('test.out', 'wb') >>> f.close() closed: True IMHO, calling flush() after the file has already been closed is incorrect behaviour. Search for "Possible py3k io wierdness" on python-dev for discussion. ---------- components: Library (Lib) files: remove_flush.diff keywords: patch messages: 85521 nosy: bquinlan severity: normal status: open title: io.FileIO calls flush() after file closed versions: Python 3.1 Added file: http://bugs.python.org/file13620/remove_flush.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 17:57:31 2009 From: report at bugs.python.org (Yngve AAdlandsvik) Date: Sun, 05 Apr 2009 15:57:31 +0000 Subject: [issue5701] ZipFile returns compressed data stream when encountering unsupported compression method In-Reply-To: <1238947051.8.0.105309388943.issue5701@psf.upfronthosting.co.za> Message-ID: <1238947051.8.0.105309388943.issue5701@psf.upfronthosting.co.za> New submission from Yngve AAdlandsvik : The attached .zip archive contains two uncompressed files (2! SCHEME.Z64, 3!SCHEME.Z64) and two files compressed with IMPLODE (1! SCHEME.Z64, 4!SCHEME.Z64), a compression method not currently supported in ZipFile. When using ZipFile.read() on the latter files, the compressed data stream is returned, while I assume the proper response would be to throw an exception of some kind to signal that the method is unsupported. ---------- components: Library (Lib) files: Scheme.zip messages: 85522 nosy: ymgve severity: normal status: open title: ZipFile returns compressed data stream when encountering unsupported compression method versions: Python 2.6 Added file: http://bugs.python.org/file13621/Scheme.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 18:06:20 2009 From: report at bugs.python.org (George Sakkis) Date: Sun, 05 Apr 2009 16:06:20 +0000 Subject: [issue5669] Extra heapq nlargest/nsmallest option for including ties In-Reply-To: <1238690598.13.0.569229974695.issue5669@psf.upfronthosting.co.za> Message-ID: <1238947580.17.0.624670608716.issue5669@psf.upfronthosting.co.za> George Sakkis added the comment: Posted recipe at http://code.activestate.com/recipes/576712/. You were right, the implementation gets significantly hairier but I think it's worth having this option. It's also faster than using sorted/bisect as len(seq)/N increases and there is no pathologically high number of ties at the last position (as in your test case). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 18:28:34 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 16:28:34 +0000 Subject: [issue5455] csv module no longer works as expected when file opened in binary mode In-Reply-To: <1236566919.88.0.376307932068.issue5455@psf.upfronthosting.co.za> Message-ID: <1238948914.45.0.531569196229.issue5455@psf.upfronthosting.co.za> Georg Brandl added the comment: Setting #4847 as superseder. ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> csv fails when file is opened in binary mode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 18:29:36 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 16:29:36 +0000 Subject: [issue2421] doc\make.bat fails for htmlhelp because of hardcoded filename In-Reply-To: <1205921508.97.0.101247618577.issue2421@psf.upfronthosting.co.za> Message-ID: <1238948976.07.0.734542185255.issue2421@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> duplicate status: open -> closed superseder: -> .chm build process on Windows doesn't use the right filename _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 18:30:55 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 16:30:55 +0000 Subject: [issue5444] .chm build process on Windows doesn't use the right filename In-Reply-To: <1236539934.85.0.997903417745.issue5444@psf.upfronthosting.co.za> Message-ID: <1238949055.29.0.140298133925.issue5444@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r71249. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 18:33:05 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 16:33:05 +0000 Subject: [issue5376] Wrong ImportError message if module is not readable In-Reply-To: <1235663793.95.0.193952339163.issue5376@psf.upfronthosting.co.za> Message-ID: <1238949185.47.0.940592161021.issue5376@psf.upfronthosting.co.za> Georg Brandl added the comment: Since this is not supported anyway (and never was), closing as "won't fix". ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 18:34:05 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 16:34:05 +0000 Subject: [issue5340] Change in cgi behavior breaks existing software In-Reply-To: <1235243512.17.0.731468064037.issue5340@psf.upfronthosting.co.za> Message-ID: <1238949245.87.0.161526978744.issue5340@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> facundobatista nosy: +facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 18:35:38 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 16:35:38 +0000 Subject: [issue5285] hmac throws TypeErrors In-Reply-To: <1234827307.61.0.0730804396483.issue5285@psf.upfronthosting.co.za> Message-ID: <1238949338.12.0.150292064906.issue5285@psf.upfronthosting.co.za> Georg Brandl added the comment: Python 3 behavior is correct. Since HMAC operates on bytes, not text, only bytes are accepted. In Python 2, the acceptance of Unicode strings is more an accident than a feature. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 19:17:57 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 17:17:57 +0000 Subject: [issue5298] Inconsistency in C-API thread docs In-Reply-To: <1234903331.05.0.935638170242.issue5298@psf.upfronthosting.co.za> Message-ID: <1238951877.04.0.382041469387.issue5298@psf.upfronthosting.co.za> Georg Brandl added the comment: Should be clearer as of r71251. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 19:19:23 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 17:19:23 +0000 Subject: [issue5299] PyGILState_Ensure()/PyGILState_Release() documentation incomplete? In-Reply-To: <1234903414.06.0.277492478089.issue5299@psf.upfronthosting.co.za> Message-ID: <1238951963.31.0.320894525647.issue5299@psf.upfronthosting.co.za> Georg Brandl added the comment: I think the paragraph Every call to :cfunc:`PyGILState_Ensure` must be matched by a call to :cfunc:`PyGILState_Release` on the same thread. says exactly what you want to know. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 19:21:59 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 17:21:59 +0000 Subject: [issue1217881] pydoc includes unnecessary files for a package. Message-ID: <1238952119.9.0.698434993521.issue1217881@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't think that it is common practice to list submodules in __all__, only names really exported from the package. Therefore, this does not seem like a good change to make. ---------- nosy: +georg.brandl resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 19:27:22 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 17:27:22 +0000 Subject: [issue1256786] slice object uses -1 as exclusive end-bound Message-ID: <1238952442.54.0.459412412177.issue1256786@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing as "won't fix". There's another issue that deals with better documentation for slicing semantics. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 19:27:54 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 17:27:54 +0000 Subject: [issue1249749] Encodings and aliases do not match runtime Message-ID: <1238952474.63.0.797537337858.issue1249749@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> georg.brandl nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 19:29:56 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 17:29:56 +0000 Subject: [issue1251026] cgitb gives wrong lineno inside try:..finally: Message-ID: <1238952596.91.0.749723433744.issue1251026@psf.upfronthosting.co.za> Georg Brandl added the comment: Works for me as well. ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 19:30:32 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 17:30:32 +0000 Subject: [issue1278102] help() broken, especially on Windows Message-ID: <1238952632.4.0.484373708944.issue1278102@psf.upfronthosting.co.za> Georg Brandl added the comment: This is out of date now that Python includes the documentation for those keywords. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 19:32:27 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 17:32:27 +0000 Subject: [issue1446619] extended slice behavior inconsistent with docs Message-ID: <1238952747.32.0.639969646609.issue1446619@psf.upfronthosting.co.za> Georg Brandl added the comment: See also #1265100. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 19:32:30 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 17:32:30 +0000 Subject: [issue1265100] sequence slicing documentation incomplete Message-ID: <1238952750.09.0.971465072255.issue1265100@psf.upfronthosting.co.za> Georg Brandl added the comment: There's also #1446619, so closing as a duplicate. ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> extended slice behavior inconsistent with docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 19:35:58 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 17:35:58 +0000 Subject: [issue1229680] Tracing C function calls and keyword arguments Message-ID: <1238952958.43.0.0726923845514.issue1229680@psf.upfronthosting.co.za> Georg Brandl added the comment: Setting #5330 as a superseder, which also has a patch. ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> profile and cProfile do not report C functions called with keyword arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 19:36:02 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 17:36:02 +0000 Subject: [issue5330] profile and cProfile do not report C functions called with keyword arguments In-Reply-To: <1235135420.93.0.617344393794.issue5330@psf.upfronthosting.co.za> Message-ID: <1238952962.6.0.130956625271.issue5330@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> nbastin nosy: +nbastin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 19:41:16 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 17:41:16 +0000 Subject: [issue1144263] reload() is broken for C extension objects Message-ID: <1238953276.34.0.152193188614.issue1144263@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree with Grant. There seems to be no way this can be sanely implemented with today's infrastructure. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 19:49:42 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 17:49:42 +0000 Subject: [issue1159139] cgi.py invalid REQUEST_METHOD set Message-ID: <1238953782.21.0.414217043681.issue1159139@psf.upfronthosting.co.za> Georg Brandl added the comment: Turns out this is caused by setting REQUEST_METHOD to 'cgi', which is completely unmotivated. Not doing this lets the example script work fine. ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 19:51:06 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 17:51:06 +0000 Subject: [issue1113244] Please add do-while guard to Py_DECREF etc. Message-ID: <1238953866.86.0.9825586115.issue1113244@psf.upfronthosting.co.za> Georg Brandl added the comment: Assigning to Matthias since he added do-while(0) to Py_DECREF in r71229. ---------- assignee: -> doko nosy: +doko, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:06:57 2009 From: report at bugs.python.org (Steven Bethard) Date: Sun, 05 Apr 2009 18:06:57 +0000 Subject: [issue1446619] extended slice behavior inconsistent with docs Message-ID: <1238954817.14.0.314481753361.issue1446619@psf.upfronthosting.co.za> Changes by Steven Bethard : ---------- nosy: +bethard -bediviere.historic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:16:40 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 18:16:40 +0000 Subject: [issue993580] inspect.findsource does not call linecache.checkcache Message-ID: <1238955400.16.0.944945384486.issue993580@psf.upfronthosting.co.za> Georg Brandl added the comment: Setting it as a superseder, then. ---------- dependencies: -inspect.getsource doesn't update when a module is reloaded nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> inspect.getsource doesn't update when a module is reloaded _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:17:25 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 18:17:25 +0000 Subject: [issue1030499] os.path.join() does not raise TypeError Message-ID: <1238955445.28.0.304583497184.issue1030499@psf.upfronthosting.co.za> Georg Brandl added the comment: +1 for duck typing. ---------- nosy: +georg.brandl resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sun Apr 5 20:18:34 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sun, 05 Apr 2009 18:18:34 +0000 Subject: [issue5685] use tarinfo module in distutils In-Reply-To: <1238833900.11.0.222660239752.issue5685@psf.upfronthosting.co.za> Message-ID: <1238955514.18.0.748388173711.issue5685@psf.upfronthosting.co.za> Tarek Ziad? added the comment: superseded by #1886 ---------- status: open -> closed superseder: -> Permit to easily use distutils "--formats=tar,gztar,bztar" on all systems _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sun Apr 5 20:18:52 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sun, 05 Apr 2009 18:18:52 +0000 Subject: [issue1886] Permit to easily use distutils "--formats=tar, gztar, bztar" on all systems In-Reply-To: <1200950920.27.0.810221024065.issue1886@psf.upfronthosting.co.za> Message-ID: <1238955532.96.0.941833480457.issue1886@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- priority: normal -> high versions: +Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:25:06 2009 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 05 Apr 2009 18:25:06 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238955906.16.0.586072045474.issue2578@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:25:20 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 18:25:20 +0000 Subject: [issue836058] socket.send() on Win98 behaves as nonblocking when timeout is set Message-ID: <1238955920.07.0.0249627396465.issue836058@psf.upfronthosting.co.za> Georg Brandl added the comment: Let's assume it is Win9x-only. ---------- dependencies: -Inappropriate error received using socket timeout on Windows. nosy: +georg.brandl resolution: -> out of date status: open -> closed superseder: -> Inappropriate error received using socket timeout on Windows. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:25:41 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 18:25:41 +0000 Subject: [issue831574] Solaris term.h needs curses.h Message-ID: <1238955941.4.0.372993767119.issue831574@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:27:03 2009 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 05 Apr 2009 18:27:03 +0000 Subject: [issue2703] SimpleXMLRPCDispatcher.__init__ is not python2.4-backward-compatible In-Reply-To: <1209290195.97.0.404790617339.issue2703@psf.upfronthosting.co.za> Message-ID: <1238956023.12.0.804290319719.issue2703@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'm -0, but if the tests pass and Matthias wants to commit this to 2.6 and 2.7, it's fine with me. ---------- assignee: -> doko nosy: +barry resolution: -> accepted versions: +Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:28:46 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 18:28:46 +0000 Subject: [issue813198] Migrate PEP material to docs Message-ID: <1238956126.75.0.210056956502.issue813198@psf.upfronthosting.co.za> Georg Brandl added the comment: This issue is very unspecific, and much documentation has been added since. If something is still missing, a new issue should be opened. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:29:41 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 18:29:41 +0000 Subject: [issue809887] Improve pdb breakpoint feedback Message-ID: <1238956181.63.0.77828082026.issue809887@psf.upfronthosting.co.za> Georg Brandl added the comment: Why do you propose closing? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sun Apr 5 20:34:26 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sun, 05 Apr 2009 18:34:26 +0000 Subject: [issue5694] spurious output in test_distutils In-Reply-To: <1238890583.06.0.607271052329.issue5694@psf.upfronthosting.co.za> Message-ID: <1238956466.31.0.500671099864.issue5694@psf.upfronthosting.co.za> Tarek Ziad? added the comment: fixed in r71253 and r71254 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:35:08 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 18:35:08 +0000 Subject: [issue602893] cgitb tracebacks not accessible Message-ID: <1238956508.72.0.861020228611.issue602893@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed a similar patch in r71255. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:41:06 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 18:41:06 +0000 Subject: [issue957381] bdist_rpm fails on redhat9, fc1, fc2 Message-ID: <1238956866.24.0.903536216477.issue957381@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:41:37 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 18:41:37 +0000 Subject: [issue1169193] Handle ungzipped man pages in rpm builds correctly Message-ID: <1238956897.79.0.493002180887.issue1169193@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing this one as duplicate. ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> bdist_rpm fails when installing man pages _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:42:58 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 18:42:58 +0000 Subject: [issue848910] Enable crosscompilation Message-ID: <1238956978.45.0.48452166765.issue848910@psf.upfronthosting.co.za> Georg Brandl added the comment: Agreed. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:43:53 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 18:43:53 +0000 Subject: [issue500698] Taint a la Perl? Message-ID: <1238957033.71.0.108505915971.issue500698@psf.upfronthosting.co.za> Georg Brandl added the comment: This is too vague and too large an issue to be tracked by an RFE issue. Concrete proposals and implementations must go through the PEP process. ---------- nosy: +georg.brandl resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:44:40 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 18:44:40 +0000 Subject: [issue1170065] HTTPResponse.getheaders() returns lowercased header names Message-ID: <1238957080.31.0.744689635386.issue1170065@psf.upfronthosting.co.za> Georg Brandl added the comment: Setting as superseder. ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> urllib2 header capitalization _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:45:18 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 18:45:18 +0000 Subject: [issue736428] allow HTMLParser error recovery Message-ID: <1238957118.44.0.019977284874.issue736428@psf.upfronthosting.co.za> Georg Brandl added the comment: Setting as superseder. ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> allow HTMLParser to continue after a parse error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:48:19 2009 From: report at bugs.python.org (Brett Cannon) Date: Sun, 05 Apr 2009 18:48:19 +0000 Subject: [issue5442] [3.1alpha1,2] test_importlib fails on Mac OSX 10.5.6 In-Reply-To: <1236517160.74.0.61108619715.issue5442@psf.upfronthosting.co.za> Message-ID: <1238957299.73.0.68531543894.issue5442@psf.upfronthosting.co.za> Brett Cannon added the comment: Something is wrong with your build, Ismail, because most of those failures are because of things that were added between alpha1 and alpha2. But to speed this up, can you tell me what the file I attached to the issue prints out? ---------- Added file: http://bugs.python.org/file13622/tester.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 20:59:56 2009 From: report at bugs.python.org (Brett Cannon) Date: Sun, 05 Apr 2009 18:59:56 +0000 Subject: [issue5695] test_logging fails when run twice in a row In-Reply-To: <1238929870.66.0.363687552424.issue5695@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: Yep, my mistake. To make up for my screw-up I backported the change to py3k in r71259. In trunk you might want to make the test more robust by moving the warnings filter change to within the try statement like I did in py3k to prevent that from throwing an exception and preventing the captureWarnings(False) call from being executed. ---------- Added file: http://bugs.python.org/file13623/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Yep, my mistake. To make up for my screw-up I backported the change to py3k in r71259. In trunk you might want to make the test more robust by moving the warnings filter change to within the try statement like I did in py3k to prevent that from throwing an exception and preventing the captureWarnings(False) call from being executed.
From report at bugs.python.org Sun Apr 5 21:05:36 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 05 Apr 2009 19:05:36 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238958336.01.0.684452375193.issue2578@psf.upfronthosting.co.za> Gregory P. Smith added the comment: fyi - Your docs in unittest-assertis.diff mention the wrong method name (assertIsNotNone instead of assertIsNot). fix that and commit. The unittest-sameelements.diff patch looks good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 21:13:37 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 05 Apr 2009 19:13:37 +0000 Subject: [issue1202] zlib.crc32() and adler32() return value In-Reply-To: <1190719871.47.0.233788425538.issue1202@psf.upfronthosting.co.za> Message-ID: <1238958817.23.0.407849472144.issue1202@psf.upfronthosting.co.za> Gregory P. Smith added the comment: J. David Ib??ez - do you still happen to have that Document.odt laying around? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 21:13:39 2009 From: report at bugs.python.org (Ismail Donmez) Date: Sun, 05 Apr 2009 19:13:39 +0000 Subject: [issue5442] [3.1alpha1,2] test_importlib fails on Mac OSX 10.5.6 In-Reply-To: <1236517160.74.0.61108619715.issue5442@psf.upfronthosting.co.za> Message-ID: <1238958819.85.0.480385897378.issue5442@psf.upfronthosting.co.za> Ismail Donmez added the comment: [~]> python3.1 tester.py original name: .CFUserTextEncoding changed name: .CFUSERTEXTENCODING case-sensitive I'll do a rebuild just in case. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 21:21:16 2009 From: report at bugs.python.org (R. David Murray) Date: Sun, 05 Apr 2009 19:21:16 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1238959276.08.0.282036140986.issue2170@psf.upfronthosting.co.za> R. David Murray added the comment: Andrew, any objection to my going ahead and applying this patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 21:22:42 2009 From: report at bugs.python.org (Michael Foord) Date: Sun, 05 Apr 2009 19:22:42 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238959362.35.0.334182940809.issue2578@psf.upfronthosting.co.za> Michael Foord added the comment: Committed in revision 71263. Closing as there is nothing outstanding on this issue. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 21:23:30 2009 From: report at bugs.python.org (Steve Purcell) Date: Sun, 05 Apr 2009 19:23:30 +0000 Subject: [issue2578] additional unittest type equality methods In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1238959410.1.0.637071473659.issue2578@psf.upfronthosting.co.za> Changes by Steve Purcell : ---------- nosy: -purcell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 22:26:54 2009 From: report at bugs.python.org (Michael Foord) Date: Sun, 05 Apr 2009 20:26:54 +0000 Subject: [issue2821] unittest.py sys.exit error In-Reply-To: <1210532457.78.0.053406582463.issue2821@psf.upfronthosting.co.za> Message-ID: <1238963214.59.0.812135923929.issue2821@psf.upfronthosting.co.za> Michael Foord added the comment: IDLE catches the SystemExit function raised by TestProgram().runTests() and prints the traceback. Not a bug in unittest. ---------- nosy: +michael.foord resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 22:36:00 2009 From: report at bugs.python.org (Michael Foord) Date: Sun, 05 Apr 2009 20:36:00 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238963760.5.0.575228492086.issue5679@psf.upfronthosting.co.za> Michael Foord added the comment: I'm in favour of running clean ups afterwards on the basis that it makes things possible that would otherwise not be possible. > If your cleanup relies on something which has been set up during setUp > and will be dropped during tearDown (a database connection, a temp dir, > an ssh session, whatever), then the cleanup must be run before the > teardown. But this is a function of whichever way we do it - and so not an argument for one way or the other. Conversely if you write a tearDown that relies on resources existing that will later be removed by a clean up then clean ups must be run afterwards. > The point is that sequence 2 can already be emulated using careful > "try...finally" in tearDown, while sequence 1 cannot. That is, sequence > 1 *needs* the addCleanup, while for sequence 2 it is a mere additional > convenience. Which is an argument in favour of running clean ups afterwards. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 22:38:36 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 20:38:36 +0000 Subject: [issue459007] Document sys.path on Windows Message-ID: <1238963916.77.0.865837042409.issue459007@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: mhammond -> georg.brandl nosy: +georg.brandl priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 22:57:29 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 20:57:29 +0000 Subject: [issue5697] heapq.nlargest does not perform stable sort In-Reply-To: <1238943318.15.0.801467733966.issue5697@psf.upfronthosting.co.za> Message-ID: <1238965049.21.0.414108220898.issue5697@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 23:10:12 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 05 Apr 2009 21:10:12 +0000 Subject: [issue5698] pydoc -w doesn't produce proper HTML In-Reply-To: <1238943815.07.0.410392153276.issue5698@psf.upfronthosting.co.za> Message-ID: <1238965812.72.0.419561077652.issue5698@psf.upfronthosting.co.za> Georg Brandl added the comment: The DOCTYPE fix is fine. However, I'm not sure about the charset -- why should it be UTF-8? Pydoc will output anything in docstrings, which can be in any encoding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 23:15:02 2009 From: report at bugs.python.org (DSM) Date: Sun, 05 Apr 2009 21:15:02 +0000 Subject: [issue5697] heapq.nlargest does not perform stable sort In-Reply-To: <1238943318.15.0.801467733966.issue5697@psf.upfronthosting.co.za> Message-ID: <1238966102.16.0.580324857171.issue5697@psf.upfronthosting.co.za> DSM added the comment: I can't reproduce in current python, and the relevant lines now look like it = izip(iterable, count(0,-1)) # decorate it = izip(imap(key, in1), count(0,-1), in2) # decorate It seems that these were fixed long ago by rhettinger in r53244, with tests checked in to verify behaviour. ---------- nosy: +dsm001 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 23:19:04 2009 From: report at bugs.python.org (Michael Foord) Date: Sun, 05 Apr 2009 21:19:04 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238966344.06.0.0201147134185.issue5679@psf.upfronthosting.co.za> Michael Foord added the comment: A use case for running clean ups before tearDown (in which case addCleanUp would need to raise an exception if called during tearDown). You have existing code which (for example) creates an SSH connection in setUp and removes it in tearDown. If clean ups are run after tearDown then you can't use addCleanup inside tests to deallocate resources that rely on the SSH connection being there (i.e. issue a remote command). Switching to use clean ups would require rewriting the existing code. Running clean ups before tearDown is more likely to fit in with existing test code. The downsides are that it makes adding clean ups in tearDown impossible (but why would you want to do that?) and you can't use clean ups for any resource accessed in tearDown (which you may want to do but won't be the case for any code that currently exists...). We probably need a third party arbiter to pick which is the most sane. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 23:22:36 2009 From: report at bugs.python.org (Matthias Klose) Date: Sun, 05 Apr 2009 21:22:36 +0000 Subject: [issue1113244] Please add do-while guard to Py_DECREF etc. Message-ID: <1238966556.2.0.334742050149.issue1113244@psf.upfronthosting.co.za> Matthias Klose added the comment: committed these in r71229 and r71271. I'm not yet closing the report. tim_one, I will conditionalize these, but I'm unsure if these should be conditionalized on compilers which are known not to optimize, or if it should be just conditionalized on gcc (and icc?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 23:26:31 2009 From: report at bugs.python.org (Virgil Dupras) Date: Sun, 05 Apr 2009 21:26:31 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238966791.57.0.662883247642.issue5679@psf.upfronthosting.co.za> Virgil Dupras added the comment: So, we are talking about adding a feature that could cause problem whether cleanup is performed before tearDown or after tearDown. Don't we risk confusing developers who are not familiar with the cleanup order? Do we really want to add this feature? The added functionality doesn't seem so attractive compared to the risk of confusion. We might as well continue to let the developers implement this feature in their own TestCase subclasses (for example, my own subclass already implement a TestCase.create_tmpdir(name) (which does cleanup, of course), which is easier to use than the rmtree example that was given as a use case). At least, when they do, they know about the cleanup order. ---------- nosy: +vdupras _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 23:31:39 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 05 Apr 2009 21:31:39 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238966791.57.0.662883247642.issue5679@psf.upfronthosting.co.za> Message-ID: <1238967185.6499.19.camel@fsol> Antoine Pitrou added the comment: > So, we are talking about adding a feature that could cause problem whether > cleanup is performed before tearDown or after tearDown. Don't we risk > confusing developers who are not familiar with the cleanup order? Well, we could do both. Call cleanups before tearDown (all the while popping them), call tearDown, and call the new cleanups. If the cleanup machinery is written carefully enough, you may even be able to add another cleanup during a cleanup :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 23:35:00 2009 From: report at bugs.python.org (Michael Foord) Date: Sun, 05 Apr 2009 21:35:00 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238967300.13.0.223910288214.issue5679@psf.upfronthosting.co.za> Michael Foord added the comment: This is actually a minor point about the order things happen in. I don't think it will cause confusion in practise once we have made a decision and documented it. Particularly if we decide to call clean ups before tearDown then I will make adding new ones during tearDown raise an exception. I did think about having two separate clean up stacks - one for those added during setUp and one for those added during tests, but that is starting to get silly. The point about this patch is that it makes the deallocation of resources a lot simpler without having to manually track them inside your test (nested try finallys for this are not uncommon in the tests I've seen) and the fact that this mechanism is already in use in the test frameworks of three major projects indicate that it is definitely worthwhile. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 23:48:26 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 05 Apr 2009 21:48:26 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238968106.91.0.55233928845.issue5679@psf.upfronthosting.co.za> Garrett Cooper added the comment: I see the validity in the concern raised by Virgil: I think this can be simplified from a user perspective by saying `I'm electing to use cleanUp over tearDown'. The two systems are similar, but also very different semantically as tearDown gets executed in the event of test completion (regardless of whether or not it passed) whereas cleanUp gets executed based on what occurs in setUp. Or am I missing the boat here on what's trying to be accomplished? We really shouldn't be mixing and matching both implementations because that will confuse people... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 23:50:34 2009 From: report at bugs.python.org (Retro) Date: Sun, 05 Apr 2009 21:50:34 +0000 Subject: [issue5702] str.isprintable() -> str.is_printable() In-Reply-To: <1238968234.72.0.0648337520499.issue5702@psf.upfronthosting.co.za> Message-ID: <1238968234.72.0.0648337520499.issue5702@psf.upfronthosting.co.za> New submission from Retro : Please consider of making the descriptor isprintable() of the str object be named with an underscore as is_printable(). ---------- components: Demos and Tools messages: 85571 nosy: Retro severity: normal status: open title: str.isprintable() -> str.is_printable() versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 23:51:59 2009 From: report at bugs.python.org (Robert Collins) Date: Sun, 05 Apr 2009 21:51:59 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238967185.6499.19.camel@fsol> Message-ID: <1238968308.28697.36.camel@lifeless-64> Robert Collins added the comment: On Sun, 2009-04-05 at 21:31 +0000, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > > > So, we are talking about adding a feature that could cause problem whether > > cleanup is performed before tearDown or after tearDown. Don't we risk > > confusing developers who are not familiar with the cleanup order? > > Well, we could do both. Call cleanups before tearDown (all the while > popping them), call tearDown, and call the new cleanups. I think this makes cleanups harder to explain, but yes we could do it. (Its harder because its no longer clearly a LIFO as cleanups added before teardown at not executed last). > If the cleanup machinery is written carefully enough, you may even be > able to add another cleanup during a cleanup :-) I've been meaning to tweak the patch - rather than + for function, args, kwargs in reversed(self._cleanups): it should be + while self._cleanups: + function, args, kwargs = self._cleanups.pop(-1) precisely to allow this. The point I've been trying to make isn't just that after everything is clearly best (which is subjective), but that dropping cleanups from user code is clearly wrong (something I hope we all agree on) and that its harder to have bugs like that if cleanups run after teardown. @Antoine I appreciate that you feel very strongly about this; I'm at a bit of a loss why, given that I've been working with this feature for over 3 *years* and we've not once had headaches or confusion related to the discussed sequencing failure modes - and our code runs it after all the user code. I've tried my level best to document why it works best after running after all the user code, but ultimately whoever is committing this code to python needs to make a call about what you think is best. It would be nice if you can learn from our experience, but I'm about out of energy to discuss this; certainly when we're down to authority by posturing it seems like fruitful discussion is rather over. @Michael - you may have a convenience function that uses addCleanup - if that gets called during tearDown then while its a little odd its still correct for cleanups the convenience function added to get called. It's only in the light of having to really explain why it should be afterwards that I've realised we had a latent bug - fixed in the change above [and a test for it is pretty obvious]. -Rob ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sun Apr 5 23:52:37 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sun, 05 Apr 2009 21:52:37 +0000 Subject: [issue1491431] distutils.filelist.glob_to_re fails Message-ID: <1238968357.72.0.461598670076.issue1491431@psf.upfronthosting.co.za> Tarek Ziad? added the comment: fixed in r71280 and r71284 backported in r71281 and r71285 ---------- status: open -> closed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 5 23:52:57 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 05 Apr 2009 21:52:57 +0000 Subject: [issue5702] str.isprintable() -> str.is_printable() In-Reply-To: <1238968234.72.0.0648337520499.issue5702@psf.upfronthosting.co.za> Message-ID: <1238968377.96.0.571211037365.issue5702@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Sorry, it has already been released this way. Besides, all other str methods follow this convention. ---------- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 6 00:05:49 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sun, 05 Apr 2009 22:05:49 +0000 Subject: [issue436259] [Windows] exec*/spawn* problem with spaces in args Message-ID: <1238969149.19.0.548159449888.issue436259@psf.upfronthosting.co.za> Tarek Ziad? added the comment: I am closing it. I have also added a test case for this function, for future changes. r71286 ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 6 00:08:13 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sun, 05 Apr 2009 22:08:13 +0000 Subject: [issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures In-Reply-To: <1236943653.87.0.451270681282.issue5482@psf.upfronthosting.co.za> Message-ID: <1238969293.95.0.469241547057.issue5482@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Rudd-O, I am trying to see if we can build a team of people that could work on python <-> RPM tasks to adress all related issues. I'll let you know when it's set. ---------- priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 00:13:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sun, 05 Apr 2009 22:13:02 +0000 Subject: [issue809887] Improve pdb breakpoint feedback Message-ID: <1238969582.91.0.677901196027.issue809887@psf.upfronthosting.co.za> Daniel Diniz added the comment: I had already realized[1] (thanks John!) I had no good reason to suggest closing this one, bit forgot to update the issue, sorry. I think it was a knee-jerk reaction to a RFE that was open for six years without a 'ditto', but agree it's a valid request. [1] http://mail.python.org/pipermail/python-dev/2009-February/086210.html ---------- priority: low -> normal _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 6 00:16:44 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sun, 05 Apr 2009 22:16:44 +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: <1238969804.91.0.913764689613.issue2943@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Does it mean you won't get the settings for "include", "lib", "libpath" and "path" when you call vcvarsall.bat *only* of the SDK is not installed, or can't we have other cases ? If the latter is true, maybe a better formatted Error message where we list founded values and the list of missing values. ---------- priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 00:22:55 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 05 Apr 2009 22:22:55 +0000 Subject: [issue2029] "python -m pydoc -g" fails In-Reply-To: <1202387094.14.0.198769715828.issue2029@psf.upfronthosting.co.za> Message-ID: <1238970175.39.0.0614784380197.issue2029@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 00:24:00 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 05 Apr 2009 22:24:00 +0000 Subject: [issue5703] inside *currentmodule* some links is disabled In-Reply-To: <1238970240.42.0.00430283210892.issue5703@psf.upfronthosting.co.za> Message-ID: <1238970240.42.0.00430283210892.issue5703@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : See http://docs.python.org/library/email.mime.html Inside MIMEApplication documentation, link to MIMEApplication is enabled but link to MIMENonMultipart is disabled. This happens because MIMENonMultipart is not in email.mime.application (specified by currentmodule directive). Is this sphinx bug? Or should MIMENonMultipart be written in full name like email.mime.nonmultipart.MIMENonMultipart? ---------- assignee: georg.brandl components: Documentation messages: 85579 nosy: georg.brandl, ocean-city severity: normal status: open title: inside *currentmodule* some links is disabled versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 00:24:47 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 05 Apr 2009 22:24:47 +0000 Subject: [issue5699] Strange interaction between -m and pydoc In-Reply-To: <1238944098.24.0.423048107372.issue5699@psf.upfronthosting.co.za> Message-ID: <1238970287.71.0.576688641947.issue5699@psf.upfronthosting.co.za> Nick Coghlan added the comment: Duplicate of issue 2029 - it's apparently a bug in pydoc's sys.path manipulation, but I haven't got around to reviewing Guilherme's patch yet. ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 00:24:49 2009 From: report at bugs.python.org (Simon Anders) Date: Sun, 05 Apr 2009 22:24:49 +0000 Subject: [issue5704] Command line option '-3' should imply '-t' In-Reply-To: <1238970289.11.0.298374772869.issue5704@psf.upfronthosting.co.za> Message-ID: <1238970289.11.0.298374772869.issue5704@psf.upfronthosting.co.za> New submission from Simon Anders : The '-3' command line option in Python 2.6 is supposed to warn whenever encountering something that would throw an error in Python 3. Mixing of tabs and spaces has become illegal in Python 3. However, Python 2.6, called with '-3', passes silently over this unless '-t' was given, too. Would it not be more consistent to let '-3' imply '-t'? ---------- components: Interpreter Core messages: 85581 nosy: sanders_muc severity: normal status: open title: Command line option '-3' should imply '-t' type: behavior versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 00:37:56 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 05 Apr 2009 22:37:56 +0000 Subject: [issue5705] os.getpwent returns unsigned 32bit value, os.setuid refuses it In-Reply-To: <1238971076.18.0.458968995084.issue5705@psf.upfronthosting.co.za> Message-ID: <1238971076.18.0.458968995084.issue5705@psf.upfronthosting.co.za> New submission from Gregory P. Smith : Running test_httpservers on a 64-bit build of Python 2.7 trunk on OS X 10.5: (I added a print "nobody=", nobody) test_authorization (__main__.CGIHTTPServerTestCase) ... nobody= 4294967294 ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 55322) Traceback (most recent call last): File "/Users/greg/sandbox/python/trunk/Lib/CGIHTTPServer.py", line 251, in run_cgi os.setuid(nobody) OverflowError: signed integer is greater than maximum ---------- assignee: gregory.p.smith keywords: 64bit messages: 85582 nosy: gregory.p.smith priority: normal severity: normal status: open title: os.getpwent returns unsigned 32bit value, os.setuid refuses it type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 6 00:59:45 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sun, 05 Apr 2009 22:59:45 +0000 Subject: [issue5095] msi missing from "bdist --help-formats" In-Reply-To: <1233198350.56.0.182108150047.issue5095@psf.upfronthosting.co.za> Message-ID: <1238972385.82.0.685030666484.issue5095@psf.upfronthosting.co.za> Tarek Ziad? added the comment: added in r71291 and r71293 Thx Steven ---------- status: open -> closed versions: +Python 3.0 -Python 2.5, Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 01:18:04 2009 From: report at bugs.python.org (Jack Diederich) Date: Sun, 05 Apr 2009 23:18:04 +0000 Subject: [issue5696] test_telnetlib augmentation In-Reply-To: <1238895962.87.0.497816781262.issue5696@psf.upfronthosting.co.za> Message-ID: <1238973484.08.0.737032962223.issue5696@psf.upfronthosting.co.za> Jack Diederich added the comment: added some tests for testing IAC commands and SB data handling. ---------- Added file: http://bugs.python.org/file13624/test_telnetlib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 01:18:40 2009 From: report at bugs.python.org (Jack Diederich) Date: Sun, 05 Apr 2009 23:18:40 +0000 Subject: [issue5696] test_telnetlib augmentation In-Reply-To: <1238895962.87.0.497816781262.issue5696@psf.upfronthosting.co.za> Message-ID: <1238973520.47.0.630010884099.issue5696@psf.upfronthosting.co.za> Changes by Jack Diederich : Removed file: http://bugs.python.org/file13617/test_telnetlib.patch _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 6 01:18:45 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sun, 05 Apr 2009 23:18:45 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1238973525.82.0.462727188387.issue2953@psf.upfronthosting.co.za> Tarek Ziad? added the comment: _zip_directory_cache is part of the zipimport module (C module) you can find in Modules/zipimport.c. The tests are located here: ./Lib/test/test_zipimport.py _zip_directory_cache is a dict used by zipimporter_init to speed up the lookup. Notice that if it is successfully compiled, zipimport is used by pkgutil. So Maciek, did you have a bug with this ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 01:20:04 2009 From: report at bugs.python.org (Jack Diederich) Date: Sun, 05 Apr 2009 23:20:04 +0000 Subject: [issue5696] test_telnetlib augmentation In-Reply-To: <1238895962.87.0.497816781262.issue5696@psf.upfronthosting.co.za> Message-ID: <1238973604.1.0.755320285498.issue5696@psf.upfronthosting.co.za> Changes by Jack Diederich : ---------- components: +Tests stage: -> patch review type: -> behavior versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 01:30:01 2009 From: report at bugs.python.org (Maciek Fijalkowski) Date: Sun, 05 Apr 2009 23:30:01 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1238974201.07.0.760033141549.issue2953@psf.upfronthosting.co.za> Maciek Fijalkowski added the comment: The bug with this is that setuptools uses it (and even relies on what is there and in what order), while it has no single tests and no documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 01:34:51 2009 From: report at bugs.python.org (George Sakkis) Date: Sun, 05 Apr 2009 23:34:51 +0000 Subject: [issue5697] heapq.nlargest does not perform stable sort In-Reply-To: <1238943318.15.0.801467733966.issue5697@psf.upfronthosting.co.za> Message-ID: <1238974491.59.0.82246322747.issue5697@psf.upfronthosting.co.za> George Sakkis added the comment: Should have checked a recent version first; that's from 2.5 (r25:51908, Sep 19 2006, 09:52:17). Sorry for the noise. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 01:44:54 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 05 Apr 2009 23:44:54 +0000 Subject: [issue5705] os.getpwent returns unsigned 32bit value, os.setuid refuses it In-Reply-To: <1238971076.18.0.458968995084.issue5705@psf.upfronthosting.co.za> Message-ID: <1238975094.62.0.142191610216.issue5705@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Fixed in r71299 trunk. Needs backporting to release26-maint and release30-maint. (I'm waiting for buildbot results before I do that) ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 01:49:51 2009 From: report at bugs.python.org (Michael Foord) Date: Sun, 05 Apr 2009 23:49:51 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238975391.8.0.0544422688201.issue5679@psf.upfronthosting.co.za> Michael Foord added the comment: @Garrett / Virgil I don't think anything other than very short term confusion is possible. Whichever decision is made a developer who assumes the opposite will actually get an error. In both cases the downside is that in certain circumstances you could attempt to use a resource that has already been disposed of. As an interesting data point, the Bzr code does clean ups *before* tearDown. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 01:55:00 2009 From: report at bugs.python.org (Robert Collins) Date: Sun, 05 Apr 2009 23:55:00 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238975391.8.0.0544422688201.issue5679@psf.upfronthosting.co.za> Message-ID: <1238975691.28697.39.camel@lifeless-64> Robert Collins added the comment: On Sun, 2009-04-05 at 23:49 +0000, Michael Foord wrote: > > > As an interesting data point, the Bzr code does clean ups *before* > tearDown. No it doesn't: We subclass unittest.TestCase. We also override run() to make tearDown run always. Our base test case class has it's tearDown: def tearDown(self): self._bzr_test_tearDown_run = True self._runCleanups() self._log_contents = '' unittest.TestCase.tearDown(self) (which is to say, _runCleanups runs after any child classes tearDown, even though we implement it by calling it from our base-most tearDown). -Rob ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 6 01:56:34 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sun, 05 Apr 2009 23:56:34 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1238975794.45.0.266044539464.issue2953@psf.upfronthosting.co.za> Tarek Ziad? added the comment: > while it has no single tests and no documentation." what "it" refers to ? zipimport, distutils or setuptools ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 01:56:59 2009 From: report at bugs.python.org (Michael Foord) Date: Sun, 05 Apr 2009 23:56:59 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238975819.55.0.0339134650126.issue5679@psf.upfronthosting.co.za> Michael Foord added the comment: My apologies - the jml code on launchpad runs clean ups before taerDown. http://bazaar.launchpad.net/~jml/testtools/trunk/annotate/head%3A/testtools/testcase.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 02:06:51 2009 From: report at bugs.python.org (Robert Collins) Date: Mon, 06 Apr 2009 00:06:51 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238975819.55.0.0339134650126.issue5679@psf.upfronthosting.co.za> Message-ID: <1238976400.28697.41.camel@lifeless-64> Robert Collins added the comment: On Sun, 2009-04-05 at 23:57 +0000, Michael Foord wrote: > Michael Foord added the comment: > > My apologies - the jml code on launchpad runs clean ups before taerDown. > > http://bazaar.launchpad.net/~jml/testtools/trunk/annotate/head%3A/testtools/testcase.py Ah, indeed it does. Well, FWIW my use has nearly all been with bzr's that does it after :) Jono - was there some particular reason testtools does it after? (We're discussing the merits of pre-and-post tearDown, ad-nauseum :)). -Rob ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 02:14:31 2009 From: report at bugs.python.org (Jonathan Lange) Date: Mon, 06 Apr 2009 00:14:31 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238976400.28697.41.camel@lifeless-64> Message-ID: Jonathan Lange added the comment: On Mon, Apr 6, 2009 at 10:06 AM, Robert Collins wrote: > On Sun, 2009-04-05 at 23:57 +0000, Michael Foord wrote: >> Michael Foord added the comment: >> >> My apologies - the jml code on launchpad runs clean ups before taerDown. >> >> http://bazaar.launchpad.net/~jml/testtools/trunk/annotate/head%3A/testtools/testcase.py > > Ah, indeed it does. Well, FWIW my use has nearly all been with bzr's > that does it after :) > > Jono - was there some particular reason testtools does it after? (We're > discussing the merits of pre-and-post tearDown, ad-nauseum :)). > No particular reason. ---------- nosy: +jml _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 02:18:47 2009 From: report at bugs.python.org (Maciek Fijalkowski) Date: Mon, 06 Apr 2009 00:18:47 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1238977127.65.0.647758718013.issue2953@psf.upfronthosting.co.za> Maciek Fijalkowski added the comment: it == _zip_directory_cache ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 02:23:32 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 06 Apr 2009 00:23:32 +0000 Subject: [issue2254] Python CGIHTTPServer information disclosure In-Reply-To: <1204919985.1.0.220899639338.issue2254@psf.upfronthosting.co.za> Message-ID: <1238977412.54.0.574952369464.issue2254@psf.upfronthosting.co.za> Gregory P. Smith added the comment: fyi - Your patch does not work on windows as it uses os.path for uri manipulation. that means it behaves differently with regards to / and \ based on platform. I'm making a new one. I've written a unittest. should be fixed soon. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 6 02:33:06 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 06 Apr 2009 00:33:06 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1238977986.06.0.543138857074.issue2953@psf.upfronthosting.co.za> Tarek Ziad? added the comment: I am not sure what you would like to see added. in zipimport.c: "- _zip_directory_cache: a dict, mapping archive paths to zip directory info dicts, as used in zipimporter._files. " while there are no direct test, Lib/test/test_zipimport.py covers it becauseit is used when you instanciate a zipimport class. would you like to see a section explaining how it works at http://docs.python.org/library/zipimport.html ? ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 6 02:35:10 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 06 Apr 2009 00:35:10 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1238978110.1.0.0689883845383.issue2953@psf.upfronthosting.co.za> Tarek Ziad? added the comment: maybe what's missing is a public API for the clear() method since setuptools uses it by calling it directly ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 02:59:02 2009 From: report at bugs.python.org (Maciek Fijalkowski) Date: Mon, 06 Apr 2009 00:59:02 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1238979542.72.0.995149629848.issue2953@psf.upfronthosting.co.za> Maciek Fijalkowski added the comment: setuptools at least deletes stuff from _zip_directory_cache (via _uncache function in easy_install.py). it also iterates over it and checks for existance of elements. What about documenting details about _zip_directory_cache: * does it need to be a normal python dictionary or anything? * what methods it needs to support? * what api zipimporter exposes? Right now the situation is: if I want my library not to be cached any more, I need to grab object called _zip_directory_cache, and remove things from it. That's a very non-obvious API for caching. Is it documented in some PEP? The way I stomped on it - just passing the tests of zipimporter module actually does not guarantee that you've implemented it correctly. You also need to expose at least _zip_directory_cache otherwise setuptools won't be too happy. Stdlib is not only about testing cpython, it's also about what you define as python these days. I propose to have a clean api on zipimporter how to invalidate it's caches. Maybe a general mechanism for that, I don't know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 03:04:01 2009 From: report at bugs.python.org (Rudd-O) Date: Mon, 06 Apr 2009 01:04:01 +0000 Subject: [issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures In-Reply-To: <1238969293.95.0.469241547057.issue5482@psf.upfronthosting.co.za> Message-ID: <200904052003.55496.rudd-o@rudd-o.com> Rudd-O added the comment: Excellent. El Domingo 05 Abril 2009, =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?=@psf.upfronthosting.co.za escribi?: > Tarek Ziad? added the comment: > > Rudd-O, I am trying to see if we can build a team of people that could > work on python <-> RPM tasks to adress all related issues. I'll let you > know when it's set. > > ---------- > priority: -> high > > _______________________________________ > Python tracker > > _______________________________________ -- Manuel Amador (Rudd-O) Rudd-O.com - http://rudd-o.com/ GPG key ID 0xC8D28B92 at http://wwwkeys.pgp.net/ Now playing, courtesy of Amarok: UB40 - I would do for you We are not loved by our friends for what we are; rather, we are loved in spite of what we are. -- Victor Hugo ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 03:06:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 01:06:24 +0000 Subject: [issue1565509] Repair or Change installation error Message-ID: <1238979984.77.0.151508619958.issue1565509@psf.upfronthosting.co.za> Daniel Diniz added the comment: Greg, I've never seen this problem being reported by another user, so ISTM it's fair to use 'uncommon' (as in 'rarely occurring or appearing, infrequent, occasional, unusual') to refer to it. Also, AFAIK, 'Repair or Change' is rarely reliable. But I agree that if we can fix this with a acceptable cost/benefit, we should do it. If you can reproduce the issue with 2.6/3.0 (2.5 won't be fixed anymore) and post details about it, we can argue about the potential benefits (easy to trigger? what kind of harm does it cause?) and compare them to the known costs (developer time, new bit of code to maintain, etc.). So I'm setting this to pending and will set to open/closed when we get enough details to justify wanting to fix it or not, OK? Thanks for reporting this and for you feedback :) ---------- resolution: works for me -> status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 03:25:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 01:25:11 +0000 Subject: [issue1531859] Tracing and profiling functions can cause hangs in threads Message-ID: <1238981111.49.0.277615612299.issue1531859@psf.upfronthosting.co.za> Daniel Diniz added the comment: Rocky, No, 2.6 was released in 2008 and the bug was indeed filled against 2.5. However, 2.5 will not receive general bugfixes anymore, so I've changed the target version to 2.6 (as it's where it can be fixed if still present). Setting it to pending so other people interested in this will have an incentive to verify whether it's fixed or not, so we can close or reopen. Thanks for your detailed analysis of the bug! ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 03:27:39 2009 From: report at bugs.python.org (R. David Murray) Date: Mon, 06 Apr 2009 01:27:39 +0000 Subject: [issue1779613] Replace AtheOS w/ Syllable Message-ID: <1238981259.27.0.439676441967.issue1779613@psf.upfronthosting.co.za> R. David Murray added the comment: The syllable web site talks about doing a Python3 port, and about already having a python port (ie: python2), so given current policy on OS support it seems to me that this is now a dead issue. ---------- nosy: +r.david.murray resolution: -> out of date stage: -> committed/rejected status: open -> closed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 03:34:43 2009 From: report at bugs.python.org (Jack Diederich) Date: Mon, 06 Apr 2009 01:34:43 +0000 Subject: [issue1252001] Issue with telnetlib read_until not timing out Message-ID: <1238981683.8.0.62401211818.issue1252001@psf.upfronthosting.co.za> Jack Diederich added the comment: This was fixed in r47215 ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 03:40:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 01:40:24 +0000 Subject: [issue1672568] silent error in email.message.Message.get_payload Message-ID: <1238982024.13.0.295536333016.issue1672568@psf.upfronthosting.co.za> Daniel Diniz added the comment: Hmm, ISTM that a change that breaks existing code that relies on documented behavior has a negligible chance of being accepted. However, I agree that the current behavior isn't developer-friendly. I think adding an alternative behavior to get_payload (add a new parameter?), allowing callers to log errors and/or displaying warnings could have a better chance of being accepted, while still providing the control you want. Barry? ---------- keywords: +patch type: behavior -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 04:09:49 2009 From: report at bugs.python.org (Jack Diederich) Date: Mon, 06 Apr 2009 02:09:49 +0000 Subject: [issue5696] test_telnetlib augmentation In-Reply-To: <1238895962.87.0.497816781262.issue5696@psf.upfronthosting.co.za> Message-ID: <1238983789.41.0.896082852212.issue5696@psf.upfronthosting.co.za> Jack Diederich added the comment: committed in r71302 ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 04:25:16 2009 From: report at bugs.python.org (Jack Diederich) Date: Mon, 06 Apr 2009 02:25:16 +0000 Subject: [issue1737737] telnetlib.Telnet does not process DATA MARK (DM) Message-ID: <1238984716.33.0.717320304341.issue1737737@psf.upfronthosting.co.za> Jack Diederich added the comment: RFC 854 says that DM, like all other commands, is only valid when preceded by an IAC. telnetlib does filter these out appropriately (I just added tests for it in r71302 and it behaves appropriately). ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 06:03:46 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 06 Apr 2009 04:03:46 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1238979542.72.0.995149629848.issue2953@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: Does distutils use _zip_directory_cache in any way? If not then setuptools is in the wrong here for using a private attribute and it is on them to make it work if the attribute does not exist, period. Otherwise someone will need to come up with a very simple API or set or rules to follow for clearing the cache and get setuptools to switch to it (IMO it should be handled by simply deleting all entries for a module in sys.modules, removing the path hook from sys.path_hooks, and then clear out sys.path_importer_cache for all paths associated with the module). Be aware, though, this is all leading down the road of special-casing zip imports when you may very well run into the same issues if people start to develop other importers -- e.g. tarball, dbm, or sqlite3 importers -- and this will all start up again. ---------- Added file: http://bugs.python.org/file13625/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Does distutils use _zip_directory_cache in any way? If not then setuptools is in the wrong here for using a private attribute and it is on them to make it work if the attribute does not exist, period.

Otherwise someone will need to come up with a very simple API or set or rules to follow for clearing the cache and get setuptools to switch to it (IMO it should be handled by simply deleting all entries for a module in sys.modules, removing the path hook from sys.path_hooks, and then clear out sys.path_importer_cache for all paths associated with the module). Be aware, though, this is all leading down the road of special-casing zip imports when you may very well run into the same issues if people start to develop other importers -- e.g. tarball, dbm, or sqlite3 importers -- and this will all start up again.
From report at bugs.python.org Mon Apr 6 06:04:44 2009 From: report at bugs.python.org (Kumar McMillan) Date: Mon, 06 Apr 2009 04:04:44 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238990684.27.0.452625898497.issue5679@psf.upfronthosting.co.za> Changes by Kumar McMillan : ---------- nosy: +kumar303 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 06:16:25 2009 From: report at bugs.python.org (Kumar McMillan) Date: Mon, 06 Apr 2009 04:16:25 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238991385.81.0.0652283672038.issue5679@psf.upfronthosting.co.za> Kumar McMillan added the comment: I like this patch. However, a nice-to-have would be that _doCleanups() prints a traceback from function(*args, **kwargs) (if there is one) the same way that atexit does. That would aid in debugging mis-written cleanup functions yet would not intrude on your test program. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 6 06:32:43 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 06 Apr 2009 04:32:43 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1238992363.65.0.509603376971.issue2953@psf.upfronthosting.co.za> Tarek Ziad? added the comment: > Does distutils use _zip_directory_cache in any way? Not at all. But pkgutil does, and uses to get a dirlist, so I guess a new API should be created in zipimport to handle this case as well. (I think it's some setuptools code originallyt, that landed in pkgutil) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 06:40:00 2009 From: report at bugs.python.org (Garrett Cooper) Date: Mon, 06 Apr 2009 04:40:00 +0000 Subject: [issue5706] setuptools doesn't honor standard compiler variables In-Reply-To: <1238992798.79.0.661202545175.issue5706@psf.upfronthosting.co.za> Message-ID: <1238992798.79.0.661202545175.issue5706@psf.upfronthosting.co.za> New submission from Garrett Cooper : I realize that cross-compilation isn't supported yet, _but_ setuptools needs to be modified such that standard compilation variables are supported, e.g. CC, CFLAGS, CPPFLAGS, LD, LDFLAGS, LDLIBS. The -i, -l, and -L flags with setup.py with build_ext provide a basic level of support, but unfortunately it doesn't match what these environment variables provide. ---------- components: Installation messages: 85611 nosy: yaneurabeya severity: normal status: open title: setuptools doesn't honor standard compiler variables type: feature request versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 06:53:45 2009 From: report at bugs.python.org (Jonathan Lange) Date: Mon, 06 Apr 2009 04:53:45 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238991385.81.0.0652283672038.issue5679@psf.upfronthosting.co.za> Message-ID: Jonathan Lange added the comment: On Mon, Apr 6, 2009 at 2:16 PM, Kumar McMillan wrote: > > Kumar McMillan added the comment: > > I like this patch. ?However, a nice-to-have would be that _doCleanups() > prints a traceback from function(*args, **kwargs) (if there is one) the > same way that atexit does. ?That would aid in debugging mis-written > cleanup functions yet would not intrude on your test program. > I think reporting the errors via addError is the right thing. If your cleanups fail, then your test suite becomes unreliable, so they should be treated like tests that raise unexpected errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 06:56:38 2009 From: report at bugs.python.org (Jonathan Lange) Date: Mon, 06 Apr 2009 04:56:38 +0000 Subject: [issue5679] cleanUp stack for unittest In-Reply-To: <1238788607.78.0.0557494613751.issue5679@psf.upfronthosting.co.za> Message-ID: <1238993798.44.0.989345837774.issue5679@psf.upfronthosting.co.za> Jonathan Lange added the comment: FWIW, I kind of like the tests here: http://bazaar.launchpad.net/~jml/testtools/trunk/annotate/head%3A/testtools/tests/test_testtools.py#L221 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 08:24:35 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 06 Apr 2009 06:24:35 +0000 Subject: [issue2254] Python CGIHTTPServer information disclosure In-Reply-To: <1204919985.1.0.220899639338.issue2254@psf.upfronthosting.co.za> Message-ID: <1238999075.04.0.129463686367.issue2254@psf.upfronthosting.co.za> Changes by Gregory P. Smith : Removed file: http://bugs.python.org/file9628/CGIHTTPServer_is_cgi_fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 08:39:36 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 06 Apr 2009 06:39:36 +0000 Subject: [issue2254] Python CGIHTTPServer information disclosure In-Reply-To: <1204919985.1.0.220899639338.issue2254@psf.upfronthosting.co.za> Message-ID: <1238999976.29.0.790099801133.issue2254@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Fixed in trunk r71303. This potentially changes the behavior of CGIHTTPServer (for the better) so this is probably not appropriate to backport to a release branch unless someone really considers the security of this to be severe. If backported, the new module function should be expanded inline to avoid adding a new (though undocumented) API. Closing. ---------- resolution: -> fixed status: open -> closed versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 08:50:47 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 06 Apr 2009 06:50:47 +0000 Subject: [issue5705] os.getpwent returns unsigned 32bit value, os.setuid refuses it In-Reply-To: <1238971076.18.0.458968995084.issue5705@psf.upfronthosting.co.za> Message-ID: <1239000647.98.0.705764816662.issue5705@psf.upfronthosting.co.za> Gregory P. Smith added the comment: merged into release26-maint. release30-maint still needed. ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 08:58:47 2009 From: report at bugs.python.org (Brian Quinlan) Date: Mon, 06 Apr 2009 06:58:47 +0000 Subject: [issue5700] io.FileIO calls flush() after file closed In-Reply-To: <1238945758.46.0.01809197792.issue5700@psf.upfronthosting.co.za> Message-ID: <1239001127.0.0.586428872395.issue5700@psf.upfronthosting.co.za> Brian Quinlan added the comment: Discussion about this bug is ongoing in python-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 09:26:52 2009 From: report at bugs.python.org (Ned Deily) Date: Mon, 06 Apr 2009 07:26:52 +0000 Subject: [issue5705] os.getpwent returns unsigned 32bit value, os.setuid refuses it In-Reply-To: <1238971076.18.0.458968995084.issue5705@psf.upfronthosting.co.za> Message-ID: <1239002812.94.0.195773592267.issue5705@psf.upfronthosting.co.za> Ned Deily added the comment: Closes duplicate Issue3586? ---------- nosy: +nad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 09:40:20 2009 From: report at bugs.python.org (epitome83) Date: Mon, 06 Apr 2009 07:40:20 +0000 Subject: [issue5707] IDLE will not load In-Reply-To: <1239003620.62.0.108807854341.issue5707@psf.upfronthosting.co.za> Message-ID: <1239003620.62.0.108807854341.issue5707@psf.upfronthosting.co.za> New submission from epitome83 : I downloaded Python 3.0.1 and installed on Vista. I opened IDLE and it worked fine. I went into the Preferences to change the keybindings on the history scrollers. I changed history-next to Ctrl+Down Arrow, though when I pressed OK it listed only Control as the binding. I then tried to change history-prev to Ctrl+Up Arrow, but when I pressed OK, it gave an error that that binding was already taken. The program then crashed. Since then whenever I try to open IDLE, the pythonw.exe process appears in my Task Manager briefly, but then it exits, and I never see any other evidence the program has opened. The command line still works fine. I tried repairing the installation, uninstalling, restarting the computer, and removing the leftover registry keys for a completely clean install, but nothing has worked to be able to reopen the program. ---------- components: IDLE messages: 85618 nosy: epitome83 severity: normal status: open title: IDLE will not load type: crash versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 09:58:44 2009 From: report at bugs.python.org (Larry Hastings) Date: Mon, 06 Apr 2009 07:58:44 +0000 Subject: [issue5630] Create alternatieve CObject API that is safe and clean In-Reply-To: <1238526469.89.0.691687509266.issue5630@psf.upfronthosting.co.za> Message-ID: <1239004724.72.0.435051266708.issue5630@psf.upfronthosting.co.za> Larry Hastings added the comment: I discussed this off-list with GvR. He was primarily concerned with fixing the passing-around-a-vtable C API usage of CObject, but he wanted to preserve as much backwards compatibility as possible. In the end, he suggested I create a new API and leave CObject unchanged. I've done that, incorporating many of GvR's suggestions, though the blame for the proposed new API is ultimately mine. The new object is called a "Capsule". (I *had* wanted to call it "Wrapper", but there's already a PyWrapper_New in descrobject.h.) Highlights of the new API: * PyCapsule_New() replaces PyCObject_FromVoidPtr. * It takes a void * pointer, a const char *name, and a destructor. * The pointer must not be NULL. * The name may be NULL; if it is not NULL, it must be a valid C string which outlives the capsule. * The destructor takes a PyObject *, not a void *. * PyCapsule_GetPointer() replaces PyCObject_AsVoidPtr. * It takes a PyObject * and a const char *name. * The name must compare to the name inside the object; either they're both NULL or they strcmp to be the same. * PyCapsule_Import() replaces PyCObject_Import. * It takes three arguments: const char *module_name, const char *attribute_name, int no_block. * It ensures that the "name" of the Capsule is "modulename.attributename". * If no_block is true, it uses PyModule_ImportModuleNoBlock. * The PyCapsule structure is private. There are accessors for all fields: pointer, name, destructor, and "context" * The "context" is a second "void *" you can set / get. I've attached a patch to implement this; it was written against svn r71304. The patch isn't ready to be applied--there is no documentation for the new API beyond the header file. GvR and I disagree on one point: he thinks that we should leave CObject in forever, undeprecated. I think we should deprecate it now and remove it... whenever we'd do that. The new API does everything the old one does, and more, and it's cleaner and safer. ---------- title: Update CObject API so it is safe and regular -> Create alternatieve CObject API that is safe and clean Added file: http://bugs.python.org/file13626/lch.capsule.r71304.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 10:41:45 2009 From: report at bugs.python.org (Larry Hastings) Date: Mon, 06 Apr 2009 08:41:45 +0000 Subject: [issue5708] Tiny code polishing to unicode_repeat In-Reply-To: <1239007305.41.0.910418406517.issue5708@psf.upfronthosting.co.za> Message-ID: <1239007305.41.0.910418406517.issue5708@psf.upfronthosting.co.za> New submission from Larry Hastings : Two minor tweaks to unicode_repeat: * If the number of repeats (len) is < 1, we're always going to return the empty Unicode string. So I incr and return unicode_empty. * The current code has "if (done < nchars)" around the first copy. A little data-flow analysis of the code will show you that done is always 0 and nchars is always >= str->length. So the check is unnecessary--we're always going to do that first copy. I removed the if and set done to str->length directly. Hope I got it right! ---------- components: Interpreter Core files: lch.unicoderepeat.r71304.diff keywords: patch messages: 85620 nosy: lhastings severity: normal status: open title: Tiny code polishing to unicode_repeat versions: Python 3.1 Added file: http://bugs.python.org/file13627/lch.unicoderepeat.r71304.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 10:45:09 2009 From: report at bugs.python.org (Larry Hastings) Date: Mon, 06 Apr 2009 08:45:09 +0000 Subject: [issue5676] Fix "make clean" in py3k/trunk In-Reply-To: <1238719617.07.0.390323030603.issue5676@psf.upfronthosting.co.za> Message-ID: <1239007509.44.0.154088691498.issue5676@psf.upfronthosting.co.za> Larry Hastings added the comment: So what's the fix? I upgraded to r71304 and it still does this. Worse, it adds all sorts of complaints to "make test"--and it actually slows down hg. (hg can't cd into that directory, so it gives up on creating its inotify socket.) Can whoever added "@test" fix it please--or tell me what I could possibly be doing wrong? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 11:39:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 09:39:56 +0000 Subject: [issue1739118] Investigated ref leak report related to thread(regrtest.py - Message-ID: <1239010796.96.0.346549468039.issue1739118@psf.upfronthosting.co.za> Daniel Diniz added the comment: Attaching Hirokazu's tests and experimental patch as plaintext. ---------- keywords: +patch nosy: +ajaksu2 stage: -> patch review type: -> resource usage Added file: http://bugs.python.org/file13628/test_leak.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 11:41:31 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 09:41:31 +0000 Subject: [issue1739118] Investigated ref leak report related to thread regrtest.py Message-ID: <1239010891.19.0.386200521538.issue1739118@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- title: Investigated ref leak report related to thread(regrtest.py - -> Investigated ref leak report related to thread regrtest.py Added file: http://bugs.python.org/file13629/experimental.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 11:41:51 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 09:41:51 +0000 Subject: [issue1685962] socket.getaddrinfo() should take an address tuple. Message-ID: <1239010911.95.0.323676639079.issue1685962@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 11:41:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 09:41:56 +0000 Subject: [issue1730480] dict init/update accesses internal items of dict derivative Message-ID: <1239010916.31.0.0757201622327.issue1730480@psf.upfronthosting.co.za> Daniel Diniz added the comment: IIRC, the same behavior is present for subclasses of other builtin types. ---------- nosy: +ajaksu2 stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 11:42:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 09:42:03 +0000 Subject: [issue1735418] file.read() truncating strings under Windows Message-ID: <1239010923.92.0.820076323818.issue1735418@psf.upfronthosting.co.za> Daniel Diniz added the comment: Is this valid? ---------- nosy: +ajaksu2, benjamin.peterson, pitrou stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 11:42:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 09:42:08 +0000 Subject: [issue1733259] ZipFile CallBack Needed... Message-ID: <1239010928.39.0.30259629649.issue1733259@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 11:42:13 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 09:42:13 +0000 Subject: [issue1726451] ftplib and ProFTPD NLST 226 without 1xx response Message-ID: <1239010933.54.0.0865123502357.issue1726451@psf.upfronthosting.co.za> Daniel Diniz added the comment: Kenneth: can you confirm this is a valid issue? ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 11:42:23 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 09:42:23 +0000 Subject: [issue1738179] help() can't find right source file Message-ID: <1239010943.78.0.164867909564.issue1738179@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From =?utf-8?b?IkouIERhdmlkIEliw6HDsWV6IiA8cmVwb3J0QGJ1Z3MucHl0aG9uLm9yZz4=?= at psf.upfronthosting.co.za Mon Apr 6 11:42:24 2009 From: =?utf-8?b?IkouIERhdmlkIEliw6HDsWV6IiA8cmVwb3J0QGJ1Z3MucHl0aG9uLm9yZz4=?= at psf.upfronthosting.co.za (=?utf-8?b?IkouIERhdmlkIEliw6HDsWV6IiA8cmVwb3J0QGJ1Z3MucHl0aG9uLm9yZz4=?= at psf.upfronthosting.co.za) Date: Mon, 06 Apr 2009 09:42:24 +0000 Subject: [issue1202] zlib.crc32() and adler32() return value In-Reply-To: <1190719871.47.0.233788425538.issue1202@psf.upfronthosting.co.za> Message-ID: <1239010944.52.0.709392006277.issue1202@psf.upfronthosting.co.za> J. David Ib??ez added the comment: There it is. ---------- Added file: http://bugs.python.org/file13630/Document.odt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 11:47:14 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 09:47:14 +0000 Subject: [issue1734860] sitecustomize.py not found Message-ID: <1239011234.21.0.869556493725.issue1734860@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing as it's a documented change. ---------- nosy: +ajaksu2 resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:00:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:00:43 +0000 Subject: [issue1745761] Bad attributes/data handling in SGMLib Message-ID: <1239012043.87.0.523169764696.issue1745761@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed in trunk. ---------- nosy: +ajaksu2 stage: -> needs patch type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:00:51 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:00:51 +0000 Subject: [issue1742205] ZipFile.writestr writes incorrect extended local headers Message-ID: <1239012051.15.0.313721149221.issue1742205@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed for trunk and py3k. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:07:26 2009 From: report at bugs.python.org (Tim Golden) Date: Mon, 06 Apr 2009 10:07:26 +0000 Subject: [issue1565509] Repair or Change installation error In-Reply-To: <1238979984.77.0.151508619958.issue1565509@psf.upfronthosting.co.za> Message-ID: <49D9D483.9090501@timgolden.me.uk> Tim Golden added the comment: Well it may be uncommon, but it's perfectly easily reproducible: Just try to reinstall / repair from a file not called python-2.5.2.msi. Maybe uninstall: haven't tried. If Martin doesn't get there, I'll try to look at the log and see if there's something straightforward which can fix it. Obviously, there's an easy workaround: rename the file you're running to "python-2.5.2.msi". So I wouldn't consider it a major priority. Just a nuisance. ---------- nosy: +tim.golden status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:24:39 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 06 Apr 2009 10:24:39 +0000 Subject: [issue1735418] file.read() truncating strings under Windows Message-ID: <1239013479.55.0.0234806236523.issue1735418@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It's a bug in the program's logic. The program assumes that the file pointer will have advanced by the same number of bytes as were returned by read(), but it is false when opened in text mode ('r') since text mode under Windows will convert Windows newlines ('\r\n') into C newlines ('\n'). Also, please note this is a feature of Windows itself, *not* of Python. That's why you don't see it happening on e.g. Mac OS X. And that's why the fix, short of changing the program's logic, is to open in binary mode ('rb'). ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:30:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:30:11 +0000 Subject: [issue1713877] Expose callback API in readline module Message-ID: <1239013811.04.0.0121409828927.issue1713877@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +Patch for feat. 713877 Expose callbackAPI in readline module versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:30:33 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:30:33 +0000 Subject: [issue1744456] Patch for feat. 1713877 Expose callbackAPI in readline module Message-ID: <1239013833.59.0.647009148579.issue1744456@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review title: Patch for feat. 713877 Expose callbackAPI in readline module -> Patch for feat. 1713877 Expose callbackAPI in readline module type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:30:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:30:47 +0000 Subject: [issue1744752] Newline skipped in "for line in file" Message-ID: <1239013847.62.0.603714664129.issue1744752@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Windows nosy: +benjamin.peterson, pitrou stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:30:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:30:55 +0000 Subject: [issue1747670] Limiting data copy in xmlrpclib Message-ID: <1239013855.54.0.876882858803.issue1747670@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> resource usage versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:31:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:31:34 +0000 Subject: [issue1748064] inspect.getargspec fails on built-in or slot wrapper methods Message-ID: <1239013894.23.0.0859955530718.issue1748064@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:31:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:31:42 +0000 Subject: [issue1748960] os.path.expandvars: expand string without modifying the environment Message-ID: <1239013902.08.0.545283452461.issue1748960@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed title: Extra optional argument to os.path.expandvars -> os.path.expandvars: expand string without modifying the environment type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:31:51 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:31:51 +0000 Subject: [issue1744382] Read Write lock Message-ID: <1239013911.03.0.267471006792.issue1744382@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:32:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:32:01 +0000 Subject: [issue1749512] imaplib cannot handle mailboxes with ACL: lrs Message-ID: <1239013921.27.0.36010067458.issue1749512@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:32:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:32:08 +0000 Subject: [issue1749662] New byte packing format for the struct module Message-ID: <1239013928.8.0.108805692803.issue1749662@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:32:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:32:50 +0000 Subject: [issue1752252] tkFileDialog closes Python when used Message-ID: <1239013970.23.0.283766120494.issue1752252@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Tkinter -None stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:34:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:34:39 +0000 Subject: [issue1756343] Python 2.5.1 fails to build on AIX Message-ID: <1239014079.78.0.872723642911.issue1756343@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed status: open -> pending type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:38:30 2009 From: report at bugs.python.org (Renaud Blanch) Date: Mon, 06 Apr 2009 10:38:30 +0000 Subject: [issue1672568] silent error in email.message.Message.get_payload Message-ID: <1239014310.61.0.141225613613.issue1672568@psf.upfronthosting.co.za> Renaud Blanch added the comment: good idea, why not something like sketched in the attached patch? it does not break any existing code, while providing a way for new users to have a chance to get the decoding errors. of course, the doc should be updated accordingly, and tests should be added. ---------- Added file: http://bugs.python.org/file13631/unsilent_get_payload_decoding_errors.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:40:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:40:52 +0000 Subject: [issue1458] installer crashes on attempted cancellation In-Reply-To: <1195424067.48.0.215930942967.issue1458@psf.upfronthosting.co.za> Message-ID: <1239014452.29.0.0913551387457.issue1458@psf.upfronthosting.co.za> Daniel Diniz added the comment: Joseph: can you reproduce this with the 2.6 installers? ---------- nosy: +ajaksu2 stage: -> test needed versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:47:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:47:52 +0000 Subject: [issue3744] make altinstall installs pydoc instead of pydoc3.0 In-Reply-To: <1220254701.93.0.57934772161.issue3744@psf.upfronthosting.co.za> Message-ID: <1239014872.53.0.784233415475.issue3744@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing as duplicate of issue 1590, which has a patch and some discussion. ---------- dependencies: -make altinstall installs pydoc instead of pydoc3.0 nosy: +ajaksu2 resolution: -> duplicate stage: test needed -> committed/rejected status: open -> closed superseder: -> "make altinstall" installs pydoc, idle, smtpd.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:49:23 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:49:23 +0000 Subject: [issue1590] "make altinstall" installs pydoc, idle, smtpd.py In-Reply-To: <1197388115.32.0.880215268876.issue1590@psf.upfronthosting.co.za> Message-ID: <1239014963.97.0.0433596829306.issue1590@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Installation dependencies: +"make altinstall" installs pydoc, idle, smtpd.py with broken shebang lines keywords: +patch priority: normal -> high stage: -> test needed versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:51:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:51:24 +0000 Subject: [issue1761028] pickle - cannot unpickle circular deps with custom __hash__ Message-ID: <1239015084.74.0.665017779325.issue1761028@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +collinwinter stage: -> needs patch versions: +Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:58:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:58:12 +0000 Subject: [issue1778410] removeTest() method patch for unittest.TestSuite Message-ID: <1239015492.92.0.745002475058.issue1778410@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +michael.foord stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 12:58:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 06 Apr 2009 10:58:44 +0000 Subject: [issue1774840] Not exiting when running tests Message-ID: <1239015524.4.0.437222986396.issue1774840@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 13:19:57 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 06 Apr 2009 11:19:57 +0000 Subject: [issue1744752] Newline skipped in "for line in file" Message-ID: <1239016797.81.0.63796650567.issue1744752@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- versions: +Python 2.7 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 13:36:41 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 06 Apr 2009 11:36:41 +0000 Subject: [issue1744752] Newline skipped in "for line in file" Message-ID: <1239017801.92.0.300137788719.issue1744752@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The only difference between "r" and "rb" (in Python 2.x) is that under Windows, "r" mode converts "\r\n" line endings into "\n". But it's the Windows C stdlib which does that, not Python. So maybe a bug in Windows itself? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 13:52:27 2009 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Apr 2009 11:52:27 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1239018747.73.0.916030603692.issue3873@psf.upfronthosting.co.za> STINNER Victor added the comment: Create a read buffer (4096 bytes) in unpickler class. Using [0]*10**7 or [1000]*10**7, load() is from 6 to 8 times faster. I removed last_string attribute because it wasn't used. If there are "tail" bytes, seek backward. ---------- keywords: +patch Added file: http://bugs.python.org/file13632/pickle_read_buffer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 13:53:41 2009 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Apr 2009 11:53:41 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1239018821.4.0.30754218118.issue3873@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't know why, but python-trunk is *much* slower than py3k (eg. with dump: 1000 ms vs 24 ms for py3k, or with load: 1500ms vs 186ms). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 13:56:50 2009 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Apr 2009 11:56:50 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1239019010.83.0.550262008315.issue3873@psf.upfronthosting.co.za> STINNER Victor added the comment: My version of pickletest.py: - make sure that file position is correct after the load() - some benchmark. most interesting numbers: without the patch : version | data | dump ms | load ms | py3k | 0, 10^6 | 230 | 1500 | py3k | 1000, 10^6 | 255 | 1780 | py3k | 0, 10^7 | 2360 | 16044 | py3k | 1000, 10^7 | 2615 | 19380 | with the patch: version | data | dump ms | load ms | speed up: py3k | 0, 10^6 | 237 | 183 | x8 py3k | 1000, 10^6 | 241 | 248 | x7 py3k | 0, 10^7 | 2420 | 1860 | x8 py3k | 1000, 10^7 | 2850 | 3100 | x6 (data: 0, 10^6 means: [0]*10^6) ---------- Added file: http://bugs.python.org/file13633/pickletest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 14:02:57 2009 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Apr 2009 12:02:57 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1239019377.28.0.966057827814.issue3873@psf.upfronthosting.co.za> STINNER Victor added the comment: Note about my patch: the buffer should be truncated after PyBytes_Concat(&self->buffer.pybytes, data) to avoid very long buffer. Something like: self->buffer.pybytes += data; self->buffer.pybytes = self->buffer.pybytes[index:]; self->buffer.index=0; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 14:09:03 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 06 Apr 2009 12:09:03 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1239018821.4.0.30754218118.issue3873@psf.upfronthosting.co.za> Message-ID: <1239019825.6332.1.camel@fsol> Antoine Pitrou added the comment: > I don't know why, but python-trunk is *much* slower than py3k (eg. with > dump: 1000 ms vs 24 ms for py3k, or with load: 1500ms vs 186ms). Perhaps you tried with the pure Python version (pickle) rather than the C one (cPickle)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 14:45:28 2009 From: report at bugs.python.org (R. David Murray) Date: Mon, 06 Apr 2009 12:45:28 +0000 Subject: [issue1748960] os.path.expandvars: expand string without modifying the environment Message-ID: <1239021928.98.0.894462017734.issue1748960@psf.upfronthosting.co.za> R. David Murray added the comment: Python has had a way to do this since python 2.4: >>> from string import Template >>> fullPath = Template("$ROOT/${SUBDIR/some/path").substitute(dict(ROOT='/users/geof', SUBDIR='subdir')) >>> fullPath '/users/geof/subdir/some/path' ---------- components: +Library (Lib) -Extension Modules nosy: +r.david.murray resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 15:12:08 2009 From: report at bugs.python.org (Kenneth Loafman) Date: Mon, 06 Apr 2009 13:12:08 +0000 Subject: [issue1726451] ftplib and ProFTPD NLST 226 without 1xx response Message-ID: <1239023528.46.0.405184513327.issue1726451@psf.upfronthosting.co.za> Kenneth Loafman added the comment: Yes, there is no 1xx response. I've attached a log between ncftp client and ProFTPd 1.3.1-6ubuntu1 that clearly shows no 1xx after the 226. ---------- Added file: http://bugs.python.org/file13634/trace _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 15:29:12 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 06 Apr 2009 13:29:12 +0000 Subject: [issue1726451] ftplib and ProFTPD NLST 226 without 1xx response Message-ID: <1239024552.31.0.987892708636.issue1726451@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I keep saying this is not a valid issue. The 1xx response is supposed to be sent by the server *before* the 226 response, and that's what your log shows: 07:55:03 Cmd: PASV 07:55:03 227: Entering Passive Mode (192,168,1,13,160,7). 07:55:03 Cmd: LIST 07:55:03 150: Opening ASCII mode data connection for file list 07:55:03 226: Transfer complete After the 226 response the server just shuts up waiting for the client to send the next command. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 15:34:49 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 06 Apr 2009 13:34:49 +0000 Subject: [issue5676] Fix "make clean" in py3k/trunk In-Reply-To: <1239007509.44.0.154088691498.issue5676@psf.upfronthosting.co.za> Message-ID: <1afaf6160904060634ic5e80bewe0c0e97df58bddd5@mail.gmail.com> Benjamin Peterson added the comment: 2009/4/6 Larry Hastings : > > Larry Hastings added the comment: > > So what's the fix? ?I upgraded to r71304 and it still does this. ?Worse, > it adds all sorts of complaints to "make test"--and it actually slows > down hg. ?(hg can't cd into that directory, so it gives up on creating > its inotify socket.) ?Can whoever added "@test" fix it please--or tell > me what I could possibly be doing wrong? ?Thanks. $ rm -rf @test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 15:37:15 2009 From: report at bugs.python.org (Kenneth Loafman) Date: Mon, 06 Apr 2009 13:37:15 +0000 Subject: [issue1726451] ftplib and ProFTPD NLST 226 without 1xx response Message-ID: <1239025035.33.0.317027369788.issue1726451@psf.upfronthosting.co.za> Kenneth Loafman added the comment: Clearly not valid if you are strictly RFC compliant, however, if you want to be functional in the real world then it needs to be addressed. ProFTPd is not the only server that handles things this way, so from a functionality and compatibility standpoint, it should be fixed. BTW, I've already voted for functionality over forced compliance by moving duplicity backup from ftplib to ncftp since ncftp talks to most servers without complaint. RFC compliance is nice, but FTP servers just are not compliant in the real world. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 16:09:41 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 06 Apr 2009 14:09:41 +0000 Subject: [issue1726451] ftplib and ProFTPD NLST 226 without 1xx response Message-ID: <1239026981.6.0.839835713632.issue1726451@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: According to the log file you have attached Proftpd always sends 1xx before 226 which is the RFC-compliant and widely adopted behavior, *also* when it's listing the content of an empty directory. See: 07:55:19 Cmd: LIST 07:55:19 150: Opening ASCII mode data connection for file list 07:55:19 226: Transfer complete 07:55:19 Remote listing contents { 07:55:19 } There's really no reason for an FTP server to send 1xx after 226, no matter if the listed directory is empty or not. It just doesn't make sense. Plus, Proftpd clearly *not* behave as such, as it is shown by your log file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 16:31:07 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 06 Apr 2009 14:31:07 +0000 Subject: [issue1774840] Not exiting when running tests Message-ID: <1239028267.6.0.54296811186.issue1774840@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +fuzzyman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 16:33:12 2009 From: report at bugs.python.org (Michael Foord) Date: Mon, 06 Apr 2009 14:33:12 +0000 Subject: [issue1774840] Not exiting when running tests Message-ID: <1239028392.09.0.543998835059.issue1774840@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- nosy: +michael.foord -fuzzyman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 16:33:41 2009 From: report at bugs.python.org (Michael Foord) Date: Mon, 06 Apr 2009 14:33:41 +0000 Subject: [issue1774840] Not exiting when running tests Message-ID: <1239028421.54.0.0713476644269.issue1774840@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- stage: test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 16:46:15 2009 From: report at bugs.python.org (Kenneth Loafman) Date: Mon, 06 Apr 2009 14:46:15 +0000 Subject: [issue1726451] ftplib and ProFTPD NLST 226 without 1xx response Message-ID: <1239029175.23.0.447209987889.issue1726451@psf.upfronthosting.co.za> Kenneth Loafman added the comment: It's been a couple of years since I reported this and its entirely possible that the updated ProFTPd I'm now testing against has been fixed, and that ftplib has evolved since then. Short of one of you testing the current ftplib against a current ProFTPd, I would have to say that the problem has now been resolved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 17:04:03 2009 From: report at bugs.python.org (Michael Foord) Date: Mon, 06 Apr 2009 15:04:03 +0000 Subject: [issue1774840] Not exiting when running tests Message-ID: <1239030243.14.0.180878132817.issue1774840@psf.upfronthosting.co.za> Michael Foord added the comment: Seems like a straightforward request although TestProgram is pretty horrible in my opinion. I'll add an exit argument to TestProgram.__init__ - don't look forward to testing it though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 18:14:32 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 06 Apr 2009 16:14:32 +0000 Subject: [issue3586] pwd.getpwnam('nobody') produces incorrect results if sizeof(uid_t) < sizeof(long) In-Reply-To: <1219054964.79.0.647831105855.issue3586@psf.upfronthosting.co.za> Message-ID: <1239034472.74.0.801713310073.issue3586@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Fixed via issue5705 which I filed not having seen this one. ---------- assignee: -> gregory.p.smith dependencies: +os.getpwent returns unsigned 32bit value, os.setuid refuses it keywords: +64bit nosy: +gregory.p.smith resolution: -> fixed status: open -> closed versions: +Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 18:19:35 2009 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Apr 2009 16:19:35 +0000 Subject: [issue4591] 32-bits unsigned user/group identifier In-Reply-To: <1228738930.96.0.415999724625.issue4591@psf.upfronthosting.co.za> Message-ID: <1239034775.91.0.795396531891.issue4591@psf.upfronthosting.co.za> STINNER Victor added the comment: See also #3586: "pwd.getpwnam('nobody') produces incorrect results if sizeof(uid_t) < sizeof(long)" (now closed). ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?VGUtasOpIFJvZGdlcnMgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za Mon Apr 6 18:21:17 2009 From: =?utf-8?b?VGUtasOpIFJvZGdlcnMgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za (=?utf-8?b?VGUtasOpIFJvZGdlcnMgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za) Date: Mon, 06 Apr 2009 16:21:17 +0000 Subject: [issue5709] PyObject_TypeCheck crashes the intepreter on extension callback functions In-Reply-To: <1239034876.99.0.902251790448.issue5709@psf.upfronthosting.co.za> Message-ID: <1239034876.99.0.902251790448.issue5709@psf.upfronthosting.co.za> New submission from Te-j? Rodgers : When a python callable is called from an extension module using PyEval_CallObjectWithKeywords, and that callable calls a function in the extension module that uses PyObject_TypeCheck (or *ParseTuple with "O!"), the interpreter crashes. ---------- components: Extension Modules messages: 85651 nosy: trodgers severity: normal status: open title: PyObject_TypeCheck crashes the intepreter on extension callback functions versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From =?utf-8?b?VGUtasOpIFJvZGdlcnMgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za Mon Apr 6 18:32:30 2009 From: =?utf-8?b?VGUtasOpIFJvZGdlcnMgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za (=?utf-8?b?VGUtasOpIFJvZGdlcnMgPHJlcG9ydEBidWdzLnB5dGhvbi5vcmc+?= at psf.upfronthosting.co.za) Date: Mon, 06 Apr 2009 16:32:30 +0000 Subject: [issue5709] PyObject_TypeCheck crashes the intepreter on extension callback functions In-Reply-To: <1239034876.99.0.902251790448.issue5709@psf.upfronthosting.co.za> Message-ID: <1239035550.51.0.622650339725.issue5709@psf.upfronthosting.co.za> Te-j? Rodgers added the comment: Sorry about that; my err. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 18:37:42 2009 From: report at bugs.python.org (Collin Winter) Date: Mon, 06 Apr 2009 16:37:42 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1239035862.22.0.944824295304.issue3873@psf.upfronthosting.co.za> Changes by Collin Winter : ---------- nosy: +collinwinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 18:41:05 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 06 Apr 2009 16:41:05 +0000 Subject: [issue5709] PyObject_TypeCheck crashes the intepreter on extension callback functions In-Reply-To: <1239034876.99.0.902251790448.issue5709@psf.upfronthosting.co.za> Message-ID: <1239036065.61.0.48547869535.issue5709@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> invalid _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Marcelo_Fern=C3=A1ndez_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 6 19:08:13 2009 From: =?utf-8?q?Marcelo_Fern=C3=A1ndez_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Marcelo_Fern=C3=A1ndez_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 06 Apr 2009 17:08:13 +0000 Subject: [issue5672] Implement a way to change the python process name In-Reply-To: <1238701084.1.0.0781987214897.issue5672@psf.upfronthosting.co.za> Message-ID: <1239037693.19.0.901372393233.issue5672@psf.upfronthosting.co.za> Marcelo Fern?ndez added the comment: This patch (to python 2.7 trunk) allows to call prctl() function from Linux kernel to change the process name. It adds two methods to the os module: os.getprocname() and os.setprocname(). Working example: marcelo at marcelo-laptop:~/src/pytrunk$ ./python Python 2.7a0 (trunk:71261M, Apr 5 2009, 16:32:55) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os [34831 refs] >>> os.getprocname() './python' [34833 refs] >>> os.getpid() 5601 [34833 refs] >>> os.setprocname('hello_process_name') [34833 refs] >>> os.getprocname() 'hello_process_name' [34833 refs] Before changing the process name: marcelo at marcelo-laptop:~/src/pytrunk$ ps -fax | grep 5601 Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html 5601 pts/2 S+ 0:00 | \_ ./python 5611 pts/3 S+ 0:00 \_ grep 5601 After changing the process name: marcelo at marcelo-laptop:~/src/pytrunk$ ps -fax | grep 5601 Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html 5601 pts/2 S+ 0:00 | \_ hello_process_name 5635 pts/3 S+ 0:00 \_ grep 5601 And "killall hello_process_name" works, Gnome Process monitor shows it fine too. By now this is Linux only, but I hope to implement it also for BSD (FreeBSD has it[1], OpenBSD [2] and NetBSD [3] too). [1] http://fxr.watson.org/fxr/source/gen/setproctitle.c?v=FREEBSD-LIBC [2] http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/gen/setproctitle.c?rev=1.11;content-type=text%2Fx-cvsweb-markup [3] http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/gen/setproctitle.c?rev=1.22&content-type=text/x-cvsweb-markup&only_with_tag=MAIN Regards ---------- keywords: +patch Added file: http://bugs.python.org/file13635/issue5672_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 19:28:46 2009 From: report at bugs.python.org (Greg Holling) Date: Mon, 06 Apr 2009 17:28:46 +0000 Subject: [issue5710] ctypes should return composite types from callbacks In-Reply-To: <1239038926.27.0.792638874347.issue5710@psf.upfronthosting.co.za> Message-ID: <1239038926.27.0.792638874347.issue5710@psf.upfronthosting.co.za> New submission from Greg Holling : We have an application that calls a 3rd party library that returns a structure (by value) from a callback. I'm including some sample code that duplicates the behavior. The problem is that return types from callbacks cannot be anything other than simple datatypes (c_int, c_float, ..., c_void_p). For other datatypes (STRUCTURE, POINTER, ...), ctypes returns the following error: "invalid result type for callback function" The error message comes from callback.c, in function AllocFunctionCallback. I think this may be a duplicate of issue #1574584. I've tested this on Windows and linux; I'm including a Makefile and source code that works on Windows/cygwin. ------ file: Makefile ---- all: hello.dll hello.exe hello_dll.exe clean: rm *.exe *.dll hello.exe: hello.h hello.c hello_main.c gcc hello.c hello_main.c -o hello.exe --save-temps hello.dll: hello.h hello.c gcc -mno-cygwin -shared hello.c -o hello.dll --save-temps hello_dll.exe: hello.h hello.c gcc hello_main.c -L. -lhello -o hello_main.exe ------ file: hello.h ---- struct helloStruct { int i; float f; int i2; int i3; }; float fxn (struct helloStruct callback()); ------ file: hello.c ---- #include #include "hello.h" float fxn (struct helloStruct callback()) { struct helloStruct result = callback(); printf ("i: %d\n", result.i); printf ("f: %f\n", result.f); return result.f * result.i; } ------ file: hello_main.c ---- #include #include "hello.h" struct helloStruct callback(); int main (int argc, char **argv) { float f; struct helloStruct result; printf ("Hello world\n"); f = fxn (callback); printf ("Callback result: %f\n", f); } struct helloStruct callback () { struct helloStruct result; result.i = 10; result.f = 3.14159; return result; } int int_callback () { return 42; } ------ file: hello.py ---- from ctypes import cdll, c_char, c_int, c_float, Structure, CFUNCTYPE, POINTER, c_char_p class helloStruct (Structure): pass helloStruct._fields_ = [ ('i', c_int), ('f', c_float) ] def callback(): print ("callback()") hs = helloStruct() hs.i = 10 hs.f = 25.5 return hs libc = cdll.msvcrt #helloLib = libc.load_library("hello") #helloLib = libc.hello helloLib = cdll.hello helloLib.fxn.restype = helloStruct # It looks like only simple return types are supported for # callback functions. simple = c_int, c_float, ... # Python bug # 1574584 - status: closed. # Suggests posting to ctypes-users, but I don't see any recent activity. # TMP_FCN = CFUNCTYPE (POINTER(c_char)) # Error message #TMP_FCN = CFUNCTYPE (c_char_p) # Runs, but invalid result #TMP_FCN = CFUNCTYPE (c_void_p) # Runs, but invalid result #TMP_FCN = CFUNCTYPE (c_int) # Runs, but invalid result #TMP_FCN = CFUNCTYPE (POINTER(c_int)) # Error message #TMP_FCN = CFUNCTYPE (POINTER(helloStruct)) # Error message #TMP_FCN = CFUNCTYPE (helloStruct) # Error message callback_fcn = TMP_FCN (callback) result = helloLib.fxn (callback_fcn) # 2.5 #print "result: ", result # 3.0 print ("result: ", result) ---------- assignee: theller components: ctypes messages: 85654 nosy: gholling, theller severity: normal status: open title: ctypes should return composite types from callbacks versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 19:29:23 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 06 Apr 2009 17:29:23 +0000 Subject: [issue5672] Implement a way to change the python process name In-Reply-To: <1238701084.1.0.0781987214897.issue5672@psf.upfronthosting.co.za> Message-ID: <1239038963.33.0.204938160494.issue5672@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: As for os.getprocname() I think you can borrow some code from psutil project [1] to implement it on FreeBSD, OS X and even Windows platforms. [1] http://code.google.com/p/psutil ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 19:31:27 2009 From: report at bugs.python.org (Kevin Watters) Date: Mon, 06 Apr 2009 17:31:27 +0000 Subject: [issue5711] socket.create_connection not in __all__ In-Reply-To: <1239039087.86.0.623299496867.issue5711@psf.upfronthosting.co.za> Message-ID: <1239039087.86.0.623299496867.issue5711@psf.upfronthosting.co.za> New submission from Kevin Watters : socket.create_connection was added in 2.6, but does not get exposed in socket's __all__. Attached is the simple fix against 2.6's socket.py. ---------- components: Library (Lib) files: socket-all-26.diff keywords: patch messages: 85656 nosy: kevinwatters severity: normal status: open title: socket.create_connection not in __all__ type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13636/socket-all-26.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 19:42:43 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 06 Apr 2009 17:42:43 +0000 Subject: [issue5672] Implement a way to change the python process name In-Reply-To: <1238701084.1.0.0781987214897.issue5672@psf.upfronthosting.co.za> Message-ID: <1239039763.66.0.441498255465.issue5672@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Some remarks about the patch: 1 - this line causes a buffer overrun: strncpy(argv[0], name , strlen(name)); A possible solution is to do like posix_putenv(): have a static PyString that holds the memory, and just change the pointer argv[0]: argv[0] = PyString_AS_STRING(name); 2 - The function should update sys.argv as well. In this case, os.getprocname is not necessary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 19:45:11 2009 From: report at bugs.python.org (daku9999) Date: Mon, 06 Apr 2009 17:45:11 +0000 Subject: [issue5712] tkinter - askopenfilenames returns string instead of tuple in windows 2.6.1 release In-Reply-To: <1239039911.64.0.172824576559.issue5712@psf.upfronthosting.co.za> Message-ID: <1239039911.64.0.172824576559.issue5712@psf.upfronthosting.co.za> New submission from daku9999 : from tkFileDialog import askopenfilenames a = askopenfilenames() print a print type(a) ''' --output-- J:/PortablePython_1.1_py2.6.1/Aatest26/tk_new/rgb2hex.py J:/PortablePython_1.1_py2.6.1/Aatest26/tk_new/bluebtn.jpg J:/PortablePython_1.1_py2.6.1/Aatest26/tk_new/redbtn.jpg ''' ---- behaviour seen on windows xp 2.6.1 python release. Linux distributions seem fine. ---- parsing above string (as it's not a tuple anymore) is difficult as it is a list of filenames separated by a space but spaces can be in the middle of filenames. ---------- components: Tkinter messages: 85658 nosy: daku9999 severity: normal status: open title: tkinter - askopenfilenames returns string instead of tuple in windows 2.6.1 release type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 20:13:28 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 06 Apr 2009 18:13:28 +0000 Subject: [issue5707] IDLE will not load In-Reply-To: <1239003620.62.0.108807854341.issue5707@psf.upfronthosting.co.za> Message-ID: <1239041608.16.0.562056993991.issue5707@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Reproduced with the console python.exe. Click an item in the list on the right to choose the key ("down arrow") Exception in Tkinter callback Traceback (most recent call last): File "c:\Python30\lib\tkinter\__init__.py", line 1405, in __call__ return self.func(*args) File "c:\Python30\lib\idlelib\keybindingDialog.py", line 158, in FinalKeySelected self.BuildKeyString() File "c:\Python30\lib\idlelib\keybindingDialog.py", line 165, in BuildKeyString keyList.append(finalKey) AttributeError: 'filter' object has no attribute 'append' Then it is still possible to save these settigs, but the binding contains event=="Control", and IDLE fails on startup: Traceback (most recent call last): File "c:\afa\python\py3k\lib\runpy.py", line 128, in _run_module_as_main "__main__", fname, loader, pkg_name) File "c:\afa\python\py3k\lib\runpy.py", line 34, in _run_code exec(code, run_globals) File "c:\afa\python\py3k\lib\idlelib\idle.py", line 22, in idlelib.PyShell.main() File "c:\afa\python\py3k\lib\idlelib\PyShell.py", line 1375, in main shell = flist.open_shell() File "c:\afa\python\py3k\lib\idlelib\PyShell.py", line 276, in open_shell self.pyshell = PyShell(self) File "c:\afa\python\py3k\lib\idlelib\PyShell.py", line 800, in __init__ OutputWindow.__init__(self, flist, None, None) File "c:\afa\python\py3k\lib\idlelib\OutputWindow.py", line 16, in __init__ EditorWindow.__init__(self, *args) File "c:\afa\python\py3k\lib\idlelib\EditorWindow.py", line 117, in __init__ self.apply_bindings() File "c:\afa\python\py3k\lib\idlelib\EditorWindow.py", line 943, in apply_bindings text.event_add(event, *keylist) File "c:\afa\python\py3k\lib\idlelib\MultiCall.py", line 359, in event_add widget.event_add(self, virtual, seq) File "c:\afa\python\py3k\lib\tkinter\__init__.py", line 1353, in event_add self.tk.call(args) _tkinter.TclError: bad event type or keysym "Control" Simple patch attached. ---------- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file13637/idle_bindings.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 20:16:18 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 06 Apr 2009 18:16:18 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1238992363.65.0.509603376971.issue2953@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: 2009/4/5 <"Tarek Ziad?? "@psf.upfronthosting.co.za> > > Tarek Ziad?? added the comment: > > > Does distutils use _zip_directory_cache in any way? > > Not at all. But pkgutil does, Ah, OK. > and uses to get a dirlist, Couldn't one just open the zip file with zipfile to get the directory list? Is there any real requirement that the cache must be used? > > so I guess a new API should be created in zipimport to handle this case > as well. (I think it's some setuptools code originallyt, that landed in > pkgutil) Probably. ---------- Added file: http://bugs.python.org/file13638/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------

2009/4/5 <"Tarek Ziad?? <report at bugs.python.org>"@psf.upfronthosting.co.za>

Tarek Ziad?? <ziade.tarek at gmail.com> added the comment:

> Does distutils use _zip_directory_cache in any way?

Not at all. But pkgutil does,

Ah, OK.
??
and uses to get a dirlist,

Couldn't one just open the zip file with zipfile to get the directory list? Is there any real requirement that the cache must be used?
??

so I guess a new API should be created in zipimport to handle this case
as well. (I think it's some setuptools code originallyt, that landed in
pkgutil)

Probably.

From =?utf-8?q?Marcelo_Fern=C3=A1ndez_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 6 20:28:44 2009 From: =?utf-8?q?Marcelo_Fern=C3=A1ndez_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Marcelo_Fern=C3=A1ndez_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 06 Apr 2009 18:28:44 +0000 Subject: [issue5672] Implement a way to change the python process name In-Reply-To: <1238701084.1.0.0781987214897.issue5672@psf.upfronthosting.co.za> Message-ID: <1239042524.0.0.937733484638.issue5672@psf.upfronthosting.co.za> Marcelo Fern?ndez added the comment: Great, it's my first patch to python and I'm very happy with your comments. :-) Thanks Amaury, do you think is better that I should take out getprocname() if setprocname() changes sys.argv too? When I got some spare time, I'll take a look at your suggestion and the psutil project. Thanks again ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 20:58:56 2009 From: report at bugs.python.org (Geoffrey Bache) Date: Mon, 06 Apr 2009 18:58:56 +0000 Subject: [issue1748960] os.path.expandvars: expand string without modifying the environment Message-ID: <1239044336.53.0.735263509074.issue1748960@psf.upfronthosting.co.za> Geoffrey Bache added the comment: Thanks, didn't know about that feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 21:01:42 2009 From: report at bugs.python.org (Claudio Canepa) Date: Mon, 06 Apr 2009 19:01:42 +0000 Subject: [issue5559] IDLE Output Window 's goto fails when path has spaces In-Reply-To: <1237951372.91.0.474657570766.issue5559@psf.upfronthosting.co.za> Message-ID: <1239044502.61.0.857554957083.issue5559@psf.upfronthosting.co.za> Claudio Canepa added the comment: On a second look: 1. the code in OutputWindow.py for the 'goto' action looks for a match with the first regex in file_line_pats = [ r'file "([^"]*)", line (\d+)', r'([^\s]+)\((\d+)\)', r'([^\s]+):\s*(\d+):', ] and it assumes the first group gives a valid filename, the second a line number. 2. the potential target lines produced by GrepDialog.py are writen by: sys.stdout.write("%s: %s: %s\n" % (fn, lineno, line)) where: fn :a valid filename ( because an open(fn) was issued before), not guaranted an abspath lineno : unsigned int line: a text line in an arbitrary file, but mostly an *.py Clearly the 3rd regex is the only one that can hit the line produced by GrepDialog, and clearly will fail in any OS that allows spaces in a valid path: the regex breaks the first group at the first whitespace. The tentative fix propossed in the initial post was a minimal change that allow spaces in the path, but was very ugly and not comunicates a clear intention. I like more: r'(?:\s*)(.+):\s+(\d+):' wich discards leading whitespace ( feature unused by GrepDialog but probably handy in pyShell, wich subclasses OutputWindow ) It is a better regex that the original in IDLE, meaning it would hit more positives, but can fail sometimes: Supose the GrepDialog found a hit at line 111 in the file c:\foo.py , with the text a = 1 # see 24: 32: 1 The line sent to OutputWindow would be c:\foo.py: 111: a = 1 # see 24: 32: 1 and the regex will capture the groups: filename = "c:\foo.py: 111: a = 1 # see 24" linenum = "32" The first group fails to capture the filename. I can live with such special case failures, but anyway: In windows, changing the regex to break the first group at the first ': ' would fix the thing ( ': ' cant happen in a fn that pass open (fn) ) How about other OSes ? ------ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 21:25:20 2009 From: report at bugs.python.org (Larry Hastings) Date: Mon, 06 Apr 2009 19:25:20 +0000 Subject: [issue5676] Fix "make clean" in py3k/trunk In-Reply-To: <1238719617.07.0.390323030603.issue5676@psf.upfronthosting.co.za> Message-ID: <1239045920.49.0.912808620913.issue5676@psf.upfronthosting.co.za> Larry Hastings added the comment: % rm -rf @test rm: cannot remove `@test': Permission denied And, before you helpfully chime in with "chmod", yes I know how to run that too. I stuck in and figured it out. The bug: "test_on_error" in "test_shutil" is out of sync with how "shutil.rmtree" runs. "test_on_error" deliberately constructs a directory that is not executable to the current user, then calls "shutil.rmtree" to delete it, passing in an "onerror" callback of "check_args_to_onerror" so it can observe how it fails. "check_args_to_onerror". expects to be called twice; the first time it expects the failing function to be "os.remove". In fact, the first failure is "os.listdir". This fails, throws an exception, and the test is over. Which means the cleanup code in "test_on_error" (the subsequent "chmod" and "rmtree" calls) don't get executed, the "@test" with mode 400 is left behind, and now we have cascading errors. Attached is a patch that fixes "check_args_to_onerror" on my machine. For good measure, it also changes "cleanup_test_droppings" in "regrtest" cleanup code so it chmods a directory to 0o700 before attempting to remove it. The patch was written against py3k/trunk r71304. I find it hard to believe that I'm the only person running "make test" in py3k/trunk not on Windows and not as root. So I theorize os.listdir behaves differently on different OSes. I'm on Ubuntu 9.04, and os.listdir fails if called on a directory that is not executable. Perhaps, on the omnipresent Macs, this is permissible? If so, the tests in "check_args_on_error" when errorState is 0 should be rewritten, either to accept any of the possible arguments or to branch on sys.platform and accept specific arguments. ---------- Added file: http://bugs.python.org/file13639/lch.test_shutil.r71304.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 21:26:34 2009 From: report at bugs.python.org (Larry Hastings) Date: Mon, 06 Apr 2009 19:26:34 +0000 Subject: [issue5676] Fix "make clean" in py3k/trunk In-Reply-To: <1238719617.07.0.390323030603.issue5676@psf.upfronthosting.co.za> Message-ID: <1239045994.71.0.279811877596.issue5676@psf.upfronthosting.co.za> Larry Hastings added the comment: Crapdoodles, I didn't update the patch to get the "regrtest" change I threw in at the last minute. Please see the "v2" patch. ---------- Added file: http://bugs.python.org/file13640/lch.test_shutil.r71304.v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 22:30:25 2009 From: report at bugs.python.org (Mark Sapiro) Date: Mon, 06 Apr 2009 20:30:25 +0000 Subject: [issue5713] smtplib gets out of sync if server returns a 421 status In-Reply-To: <1239049825.43.0.457403750239.issue5713@psf.upfronthosting.co.za> Message-ID: <1239049825.43.0.457403750239.issue5713@psf.upfronthosting.co.za> New submission from Mark Sapiro : RFC821 upon which smtplib was originally based does not define a 421 status code and implies the server should only disconnect in response to a QUIT command. Subsequent extensions in RFC2821 (and now RFC5321) define situations under which the server may return a 421 status and disconnect. This leads to the following problem. An smtplib.SMTP() instance is created and its sendmail() method is called with a list of recipients which contains several invalid, local addresses. sendmail() processes the recipient list, calling the rcpt() method for each. Some of these may be accepted with a 250 or 251 status and some may be rejected with a 550 or other status. The rejects are kept in a dictionary to be eventually returned as the sendmail() result. However, with the Postfix server at least, after 20 rejects, the server sends a 421 Too many errors reply and disconnects, but sendmail continues to process and this results in raising SMTPServerDisconnected("Connection unexpectedly closed") and the response dictionary containing the invalid addresses and their responses is lost. The caller may see the exception as retryable and may retry the send after some delay, but since the caller has received no information about the invalid addresses, it sends the same recipient list and the scenario repeats. ---------- components: Library (Lib) messages: 85666 nosy: msapiro severity: normal status: open title: smtplib gets out of sync if server returns a 421 status type: behavior versions: Python 2.4, Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Mon Apr 6 23:06:37 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Mon, 06 Apr 2009 21:06:37 +0000 Subject: [issue5672] Implement a way to change the python process name In-Reply-To: <1238701084.1.0.0781987214897.issue5672@psf.upfronthosting.co.za> Message-ID: <1239051997.08.0.298743810578.issue5672@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Please don't provide a wrapper around ptrctrl. Instead, expose prctl as is (similar to how ioctl and fcntl get wrapped). It's ok to make some convenience adjustments (e.g. allowing fewer parameters than the actual call), and it's also ok to filter by option (for type safety), and be lazy by not implementing all controls. However, renaming the system call is not good, IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 23:27:12 2009 From: report at bugs.python.org (epitome83) Date: Mon, 06 Apr 2009 21:27:12 +0000 Subject: [issue5707] IDLE will not load In-Reply-To: <1239003620.62.0.108807854341.issue5707@psf.upfronthosting.co.za> Message-ID: <1239053232.63.0.483267944923.issue5707@psf.upfronthosting.co.za> epitome83 added the comment: Thank you for the patch. I have applied it (which is to say, swapped out return filter(None, modList) for return [mod for mod in modList if mod] in keybindingDialog.py), but the problem persists. python.exe continues to load fine, but pythonw.exe still fails at startup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 23:30:25 2009 From: report at bugs.python.org (Todd Weiler) Date: Mon, 06 Apr 2009 21:30:25 +0000 Subject: [issue5579] Display for OrderedDict In-Reply-To: <1238165659.22.0.188261777341.issue5579@psf.upfronthosting.co.za> Message-ID: <1239053425.6.0.796993512072.issue5579@psf.upfronthosting.co.za> Todd Weiler added the comment: Let me defend my idea a little bit. Some people hand code their UI's, some people put them into XML UI files then load those files. I'd like to create them using an OrderedDict. I'm using the pyQT for a gui. Attached is a really simple example program that creates little window that doesn't really do anything except set up the interface. Note the use of a dictionary to set up the interface. The OrderedDict is more concise than XML, is Python Code not a separate file and easy to read. This was inspired by the "builder" concept in Groovy. Thanks for your time. ---------- Added file: http://bugs.python.org/file13641/od_sample.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 23:37:55 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 06 Apr 2009 21:37:55 +0000 Subject: [issue1742205] ZipFile.writestr writes incorrect extended local headers Message-ID: <1239053875.31.0.847509581113.issue1742205@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This header is optional. From http://www.pkware.com/documents/casestudies/APPNOTE.TXT Although not originally assigned a signature, the value 0x08074b50 has commonly been adopted as a signature value for the data descriptor record. Implementers should be aware that ZIP files may be encountered with or without this signature marking data descriptors and should account for either case when reading ZIP files to ensure compatibility. When writing ZIP files, it is recommended to include the signature value marking the data descriptor record. When the signature is used, the fields currently defined for the data descriptor record will immediately follow the signature. So this is Not A Bug (and "zip -T" correctly reports a Warning) However, I suggest to follow the recommendation and add the signature, for 2.7/3.1 only, and not to backport. ---------- nosy: +amaury.forgeotdarc versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 23:43:07 2009 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 06 Apr 2009 21:43:07 +0000 Subject: [issue3586] pwd.getpwnam('nobody') produces incorrect results if sizeof(uid_t) < sizeof(long) In-Reply-To: <1219054964.79.0.647831105855.issue3586@psf.upfronthosting.co.za> Message-ID: <1239054187.09.0.141638499902.issue3586@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'd completely forgotten about this issue! Indeed, test_httpservers now seems to be passing on a 64-bit build on my machine. Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 23:44:42 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 06 Apr 2009 21:44:42 +0000 Subject: [issue5707] IDLE will not load In-Reply-To: <1239003620.62.0.108807854341.issue5707@psf.upfronthosting.co.za> Message-ID: <1239054282.06.0.96151317289.issue5707@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The incorrect settings have been saved in your %USERPROFILE%\.idlerc directory. Try deleting the idle-extensions.cfg there. BTW, "pythonw.exe" is not IDLE. It's a plain python interpreter without a console. When used with no argument it can only exit quickly... To see the IDLE error messages, I often type this in a console window: c:\python30\python.exe -m idlelib.idle ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 6 23:55:14 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 06 Apr 2009 21:55:14 +0000 Subject: [issue5711] socket.create_connection not in __all__ In-Reply-To: <1239039087.86.0.623299496867.issue5711@psf.upfronthosting.co.za> Message-ID: <1239054914.47.0.314660614338.issue5711@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r71329. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 00:16:57 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 06 Apr 2009 22:16:57 +0000 Subject: [issue5502] io-c: TextIOWrapper is faster than BufferedReader but not protected by a lock In-Reply-To: <1237338972.64.0.602798435318.issue5502@psf.upfronthosting.co.za> Message-ID: <1239056217.52.0.189566604176.issue5502@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch which provides a significant speedup (up to 30%) on small operations (small reads, iteration) on binary files. Please test. ---------- keywords: +patch Added file: http://bugs.python.org/file13642/speedup-bufio.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 00:23:42 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 06 Apr 2009 22:23:42 +0000 Subject: [issue5579] Display for OrderedDict In-Reply-To: <1238165659.22.0.188261777341.issue5579@psf.upfronthosting.co.za> Message-ID: <1239056622.72.0.440718360936.issue5579@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The proposal for a custom syntax has nearly zero chance of success. FWIW, the JSON module provides an alternative way to get a the same result using the new object_pairs_hook (being added to Py2.7 and Py3.1). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 01:08:52 2009 From: report at bugs.python.org (R. David Murray) Date: Mon, 06 Apr 2009 23:08:52 +0000 Subject: [issue504152] rfc822 long header continuation broken Message-ID: <1239059331.5.0.733616544958.issue504152@psf.upfronthosting.co.za> R. David Murray added the comment: The source lines mentioned in this issue have not been changed in trunk, and the feedparser line has not been changed in py3k as of r71355 (rfc822 no longer exists, so I'm not sure if the replacement code in py3k has the issue or not). ---------- nosy: +r.david.murray stage: -> test needed type: -> behavior versions: +Python 2.7, Python 3.1 -Python 2.3, Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 01:43:39 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 06 Apr 2009 23:43:39 +0000 Subject: [issue5579] Display for OrderedDict In-Reply-To: <1238165659.22.0.188261777341.issue5579@psf.upfronthosting.co.za> Message-ID: <1239061419.11.0.893574566721.issue5579@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: For this usage I'd suggest a class. See http://www.python.org/dev/peps/pep-3115/ the example containing "OrderedClass". With a little work, your code could look like: class Interface(TabbedPane): class FirstTab(Pane): label = 'First Tab' LineEdit('First Name', length=20) LineEdit('Last Name', length=30) ComboBox('Title', length=10, list=['Mr', 'Mrs', 'Ms', 'Dr', 'BDFL']) class SecondTab(Pane): label = 'Second Tab' LineEdit('City', length=20) LineEdit('Street', length=30) ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 01:50:17 2009 From: report at bugs.python.org (Simon Law) Date: Mon, 06 Apr 2009 23:50:17 +0000 Subject: [issue1697175] winreg module for cygwin? Message-ID: <1239061817.52.0.0852933874295.issue1697175@psf.upfronthosting.co.za> Simon Law added the comment: zooko: You may be interested in http://pypi.python.org/pypi/cygwinreg/ ---------- nosy: +sfllaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 02:24:06 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 Apr 2009 00:24:06 +0000 Subject: [issue5714] CGIHTTPServer._url_collapse_path_split should live elsewhere In-Reply-To: <1239063845.81.0.120232947257.issue5714@psf.upfronthosting.co.za> Message-ID: <1239063845.81.0.120232947257.issue5714@psf.upfronthosting.co.za> New submission from Gregory P. Smith : CGIHTTPServer._url_collapse_path_split should probably live in a more general library and become a documented API. Perhaps in urlparse? ---------- keywords: easy messages: 85679 nosy: gregory.p.smith priority: normal severity: normal status: open title: CGIHTTPServer._url_collapse_path_split should live elsewhere type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 02:30:50 2009 From: report at bugs.python.org (Donghyun Kim) Date: Tue, 07 Apr 2009 00:30:50 +0000 Subject: [issue5715] listen socket close in SocketServer.ForkingMixIn.process_request() In-Reply-To: <1239064250.04.0.401358738839.issue5715@psf.upfronthosting.co.za> Message-ID: <1239064250.04.0.401358738839.issue5715@psf.upfronthosting.co.za> New submission from Donghyun Kim : During implement simple forking TCP server, I got the hang-up child process binding listen socket which caused parent(listen/accept) restarting failed. (port in use) Because child process does something with connected socket, there's no need to bind listen socket in child process. (finish_request() calls RequestHandlerClass with connected socket(=request)) Simply add self.socket.close() in the beginning of forked child process. SocketServer.ForkingMixIn : def process_request(self, request, client_address): """Fork a new subprocess to process the request.""" self.collect_children() pid = os.fork() if pid: # Parent process if self.active_children is None: self.active_children = [] self.active_children.append(pid) self.close_request(request) return else: # Child process. # This must never return, hence os._exit()! self.socket.close() # close parent's listen socket in child try: self.finish_request(request, client_address) os._exit(0) except: try: self.handle_error(request, client_address) finally: os._exit(1) ---------- components: Library (Lib) messages: 85680 nosy: ryan003 severity: normal status: open title: listen socket close in SocketServer.ForkingMixIn.process_request() type: behavior versions: Python 2.4, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:03:22 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:03:22 +0000 Subject: [issue1752919] Exception in HTMLParser for special JavaScript code Message-ID: <1239077002.19.0.46480782666.issue1752919@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed in trunk, py3k. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:03:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:03:24 +0000 Subject: [issue1690201] Added support for custom readline functions Message-ID: <1239077004.42.0.769305034283.issue1690201@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:03:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:03:50 +0000 Subject: [issue1760089] Cross Compiling Python Message-ID: <1239077030.02.0.86306747805.issue1760089@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing as invalid, please reopen if you can explain what 'python-patch' is and how this is a Python issue. ---------- components: +Build -None nosy: +ajaksu2 resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:03:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:03:52 +0000 Subject: [issue1768858] Python - Operation time out problem Message-ID: <1239077032.54.0.230642492221.issue1768858@psf.upfronthosting.co.za> Daniel Diniz added the comment: Unless someone can spot a Python bug here, this issue will be closed. ---------- nosy: +ajaksu2 stage: -> test needed status: open -> pending title: Python - Operation time out problem -> Python - Operation time out problem type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:04:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:04:02 +0000 Subject: [issue1772721] [python-mode] Properly highlight lambda with no arguments Message-ID: <1239077042.38.0.21674486232.issue1772721@psf.upfronthosting.co.za> Daniel Diniz added the comment: Many changes have landed in Misc/python-mode.el since rev 56963, can anyone confirm the described behavior? ---------- nosy: +ajaksu2 stage: -> test needed status: open -> pending type: -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:04:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:04:06 +0000 Subject: [issue1776674] glob.glob inconsistent Message-ID: <1239077046.69.0.911723496599.issue1776674@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Windows stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:04:14 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:04:14 +0000 Subject: [issue1776160] Buffer overflow when listing deeply nested directory Message-ID: <1239077054.8.0.809063643823.issue1776160@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:04:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:04:20 +0000 Subject: [issue1217246] proposed patch for tls wrapped ssl support added to smtplib Message-ID: <1239077060.41.0.824932228415.issue1217246@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +documentation for new SSL module stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:04:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:04:26 +0000 Subject: [issue1054] scriptsinstall target fails in alternate build dir In-Reply-To: <1188350602.15.0.357850795139.issue1054@psf.upfronthosting.co.za> Message-ID: <1239077066.47.0.0126813837573.issue1054@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Installation stage: -> test needed versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:04:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:04:34 +0000 Subject: [issue1115] Minor Change For Better cross compile In-Reply-To: <1189061255.17.0.84912008961.issue1115@psf.upfronthosting.co.za> Message-ID: <1239077074.03.0.561775356877.issue1115@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Build type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:04:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:04:42 +0000 Subject: [issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character In-Reply-To: <1188943421.22.0.776458935296.issue1104@psf.upfronthosting.co.za> Message-ID: <1239077082.07.0.113977502916.issue1104@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:04:46 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:04:46 +0000 Subject: [issue1128] msilib.Directory.make_short only handles file names with a single dot in them In-Reply-To: <1189179520.92.0.794860414513.issue1128@psf.upfronthosting.co.za> Message-ID: <1239077086.35.0.991477023124.issue1128@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:04:53 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:04:53 +0000 Subject: [issue1155] Carbon.CF memory management problem In-Reply-To: <1189617951.85.0.870438592148.issue1155@psf.upfronthosting.co.za> Message-ID: <1239077093.92.0.142626026115.issue1155@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +ronaldoussoren priority: normal -> low status: open -> pending versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:04:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:04:59 +0000 Subject: [issue1004] MultiMethods with type annotations in 3000 In-Reply-To: <1187905288.26.0.195051257185.issue1004@psf.upfronthosting.co.za> Message-ID: <1239077099.57.0.820970619836.issue1004@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:05:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:05:05 +0000 Subject: [issue1772916] xmlrpclib crash when PyXML installed - sgmlop is available Message-ID: <1239077105.84.0.986269753278.issue1772916@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> crash versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:05:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:05:11 +0000 Subject: [issue1423] wave sunau aifc 16bit errors In-Reply-To: <1194812128.3.0.121145701122.issue1423@psf.upfronthosting.co.za> Message-ID: <1239077111.21.0.676544591456.issue1423@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Windows stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:05:19 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:05:19 +0000 Subject: [issue1720250] PyGILState_Ensure does not acquires GIL Message-ID: <1239077119.67.0.673329432144.issue1720250@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl stage: -> test needed type: -> feature request versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:05:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:05:26 +0000 Subject: [issue1746656] IPv6 Interface naming/indexing functions Message-ID: <1239077126.71.0.458364938593.issue1746656@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:05:35 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:05:35 +0000 Subject: [issue1443504] locale.getpreferredencoding() dies when setlocale fails Message-ID: <1239077135.86.0.243027154378.issue1443504@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:05:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 04:05:41 +0000 Subject: [issue1542] Ship 32 and 64bit libs with MSI installer In-Reply-To: <1196621987.22.0.834586722022.issue1542@psf.upfronthosting.co.za> Message-ID: <1239077141.94.0.183966785767.issue1542@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 06:44:55 2009 From: report at bugs.python.org (Cournapeau David) Date: Tue, 07 Apr 2009 04:44:55 +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: <1239079494.91.0.508116704609.issue2943@psf.upfronthosting.co.za> Cournapeau David added the comment: Hi tarek, I can't say for sure about the only part. My experience on windows is that there are so many possible combinations that getting it right is difficult. But in any case, the raised exception is not helpful. I am a developer and familiar with distutils, and I could not make any sense of the message. If the cause cannot be determined, at least a message like "Unexpected result while detecting MS toolchain (str(result) vs str(interesting)" would be helpful I think. Also, but I am not 100 % sure about this, I believe any exception raised within distutils should be inherited from DistutilsError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 08:40:21 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 Apr 2009 06:40:21 +0000 Subject: [issue1746656] IPv6 Interface naming/indexing functions Message-ID: <1239086421.65.0.160522540091.issue1746656@psf.upfronthosting.co.za> Gregory P. Smith added the comment: What is the status of these methods? On the windows side, it appears that these are only available in Vista and later so we'll need some conditional compliation magic there: http://msdn.microsoft.com/en-us/library/bb408409(VS.85).aspx .... fyi - the implementation can be simplified by using Py_BuildValue(). ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 08:47:24 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 07 Apr 2009 06:47:24 +0000 Subject: [issue1397474] timeit execution enviroment Message-ID: <1239086844.66.0.473054783275.issue1397474@psf.upfronthosting.co.za> Raymond Hettinger added the comment: See related discussion in issue 5441 and issue 2527. ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 08:47:34 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 07 Apr 2009 06:47:34 +0000 Subject: [issue5441] Convenience API for timeit.main In-Reply-To: <1236492146.81.0.454674408295.issue5441@psf.upfronthosting.co.za> Message-ID: <1239086854.05.0.577186876935.issue5441@psf.upfronthosting.co.za> Raymond Hettinger added the comment: See related discussion in issue 2527 and issue 1397474. ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 08:47:46 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 07 Apr 2009 06:47:46 +0000 Subject: [issue2527] Pass a namespace to timeit In-Reply-To: <1207052027.28.0.27225375953.issue2527@psf.upfronthosting.co.za> Message-ID: <1239086866.33.0.286388260095.issue2527@psf.upfronthosting.co.za> Raymond Hettinger added the comment: See related discussion in issue 5441 and issue 1397474. ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 11:33:11 2009 From: report at bugs.python.org (Eric Smith) Date: Tue, 07 Apr 2009 09:33:11 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1239096791.53.0.605705376466.issue1580@psf.upfronthosting.co.za> Eric Smith added the comment: My changes on the py3k-short-float-repr branch include: - Create a new function PyOS_double_to_string. This will replace PyOS_ascii_formatd. All existing internal uses of PyOS_ascii_formatd follow this pattern: printf into a buffer to build up the format string, call PyOS_ascii_formatd, then parse the format string to determine what to do. The changes to the API are: - discrete parameters instead of a printf-like format string. No parsing is required. - returns PyMem_Malloc'd memory instead of writing into a supplied buffer. - Modify all callers of PyOS_ascii_formatd to call PyOS_double_to_string instead. These are: - Modules/_pickle.c - Objects/complexobject.c - Objects/floatobject.c - Objects/stringlib/formatter.h - Objects/unicodeobject.c - Python/marshal.c Remaining to be done: - Re-enable 'n' (locale-aware) formatting in float.__format__(). - Decide what to do about the change in meaning of "alt" formatting with format code 'g' when an exponent is present, also in float.__format__(). - Have marshal.c deal with potential memory failures returned from PyOS_double_to_string. - Deprecate PyOS_ascii_formatd. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 11:46:19 2009 From: report at bugs.python.org (Rudd-O) Date: Tue, 07 Apr 2009 09:46:19 +0000 Subject: [issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures In-Reply-To: <1236943653.87.0.451270681282.issue5482@psf.upfronthosting.co.za> Message-ID: <1239097579.4.0.299623489233.issue5482@psf.upfronthosting.co.za> Rudd-O added the comment: I saw your talk. Excellent. Let's make sysadmins and release managers happy while keeping the excellent buildout infrastructure for developers. I KNOW we can do it, and I'm going to help you get there. And maybe next year we both can do a talk about it all. And kick everybody's ass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 12:10:32 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 07 Apr 2009 10:10:32 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1239099032.49.0.0300384762178.issue1580@psf.upfronthosting.co.za> Mark Dickinson added the comment: So work on the py3k-short-float-repr branch is nearing completion, and we (Eric and I) would like to get approval for merging these changes into the py3k branch before this month's beta. A proposal: I propose that the short float representation should be considered an implementation detail for CPython, not a requirement for Python the language. This leaves Jython and IronPython and friends free to do as they wish. All that should be required for Python itself is that float(repr(x)) == x for (non-nan, non-infinite) floats x. Does this seem reasonable to people following this issue? If it's controversial I'll take it to python-dev. Eric's summarized his changes above. Here are mine (mostly---some of this has bits of Eric's work in too): - change repr(my_float) to produce output with minimal number of digits, on IEEE 754 big- and little-endian systems (which includes all systems we can actually get our hands on right now). - there's a new file Python/dtoa.c (and a corresponding file Include/dtoa.h) with a cut-down version of Gay's dtoa and strtod in it. There are comments at the top of that file indicating the changes that have been made from Gay's original code. - one minor semantic change: repr(x) changes to exponential format at 1e16 instead of 1e17. This avoids a strange situation where Gay's code produces a 16-digit 'shortest' integer string for a particular float and Python's formatting code then pads with an incorrect '0': >>> x = 2e16+8. # 2e16+8. is exactly representable as a float >>> x 20000000000000010.0 There's no way that this padding with bogus digits can happen for numbers less than 1e16. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 12:26:53 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 07 Apr 2009 10:26:53 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1239100013.92.0.874716774014.issue1580@psf.upfronthosting.co.za> Mark Dickinson added the comment: Changing target Python versions. I'll upload a patchset to Rietveld sometime soon (later today, I hope). ---------- versions: +Python 3.1 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 13:05:42 2009 From: report at bugs.python.org (Tony Meyer) Date: Tue, 07 Apr 2009 11:05:42 +0000 Subject: [issue1054967] bdist_deb - Debian packager Message-ID: <1239102342.45.0.929717187327.issue1054967@psf.upfronthosting.co.za> Changes by Tony Meyer : ---------- nosy: +anadelonbrin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 13:34:32 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 07 Apr 2009 11:34:32 +0000 Subject: [issue1772721] [python-mode] Properly highlight lambda with no arguments Message-ID: <1239104072.0.0.382453962872.issue1772721@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Yes, the behavior is the same with latest trunk. I'd suggest this new patch though, it has the same effect but avoids a new rule. ---------- nosy: +amaury.forgeotdarc status: pending -> open Added file: http://bugs.python.org/file13643/lambda-with-no-arguments-highlighting-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 13:42:53 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 07 Apr 2009 11:42:53 +0000 Subject: [issue1772721] [python-mode] Properly highlight lambda with no arguments Message-ID: <1239104573.02.0.21132905969.issue1772721@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- assignee: -> barry nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 14:07:06 2009 From: report at bugs.python.org (Tres Seaver) Date: Tue, 07 Apr 2009 12:07:06 +0000 Subject: [issue5716] Overzealous deprecation of BaseException.message In-Reply-To: <1239106026.05.0.616331762443.issue5716@psf.upfronthosting.co.za> Message-ID: <1239106026.05.0.616331762443.issue5716@psf.upfronthosting.co.za> New submission from Tres Seaver : I'm working on cleaning up deprecations for Zope and related packages under Python 2.6. The irony here is that I'm receiving deprecation warnings for custom exception classes which had a 'message' attribute long before the abortive attempt to add them to the BaseException type, which hardly seems reasonable. For instance, docutils.parsers.rst defines a DirectiveError which takes two arguments, 'level' and 'message', and therefore gets hit with the deprecation (even though it never used the new signature). Likewise, ZODB.POSException defines a ConflictError type which takes 'message' as one of several arguments, all optional, and has since at least 2002. I don't think either of these classes should be subject to a deprecation warning for a feature they never used or depended on. ---------- components: Library (Lib) messages: 85695 nosy: tseaver severity: normal status: open title: Overzealous deprecation of BaseException.message versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 14:26:24 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 07 Apr 2009 12:26:24 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1239107184.8.0.607202864242.issue1580@psf.upfronthosting.co.za> Mark Dickinson added the comment: I've uploaded the current version to Rietveld: http://codereview.appspot.com/33084/show ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 14:34:27 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 07 Apr 2009 12:34:27 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1239107667.68.0.595458461394.issue1580@psf.upfronthosting.co.za> Mark Dickinson added the comment: The Rietveld patch set doesn't show the three new files, which are: Python/dtoa.c Include/dtoa.h Lib/test/formatfloat_testcases.txt ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 14:53:54 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 07 Apr 2009 12:53:54 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1239108834.29.0.210584761823.issue1580@psf.upfronthosting.co.za> Mark Dickinson added the comment: Those three missing files have now been added to Rietveld. Just for reference, in case anyone else encounters this: the reason those files were missing from the initial upload was that after I svn merge'd from py3k-short-float-repr to py3k, those files were being treated (by svn) as *copies* from py3k-short-float-repr, rather than new files, so svn diff didn't show any output for them. Doing: svn revert Python/dtoa.c svn add Python/dtoa.c (and similarly for the other two files) fixed this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 15:50:14 2009 From: report at bugs.python.org (Leonid Vasilev) Date: Tue, 07 Apr 2009 13:50:14 +0000 Subject: [issue5714] CGIHTTPServer._url_collapse_path_split should live elsewhere In-Reply-To: <1239063845.81.0.120232947257.issue5714@psf.upfronthosting.co.za> Message-ID: <1239112214.41.0.104324077796.issue5714@psf.upfronthosting.co.za> Leonid Vasilev added the comment: I'd Wrote a patch for this. Perhaps some unittests are needed. ---------- keywords: +patch nosy: +chin Added file: http://bugs.python.org/file13644/issue5714_withdoc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 16:40:55 2009 From: report at bugs.python.org (Matthias Klose) Date: Tue, 07 Apr 2009 14:40:55 +0000 Subject: [issue4587] Need to rework the dbm lib/include selection process In-Reply-To: <18748.30438.749825.192737@montanaro-dyndns-org.local> Message-ID: <1239115255.3.0.853385723318.issue4587@psf.upfronthosting.co.za> Matthias Klose added the comment: here is an updated patch, adding a new configure option --with-dbmliborder, and checking the config args in setup.py. this is the same approach as taken with the --with-system-libffi option. ---------- nosy: +doko Added file: http://bugs.python.org/file13645/dbmliborder.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 16:44:45 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 07 Apr 2009 14:44:45 +0000 Subject: [issue5714] CGIHTTPServer._url_collapse_path_split should live elsewhere In-Reply-To: <1239063845.81.0.120232947257.issue5714@psf.upfronthosting.co.za> Message-ID: <1239115485.56.0.675252037054.issue5714@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, unit tests are always needed for any change. Gregory, why is a function that does two things (collapse and split) a good candidate for a public API? It results in a pretty awkward name :) I'm not saying it's necessarily a bad idea, just looking for motivation. ---------- components: +Library (Lib) nosy: +r.david.murray stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 16:51:16 2009 From: report at bugs.python.org (Matthias Klose) Date: Tue, 07 Apr 2009 14:51:16 +0000 Subject: [issue5359] _dbm extension only built using gdbm on linux In-Reply-To: <1235480573.33.0.45188459471.issue5359@psf.upfronthosting.co.za> Message-ID: <1239115876.2.0.727391339076.issue5359@psf.upfronthosting.co.za> Matthias Klose added the comment: fixed on the 3.0 and 3.1 branches ---------- assignee: -> doko resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 16:51:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 14:51:43 +0000 Subject: [issue2771] test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1239115903.3.0.669032619222.issue2771@psf.upfronthosting.co.za> Daniel Diniz added the comment: Testing how email handles quotes. [mailgw] # Keep email citations when accepting messages. # Setting this to "no" strips out "quoted" text from the message. # Signatures are also stripped. # Allowed values: yes, no # Default: yes keep_quoted_text = yes # Preserve the email body as is - that is, # keep the citations _and_ signatures. # Allowed values: yes, no # Default: no leave_body_unchanged = no ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 16:53:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 14:53:41 +0000 Subject: [issue2771] test issue In-Reply-To: <1239115903.3.0.669032619222.issue2771@psf.upfronthosting.co.za> Message-ID: <2d75d7660904070753o4624a8a5q2084588ac00c7155@mail.gmail.com> Daniel Diniz added the comment: Dumb whole message quote. On Tue, Apr 7, 2009 at 11:51 AM, Daniel Diniz wrote: > > Daniel Diniz added the comment: > > Testing how email handles quotes. > > [mailgw] > > # Keep email citations when accepting messages. > # Setting this to "no" strips out "quoted" text from the message. > # Signatures are also stripped. > # Allowed values: yes, no > # Default: yes > keep_quoted_text = yes > > # Preserve the email body as is - that is, > # keep the citations _and_ signatures. > # Allowed values: yes, no > # Default: no > leave_body_unchanged = no > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 16:54:03 2009 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 07 Apr 2009 14:54:03 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1239099032.49.0.0300384762178.issue1580@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: On Tue, Apr 7, 2009 at 3:10 AM, Mark Dickinson wrote: > A proposal: I propose that the short float representation should be > considered an implementation detail for CPython, not a requirement for > Python the language. ?This leaves Jython and IronPython and friends free > to do as they wish. In principle that's fine with me. > All that should be required for Python itself is > that float(repr(x)) == x for (non-nan, non-infinite) floats x. ?Does > this seem reasonable to people following this issue? ?If it's > controversial I'll take it to python-dev. Historically, we've had a stronger requirement: if you print repr(x) and ship that string to a different machine, float() of that string returns the same value, assuming both systems use the same internal FP representation (e.g. IEEE). Earlier in this bug (or elsewhere) Tim Peters has pointed out that on some platforms, in particular Windows, input conversion doesn't always round correctly and only works correctly when the input has at least 17 digits (in which case you apparently don't need to round, and truncation works just as well -- that's all the C standard requires, I believe). Now that pickle and marshal no longer use repr() for floats I think this is less important, but still at least worth considering. I think by having our own input function we solve this if both hosts run CPython, but it might break for other implementations. In order to make progress I recommend that we just not this and don't use it to hold up the implementation, but I think it's worth noticing in docs somewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 16:54:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 14:54:56 +0000 Subject: [issue2771] test issue In-Reply-To: <2d75d7660904070753o4624a8a5q2084588ac00c7155@mail.gmail.com> Message-ID: <2d75d7660904070754n3b6d2b59i8d51d7118210da96@mail.gmail.com> Daniel Diniz added the comment: Nested quotes. On Tue, Apr 7, 2009 at 11:53 AM, Daniel Diniz wrote: > > Daniel Diniz added the comment: > > Dumb whole message quote. > > On Tue, Apr 7, 2009 at 11:51 AM, Daniel Diniz wrote: >> >> Daniel Diniz added the comment: >> >> Testing how email handles quotes. >> >> [mailgw] >> >> # Keep email citations when accepting messages. >> # Setting this to "no" strips out "quoted" text from the message. >> # Signatures are also stripped. >> # Allowed values: yes, no >> # Default: yes >> keep_quoted_text = yes >> >> # Preserve the email body as is - that is, >> # keep the citations _and_ signatures. >> # Allowed values: yes, no >> # Default: no >> leave_body_unchanged = no >> >> ---------- >> >> _______________________________________ >> Python tracker >> >> _______________________________________ >> > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 16:57:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 14:57:10 +0000 Subject: [issue2771] test issue In-Reply-To: <2d75d7660904070754n3b6d2b59i8d51d7118210da96@mail.gmail.com> Message-ID: <2d75d7660904070756p6952018id67aeffa796564c2@mail.gmail.com> Daniel Diniz added the comment: >>> Testing how email handles quotes. >>> >>> [mailgw] >>> >>> # Keep email citations when accepting messages. >>> # Setting this to "no" strips out "quoted" text from the message. >>> # Signatures are also stripped. >>> # Allowed values: yes, no >>> # Default: yes >>> keep_quoted_text = yes >>> >>> # Preserve the email body as is - that is, >>> # keep the citations _and_ signatures. >>> # Allowed values: yes, no >>> # Default: no >>> leave_body_unchanged = no >>> Bottom posting, less hints about quotes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 17:03:51 2009 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 07 Apr 2009 15:03:51 +0000 Subject: [issue5717] os.defpath includes unix /bin on windows In-Reply-To: <1239116630.78.0.64068842306.issue5717@psf.upfronthosting.co.za> Message-ID: <1239116630.78.0.64068842306.issue5717@psf.upfronthosting.co.za> New submission from anatoly techtonik : >>> import os >>> os.defpath '.;C:\\bin' >>> os.path.defpath '.;C:\\bin' >>> These are invalid paths on windows. ---------- components: Library (Lib) messages: 85708 nosy: techtonik severity: normal status: open title: os.defpath includes unix /bin on windows versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 17:03:56 2009 From: report at bugs.python.org (Steven Bethard) Date: Tue, 07 Apr 2009 15:03:56 +0000 Subject: [issue5716] Overzealous deprecation of BaseException.message In-Reply-To: <1239106026.05.0.616331762443.issue5716@psf.upfronthosting.co.za> Message-ID: <1239116636.7.0.541347636222.issue5716@psf.upfronthosting.co.za> Steven Bethard added the comment: I've run into exactly the same thing. The argparse module's ArgumentError had a "message" attribute back in Python 2.4, and in Python 2.6 I get the same warnings Tres is getting. ---------- nosy: +bethard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 17:03:54 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 15:03:54 +0000 Subject: [issue2771] test issue In-Reply-To: <2d75d7660904070756p6952018id67aeffa796564c2@mail.gmail.com> Message-ID: <2d75d7660904070803x5954d1c6i3f0d559b93366661@mail.gmail.com> Daniel Diniz added the comment: > The reason I noticed this is that since they compare and hash equal, if > you put two such methods into a set, you end up with a set with one > method. Currently, this is preventing me from running two test methods > because the method itself is defined on a base class and two subclasses > which customize several other methods inherit it. I can only run one > test at a time. But you acknowledge they are really the same method attached to different classes, right? The notion of "unbound method" is mostly an implementation detail. The term occurs only 4 times in the whole Python documentation (according to Google). And in py3k they are gone. (*) Moreover, you say you want them to compare unequal because you *explicitly* want the same method called separately for each class it is defined on. Is there anything preventing you to have a set of (class, method) tuples instead? Because it sounds like the logical thing to do in your case. > Having them compare unequal means you can't actually trust unbound > method comparison, nor using unbound methods as keys in a dictionary. "Trust" is a strong word. You can trust the comparison operator if you agree with its semantics, you cannot trust it if you want different semantics. But that doesn't mean it is generally trustworthy or untrustworthy. Really, this is the same as with numbers: 'b' There are probably use cases where the above is annoying. But, conversely, there are probably use cases where a stricter behaviour would be annoying too. > This means some other mapping structure is required if you want to keep > around a bunch of methods and arguments to pass to them. I disagree. The general use case of keeping a bunch of callables with their respective arguments implies storing bound, not unbound, methods. (how often do you feed an unbound method to an addCallback() ?) > It also means > that any time you want to check two methods against each other with the > goal of eventually calling one or both of them, you need to use > something other than `==?. I don't think there are lots of use cases for comparing *unbound* methods. One such use case is checking for redefinition of inherited methods, and the current __eq__ semantics look fine for that. (*) Python 3.0b2+ (py3k, Jul 29 2008, 20:37:34) [GCC 4.3.1 20080626 (prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class A: ... def f(): pass ... >>> type(A.f) >>> a = A() >>> type(a.f) >>> def g(): pass ... >>> class B: ... g = g ... >>> B.g is g True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 17:06:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 15:06:43 +0000 Subject: [issue2771] test issue In-Reply-To: <2d75d7660904070803x5954d1c6i3f0d559b93366661@mail.gmail.com> Message-ID: <2d75d7660904070806t6ca6cce8pfc9c30a3b7952d8a@mail.gmail.com> Daniel Diniz added the comment: > Having them compare unequal means you can't actually trust unbound > method comparison, nor using unbound methods as keys in a dictionary. "Trust" is a strong word. You can trust the comparison operator if you agree with its semantics, you cannot trust it if you want different semantics. But that doesn't mean it is generally trustworthy or untrustworthy. Really, this is the same as with numbers: 'b' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 17:09:31 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 15:09:31 +0000 Subject: [issue2771] test issue In-Reply-To: <2d75d7660904070806t6ca6cce8pfc9c30a3b7952d8a@mail.gmail.com> Message-ID: <2d75d7660904070809q6019c5d6r63c532489090b07b@mail.gmail.com> Daniel Diniz added the comment: > Quote Unquote code snippet: 'b' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 17:11:41 2009 From: report at bugs.python.org (Lukas Lueg) Date: Tue, 07 Apr 2009 15:11:41 +0000 Subject: [issue4751] Patch for better thread support in hashlib In-Reply-To: <1230298756.92.0.632482701363.issue4751@psf.upfronthosting.co.za> Message-ID: <1239117101.38.0.138931155905.issue4751@psf.upfronthosting.co.za> Lukas Lueg added the comment: bump hashlibopenssl_gil_py27.diff has not yet been applied to py27 and does not apply cleanly any more. Here is an updated version. ---------- status: pending -> open Added file: http://bugs.python.org/file13646/hashlibopenssl_gil_py27_2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 17:11:47 2009 From: report at bugs.python.org (Lukas Lueg) Date: Tue, 07 Apr 2009 15:11:47 +0000 Subject: [issue4751] Patch for better thread support in hashlib In-Reply-To: <1230298756.92.0.632482701363.issue4751@psf.upfronthosting.co.za> Message-ID: <1239117107.7.0.754864702951.issue4751@psf.upfronthosting.co.za> Changes by Lukas Lueg : Removed file: http://bugs.python.org/file13057/hashlibopenssl_gil_py27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 17:15:42 2009 From: report at bugs.python.org (David Byrne) Date: Tue, 07 Apr 2009 15:15:42 +0000 Subject: [issue5718] Problem compiling ffi part of build on AIX 5.3. In-Reply-To: <1239117342.9.0.186105014374.issue5718@psf.upfronthosting.co.za> Message-ID: <1239117342.9.0.186105014374.issue5718@psf.upfronthosting.co.za> New submission from David Byrne : I am using AIX 5.3 xlc 9.0. I am unable to get the libffi section to build. It also happens with the separate libffi code, so I will try to report there as well. I get the following: cc_r -qlanglvl=extc89 -DNDEBUG -O -I. -I/appl/bwc/src/Python-2.6.1/./Include -Ibuild/temp.aix-5.3-2.6/libffi/include -Ibuild/temp.aix-5.3-2.6/libffi -I/appl/bwc/src/Python-2.6.1/Modules/_ctypes/libffi/src -I/appl/bwc/local2/include -I. -IInclude -I./Include -I/usr/local/include -I/appl/bwc/src/Python-2.6.1/Include -I/appl/bwc/src/Python-2.6.1 -c /appl/bwc/src/Python-2.6.1/Modules/_ctypes/libffi/src/powerpc/aix_closure.S -o build/temp.aix-5.3-2.6/appl/bwc/src/Python-2.6.1/Modules/_ctypes/libffi/src/powerpc/aix_closure.o Assembler: /tmp/xlcS00-Mgqd.s: line 111: undefined symbol ".ffi_closure_helper_DARWIN" /tmp/xlcS00-Mgqd.s: line 111: illegal expression type for branch address ---------- assignee: theller components: ctypes messages: 85714 nosy: dbyrne, theller severity: normal status: open title: Problem compiling ffi part of build on AIX 5.3. type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 17:21:57 2009 From: report at bugs.python.org (Leonid Vasilev) Date: Tue, 07 Apr 2009 15:21:57 +0000 Subject: [issue5714] CGIHTTPServer._url_collapse_path_split should live elsewhere In-Reply-To: <1239063845.81.0.120232947257.issue5714@psf.upfronthosting.co.za> Message-ID: <1239117717.09.0.101001687086.issue5714@psf.upfronthosting.co.za> Leonid Vasilev added the comment: Actually urlparse.urljoin implements RFC 2396 Is it true that 'CGIHTTPServer._url_collapse_path_split' is just a inverted 'urlparse.urljoin' ? """ >>> urlparse.urljoin('http://a/b/c/','g') 'http://a/b/c/g' >>> urlparse.url_collapse_path_split('http://a/b/c/g') ('/http:/a/b/c', 'g') >>> urlparse.urlsplit('http://a/b/c/g') SplitResult(scheme='http', netloc='a', path='/b/c/g', query='', fragment='') """ And there is existing function 'urlparse.urlsplit'. I think "CGIHTTPServer._url_collapse_path_split" is just a customized version of latter, and should be rewritten using 'urlparse.urlsplit'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 17:28:19 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 07 Apr 2009 15:28:19 +0000 Subject: [issue5696] test_telnetlib augmentation In-Reply-To: <1238895962.87.0.497816781262.issue5696@psf.upfronthosting.co.za> Message-ID: <1239118099.6.0.575827176965.issue5696@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Jack, this test seems to be very flaky on the buildbots (and my machine). I see a lot of failures like this: ====================================================================== FAIL: test_read_eager_B (test.test_telnetlib.ReadTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/temp/python/trunk/Lib/test/test_telnetlib.py", line 235, in test_read_eager_B self._test_read_any_eager_B('read_eager') File "/temp/python/trunk/Lib/test/test_telnetlib.py", line 224, in _test_read_any_eager_B self.assertRaises(EOFError, func) AssertionError: EOFError not raised ====================================================================== FAIL: test_read_very_eager_B (test.test_telnetlib.ReadTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/temp/python/trunk/Lib/test/test_telnetlib.py", line 231, in test_read_very_eager_B self._test_read_any_eager_B('read_very_eager') File "/temp/python/trunk/Lib/test/test_telnetlib.py", line 224, in _test_read_any_eager_B self.assertRaises(EOFError, func) AssertionError: EOFError not raised ---------------------------------------------------------------------- Ran 22 tests in 76.712s FAILED (failures=2) test test_telnetlib failed -- errors occurred; run in verbose mode for details 1 test failed: test_telnetlib ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 17:36:32 2009 From: report at bugs.python.org (Matthias Klose) Date: Tue, 07 Apr 2009 15:36:32 +0000 Subject: [issue3783] dbm.sqlite proof of concept In-Reply-To: <1220572652.24.0.256023256295.issue3783@psf.upfronthosting.co.za> Message-ID: <1239118592.77.0.309165191917.issue3783@psf.upfronthosting.co.za> Matthias Klose added the comment: is there any chance for inclusion in 3.1? ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 17:39:30 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 07 Apr 2009 15:39:30 +0000 Subject: [issue5359] _dbm extension only built using gdbm on linux In-Reply-To: <1235480573.33.0.45188459471.issue5359@psf.upfronthosting.co.za> Message-ID: <1239118770.87.0.198905902592.issue5359@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This should be reverted on the py3k branch. The changes to setup.py cause the select module to be loaded and that doesn't work when it hasn't be built! Traceback (most recent call last): File "./setup.py", line 1671, in main() File "./setup.py", line 1666, in main 'Lib/smtpd.py'] File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/distutils/core.py", line 149, in setup dist.run_commands() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/distutils/dist.py", line 943, in run_commands self.run_command(cmd) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/distutils/dist.py", line 963, in run_command cmd_obj.run() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/distutils/command/build.py", line 128, in run self.run_command(cmd_name) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/distutils/cmd.py", line 317, in run_command self.distribution.run_command(command) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/distutils/dist.py", line 963, in run_command cmd_obj.run() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/distutils/command/build_ext.py", line 347, in run self.build_extensions() File "./setup.py", line 103, in build_extensions missing = self.detect_modules() File "./setup.py", line 709, in detect_modules for x in gen_db_minor_ver_nums(4): File "./setup.py", line 686, in gen_db_minor_ver_nums if allow_db_ver((4, x)): File "./setup.py", line 677, in allow_db_ver arch = platform_machine() File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/platform.py", line 1222, in machine return uname()[4] File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/platform.py", line 1152, in uname processor = _syscmd_uname('-p','') File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/platform.py", line 905, in _syscmd_uname f = os.popen('uname %s 2> /dev/null' % option) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/os.py", line 629, in popen import subprocess, io File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/subprocess.py", line 373, in import select ImportError: No module named select ---------- nosy: +benjamin.peterson resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Apr 7 17:47:35 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Tue, 07 Apr 2009 15:47:35 +0000 Subject: [issue3872] Python 2.6rc2: Tix ComboBox error In-Reply-To: <1221463837.04.0.987007832734.issue3872@psf.upfronthosting.co.za> Message-ID: <1239119255.14.0.62436773482.issue3872@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is now fixed in 2.6.2c1 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 17:53:06 2009 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 07 Apr 2009 15:53:06 +0000 Subject: [issue4828] patch suggestion for webbrowser In-Reply-To: <1231063999.69.0.0846570539702.issue4828@psf.upfronthosting.co.za> Message-ID: <1239119586.62.0.831028563121.issue4828@psf.upfronthosting.co.za> anatoly techtonik added the comment: Windows has a plenty of executable extensions that can be dynamically added. You may want to look at patch at issue 2200 http://bugs.python.org/file11359/spawn.patch.txt for workaround. ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 18:01:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 16:01:11 +0000 Subject: [issue1774840] Not exiting when running tests Message-ID: <1239120071.34.0.978721730133.issue1774840@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing as issue 3379 has discussion and patches. ---------- nosy: +ajaksu2 resolution: -> duplicate stage: needs patch -> status: open -> closed superseder: -> Option to not-exit on test _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 18:01:27 2009 From: report at bugs.python.org (Marius Gedminas) Date: Tue, 07 Apr 2009 16:01:27 +0000 Subject: [issue5719] optparse: please provide a usage example in the module docstring In-Reply-To: <1239120087.77.0.885148880477.issue5719@psf.upfronthosting.co.za> Message-ID: <1239120087.77.0.885148880477.issue5719@psf.upfronthosting.co.za> New submission from Marius Gedminas : Please add a simple usage example to the module docstring in optparse.py. The example available in the Python library reference would suffice (see http://python.org/doc/current/library/optparse.html). Rationale: optparse is convenient, but a bit unintuitive. As a single data point, it took me a couple of years until I started remembering the syntax without having to refer to the documentation (compare this with, e.g. the csv module which you'll remember how to use after reading the docs once). Intuitively I always typed pydoc optparse in a terminal window and was disappointed with the lack of examples. The online docs are good, but not as easy to reach as pydoc. In my experience, it's quite often that when you reach for optparse you're alreay shaving a yak (solving a problem needed to solve the real problem), and the five extra mouse clicks needed to find optparse's docs in the browser are rather disruptive. ---------- assignee: georg.brandl components: Documentation messages: 85722 nosy: georg.brandl, mgedmin severity: normal status: open title: optparse: please provide a usage example in the module docstring _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 18:01:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 16:01:56 +0000 Subject: [issue3379] Option to not-exit on test In-Reply-To: <1216221202.34.0.503221708594.issue3379@psf.upfronthosting.co.za> Message-ID: <1239120116.78.0.272697315042.issue3379@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Tests priority: -> normal stage: -> patch review versions: +Python 2.7, Python 3.1 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 18:04:31 2009 From: report at bugs.python.org (Matthias Klose) Date: Tue, 07 Apr 2009 16:04:31 +0000 Subject: [issue5359] _dbm extension only built using gdbm on linux In-Reply-To: <1235480573.33.0.45188459471.issue5359@psf.upfronthosting.co.za> Message-ID: <1239120271.62.0.985924710836.issue5359@psf.upfronthosting.co.za> Matthias Klose added the comment: I'm removing the db4.6 check instead. This was useful when building the _bsddb3 extension, where threading tests would fail on these architectures. It's not necessary for building the _dbm extension. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 18:05:25 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 16:05:25 +0000 Subject: [issue2674] unittest.TestProgram uses sys.exit() In-Reply-To: <1208959187.62.0.82904421242.issue2674@psf.upfronthosting.co.za> Message-ID: <1239120325.24.0.931738023964.issue2674@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing as issue 3379 has more discussion and patch. ---------- nosy: +ajaksu2 priority: -> normal resolution: -> duplicate status: open -> closed superseder: -> Option to not-exit on test _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 18:06:18 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 07 Apr 2009 16:06:18 +0000 Subject: [issue5359] _dbm extension only built using gdbm on linux In-Reply-To: <1239120271.62.0.985924710836.issue5359@psf.upfronthosting.co.za> Message-ID: <1afaf6160904070906u3891788bl22ea71052dc5fc80@mail.gmail.com> Benjamin Peterson added the comment: 2009/4/7 Matthias Klose : > > Matthias Klose added the comment: > > I'm removing the db4.6 check instead. This was useful when building the > _bsddb3 extension, where threading tests would fail on these > architectures. It's not necessary for building the _dbm extension. Ok. Just make sure "make clean; make" works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 18:06:30 2009 From: report at bugs.python.org (Michael Foord) Date: Tue, 07 Apr 2009 16:06:30 +0000 Subject: [issue3379] Option to not-exit on test In-Reply-To: <1216221202.34.0.503221708594.issue3379@psf.upfronthosting.co.za> Message-ID: <1239120390.76.0.216683788062.issue3379@psf.upfronthosting.co.za> Michael Foord added the comment: Not returning the results is not a problem - if you needed access to the results you would hardly be using this API in the first place. The obvious use case if for running tests from an interactive environment where you are using the visual output on stdout. If you want to collect the results you do it programmatically. I wouldn't be opposed to main() returning the results though, but think we should apply the patch rather than debate further. To action! ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 18:14:46 2009 From: report at bugs.python.org (Matthias Klose) Date: Tue, 07 Apr 2009 16:14:46 +0000 Subject: [issue5359] _dbm extension only built using gdbm on linux In-Reply-To: <1235480573.33.0.45188459471.issue5359@psf.upfronthosting.co.za> Message-ID: <1239120886.75.0.993458655219.issue5359@psf.upfronthosting.co.za> Matthias Klose added the comment: > Ok. Just make sure "make clean; make" works. done. the "make clean" was missing before. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 18:22:39 2009 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 07 Apr 2009 16:22:39 +0000 Subject: [issue5717] os.defpath includes unix /bin on windows In-Reply-To: <1239116630.78.0.64068842306.issue5717@psf.upfronthosting.co.za> Message-ID: <1239121359.46.0.332775137093.issue5717@psf.upfronthosting.co.za> Guido van Rossum added the comment: Can you suggest a fix? ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 19:09:55 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 07 Apr 2009 17:09:55 +0000 Subject: [issue5714] CGIHTTPServer._url_collapse_path_split should live elsewhere In-Reply-To: <1239063845.81.0.120232947257.issue5714@psf.upfronthosting.co.za> Message-ID: <1239124195.03.0.835458779528.issue5714@psf.upfronthosting.co.za> Gregory P. Smith added the comment: urlparse.urljoin and urlparse.urlsplit do not do what is required for this function. urljoin does not collapse paths. urlsplit has nothing to do with paths. I agree r.david.murray that it is odd that it does two functions at once (the collapse and the split). I wrote it specifically for its current use case when checking paths to cgi scripts. The unittests for it describe the exact behavior it needs to implement. Trying to implement a separate collapse function is approximately the same amount of code because the edge cases such as '/a/b/' and '/a/b/c/..' which both need to result in it returning ('/a/b', '') instead of ('/a', 'b') are why it made sense to keep as a single function for its current use. Unittests for the function already exist in Lib/test/test_httpservers.py to describe its full behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 19:20:23 2009 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 07 Apr 2009 17:20:23 +0000 Subject: [issue5695] test_logging fails when run twice in a row In-Reply-To: <1238891451.8.0.0993541274648.issue5695@psf.upfronthosting.co.za> Message-ID: <1239124823.8.0.566443309046.issue5695@psf.upfronthosting.co.za> Vinay Sajip added the comment: Done, in r71370. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 20:14:54 2009 From: report at bugs.python.org (Thomas Heller) Date: Tue, 07 Apr 2009 18:14:54 +0000 Subject: [issue5710] ctypes should return composite types from callbacks In-Reply-To: <1239038926.27.0.792638874347.issue5710@psf.upfronthosting.co.za> Message-ID: <1239128094.08.0.802500503723.issue5710@psf.upfronthosting.co.za> Thomas Heller added the comment: There is a problem returning arbitrary complicated ctypes types from callbacks. Consider that a callback function returns a structure; the structure itself may contain 'char *' field for example. The callback function creates the structure and fills in the fields. The 'char *' field contains a pointer to a nul-terminated string; the ctypes structure object must keep the Python string alive as long as the structure itself. It does this via the private '_objects' instance variable. If the callback function now returns the structure, the Python ctypes object usually will go out of scope and will be garbage collected, together with its '_objects'. So, the pointer(s) contained in the structure will become invalid now, and even simple structure fields will become invalid. However, the callback function result will be used by some other code and will surely crash. In principle it should be possible to make code like this work; one would have to maintain the returned objects elsewhere and clean them up when they are no longer used anywhere; but I think this gets too complicated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 20:30:09 2009 From: report at bugs.python.org (Jack Diederich) Date: Tue, 07 Apr 2009 18:30:09 +0000 Subject: [issue5696] test_telnetlib augmentation In-Reply-To: <1238895962.87.0.497816781262.issue5696@psf.upfronthosting.co.za> Message-ID: <1239129009.22.0.612935776956.issue5696@psf.upfronthosting.co.za> Jack Diederich added the comment: Could you try increasing self.blocking_timeout (in the _setUp function) to something greater than 0.0 (like 0.1) and see if that works? I picked a constant that was as small as Worked For Me to keep the total test time as short as possible. Unfortunately select() is called in the guts of Telnet so slipping in a mock object is difficult. I could also add more synchronization primitives but that is also icky. Hopefully just upping the constant a little does the trick. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 20:32:27 2009 From: report at bugs.python.org (Jared Grubb) Date: Tue, 07 Apr 2009 18:32:27 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1239129147.7.0.799924294482.issue1580@psf.upfronthosting.co.za> Jared Grubb added the comment: I think ANY attempt to rely on eval(repr(x))==x is asking for trouble, and it should probably be removed from the docs. Example: The following C code can vary *even* on a IEEE 754 platform, even in two places in the same source file (so same compile options), even in the same 5 lines of code recompiled after changing code that does even not touch/read 'x' or 'y': double x, y; x = 3.0/7.0; y = x; /* ... code that doesnt touch/read x or y ... */ printf(" x==y: %s", (x==y) ? "true" : "false"); So, how can we hope that eval(repr(x))==x is EVER stable? Equality and floating point should raise the hairs on the back of everyone's neck... (Code above based on http://docs.sun.com/source/806-3568/ncg_goldberg.html in section "Current IEEE 754 Implementations", along with a great explanation on why this is true. The code example is a little different, but the same concept applies.) ---------- nosy: +jaredgrubb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 21:09:21 2009 From: report at bugs.python.org (David Ripton) Date: Tue, 07 Apr 2009 19:09:21 +0000 Subject: [issue1590] "make altinstall" installs pydoc, idle, smtpd.py In-Reply-To: <1197388115.32.0.880215268876.issue1590@psf.upfronthosting.co.za> Message-ID: <1239131361.05.0.230812216573.issue1590@psf.upfronthosting.co.za> David Ripton added the comment: I see this has been marked as "test needed", but this patch is a change to Makefile.pre.in, and it's not clear to me how to unit test it using the existing Python test framework. FWIW, I've manually tested it (on Linux) by doing ./configure; make; sudo make install and verifying the absence of (newly installed) idle, pydoc, and smtpd.py in /usr/local/bin ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 21:15:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 07 Apr 2009 19:15:05 +0000 Subject: [issue1590] "make altinstall" installs pydoc, idle, smtpd.py In-Reply-To: <1197388115.32.0.880215268876.issue1590@psf.upfronthosting.co.za> Message-ID: <1239131705.29.0.814870487266.issue1590@psf.upfronthosting.co.za> Daniel Diniz added the comment: That's good enough a test for me :) Pinging gutworth so we can have this in 3.1. ---------- nosy: +ajaksu2, benjamin.peterson stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 21:18:58 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 07 Apr 2009 19:18:58 +0000 Subject: [issue5696] test_telnetlib augmentation In-Reply-To: <1239129009.22.0.612935776956.issue5696@psf.upfronthosting.co.za> Message-ID: <1afaf6160904071218k47248ba5wc42b89421e2f6ebb@mail.gmail.com> Benjamin Peterson added the comment: 2009/4/7 Jack Diederich : > > Jack Diederich added the comment: > > Could you try increasing self.blocking_timeout (in the _setUp function) > to something greater than 0.0 (like 0.1) and see if that works? ?I > picked a constant that was as small as Worked For Me to keep the total > test time as short as possible. Nope, still have the same problem. > > Unfortunately select() is called in the guts of Telnet so slipping in a > mock object is difficult. ?I could also add more synchronization > primitives but that is also icky. ?Hopefully just upping the constant a > little does the trick. You could monkey patch select.select() during the tests or rewrite telnetlib, so it calls self._select() and make a subclass. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Apr 7 21:23:58 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Tue, 07 Apr 2009 19:23:58 +0000 Subject: [issue5718] Problem compiling ffi part of build on AIX 5.3. In-Reply-To: <1239117342.9.0.186105014374.issue5718@psf.upfronthosting.co.za> Message-ID: <1239132238.15.0.760750136879.issue5718@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you provide a patch? If not, chances are high that no action is taken. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 21:28:06 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 07 Apr 2009 19:28:06 +0000 Subject: [issue1590] "make altinstall" installs pydoc, idle, smtpd.py In-Reply-To: <1197388115.32.0.880215268876.issue1590@psf.upfronthosting.co.za> Message-ID: <1239132486.4.0.498966434405.issue1590@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r71372. Thanks for the patch! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 21:44:02 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 07 Apr 2009 19:44:02 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1239133442.18.0.782126582673.issue1580@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Historically, we've had a stronger requirement: if you print repr(x) > and ship that string to a different machine, float() of that string > returns the same value, assuming both systems use the same internal FP > representation (e.g. IEEE). Hmm. With the py3k-short-float-repr stuff, we should be okay moving things between different CPython boxes, since float() would use Gay's code and so would be correctly rounded for any length input, not just input with 17 significant digits. But for a CPython-generated short repr to give the correct value on some other implementation, that implementation would also have to have a correctly rounded string->float. For safety's sake, I'll make sure that marshal (version 1) and pickle (protocol 0) are still outputting the full 17 digits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 21:44:09 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 07 Apr 2009 19:44:09 +0000 Subject: [issue5461] python3 symlink In-Reply-To: <1236626563.57.0.797071883805.issue5461@psf.upfronthosting.co.za> Message-ID: <1239133449.08.0.305113800748.issue5461@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r71376. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 22:04:24 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 07 Apr 2009 20:04:24 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1239134664.49.0.385812126421.issue1580@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I think ANY attempt to rely on eval(repr(x))==x is asking for trouble, > and it should probably be removed from the docs. I disagree. I've read the paper you refer to; nevertheless, it's still perfectly possible to guarantee eval(repr(x)) == x in spite of the various floating-point details one has to deal with. In the worst case, assuming that C doubles are IEEE 754 binary64 format, for double - > string conversion one can simply cast the double to an array of 8 bytes, extract the sign, exponent and mantissa from those bytes, and then compute the appropriate digit string using nothing but integer arithmetic; similarly for the reverse operation: take a digit string, do some integer arithmetic to figure out what the exponent, mantissa and sign should be, and pack those values back into the double. Hey presto: correctly rounded string -> double and double -> string conversions! Add a whole bag of tricks to speed things up in common cases and you end up with something like David Gay's code. It *is* true that the correctness of Gay's code depends on the FPU being set to use 53-bit precision, something that isn't true by default on x87 FPUs. But this isn't hard to deal with, either: first, you make sure that you're not using the x87 FPU unless you really have to (all Intel machines that are newer than Pentium 3 have the SSE2 instruction set, which doesn't have the problems that x87 does); second, if you *really* have to use x87 then you figure out how to set its control word to get 53-bit precision and round-half-to-even rounding; third, if you can't figure out how to set the control word then you use a fallback something like that described above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 22:05:03 2009 From: report at bugs.python.org (Thomas Heller) Date: Tue, 07 Apr 2009 20:05:03 +0000 Subject: [issue3102] ctypes defines global symbols In-Reply-To: <1213343694.16.0.290726791228.issue3102@psf.upfronthosting.co.za> Message-ID: <1239134703.69.0.447519679925.issue3102@psf.upfronthosting.co.za> Thomas Heller added the comment: I think simple renaming would be fine. I do not see how module_methods could be made static; however, the init_callbacks_in_module function should probably be removed completely. Some other symbols could be made static because they are only used in a single source file, Array_Type and CData_Type for example (there may be more). For MallocClosure/FreeClosure and the fedoraproject patch: Where does ffi_closure_alloc and ffi_closure_free come from? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 22:10:54 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 07 Apr 2009 20:10:54 +0000 Subject: [issue2519] Typing 'modules' in the interactive help system fails when imports fail In-Reply-To: <1206949196.03.0.881908306183.issue2519@psf.upfronthosting.co.za> Message-ID: <1239135054.7.0.194009764702.issue2519@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 22:14:39 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 07 Apr 2009 20:14:39 +0000 Subject: [issue2713] Py3k warn on unicode escapes in raw strings In-Reply-To: <1209418975.28.0.733174226817.issue2713@psf.upfronthosting.co.za> Message-ID: <1239135279.98.0.223059382586.issue2713@psf.upfronthosting.co.za> Georg Brandl added the comment: I guess it isn't... ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 22:16:44 2009 From: report at bugs.python.org (Hans L) Date: Tue, 07 Apr 2009 20:16:44 +0000 Subject: [issue5099] subprocess.POpen.__del__() AttributeError (os module == None!) In-Reply-To: <1233244808.27.0.922840300181.issue5099@psf.upfronthosting.co.za> Message-ID: <1239135404.81.0.0811097872746.issue5099@psf.upfronthosting.co.za> Changes by Hans L : ---------- nosy: +hozn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 22:23:58 2009 From: report at bugs.python.org (Jack Diederich) Date: Tue, 07 Apr 2009 20:23:58 +0000 Subject: [issue5696] test_telnetlib augmentation In-Reply-To: <1238895962.87.0.497816781262.issue5696@psf.upfronthosting.co.za> Message-ID: <1239135838.38.0.0898429359405.issue5696@psf.upfronthosting.co.za> Jack Diederich added the comment: committed some changes in r71377. This uses Queue.join() to [hopefully] eliminate the race condidtions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 22:31:53 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 07 Apr 2009 20:31:53 +0000 Subject: [issue658693] cPickle does relative import Message-ID: <1239136313.32.0.806045621929.issue658693@psf.upfronthosting.co.za> Georg Brandl added the comment: Probably, but I guess nobody is really interested in fixing it since it's not in 3.x. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 22:36:47 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 07 Apr 2009 20:36:47 +0000 Subject: [issue3722] print followed by exception eats print with doctest In-Reply-To: <1220007253.68.0.614144600028.issue3722@psf.upfronthosting.co.za> Message-ID: <1239136607.74.0.148401621389.issue3722@psf.upfronthosting.co.za> Georg Brandl added the comment: It's not really my call. Tim is the author of the module and classified it as a feature request. Why don't you try to come up with a patch? He might even accept it :D ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 23:00:34 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 07 Apr 2009 21:00:34 +0000 Subject: [issue588825] unittest.py, better error message Message-ID: <1239138034.01.0.55070920109.issue588825@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: collinwinter -> michael.foord nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 23:02:03 2009 From: report at bugs.python.org (Jared Grubb) Date: Tue, 07 Apr 2009 21:02:03 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1239138123.55.0.585460045597.issue1580@psf.upfronthosting.co.za> Jared Grubb added the comment: The process that you describe in msg85741 is a way of ensuring "memcmp(&x, &y, sizeof(x))==0", and it's portable and safe and is the Right Thing that we all want and expect. But that's not "x==y", as that Sun paper explains. It's close, but not technically accurate, as the implication arrow only goes one way (just as "x=1/y" implies "xy=1" in algebra, but not the other way around) I'd be interested to see if you could say that the Python object model/bytecode interpretation enforces a certain quauntum of operations that actually does imply "eval(repr(x))==x"; but I suspect it's unprovable, and it's fragile as Python grows to have more support in CLI/LLVM/JVM backends. My pedantic mind would strip any and all references to floating-point equality out of the docs, as it's dangerous and insidiously misleading, even in "obvious" cases. But, I'll stop now :) (FYI: I've enjoyed the ~100 messages here.. Great stuff!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 23:04:41 2009 From: report at bugs.python.org (Michael Foord) Date: Tue, 07 Apr 2009 21:04:41 +0000 Subject: [issue588825] unittest.py, better error message Message-ID: <1239138281.4.0.488802435913.issue588825@psf.upfronthosting.co.za> Michael Foord added the comment: This feature request was recently implemented using the 'longMessage' class attribute on TestCase. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 23:48:28 2009 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 07 Apr 2009 21:48:28 +0000 Subject: [issue5716] Overzealous deprecation of BaseException.message In-Reply-To: <1239106026.05.0.616331762443.issue5716@psf.upfronthosting.co.za> Message-ID: <1239140908.3.0.596889157578.issue5716@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 23:53:54 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 07 Apr 2009 21:53:54 +0000 Subject: [issue5710] ctypes should return composite types from callbacks In-Reply-To: <1239038926.27.0.792638874347.issue5710@psf.upfronthosting.co.za> Message-ID: <1239141234.25.0.54630372992.issue5710@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: But isn't this purely a user-side concern? For example, if I want to use a function such as QBuffer::setBuffer in the Qt library: http://doc.trolltech.com/4.4/qbuffer.html#setBuffer I must keep a reference to the buffer as long as the QBuffer is alive, or expect a crash. Returning a pointer from a function is always tough, even in C: everybody has already tried to return the address of a local variable... the pointer must belong to some container that outlives the function call. ctypes is not different in this aspect. The same precautions as in C apply. And with a warning note in the documentation, there seems to be no reason to limit the return type of a callback. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 7 23:57:49 2009 From: report at bugs.python.org (Zooko O'Whielacronx) Date: Tue, 07 Apr 2009 21:57:49 +0000 Subject: [issue5720] ctime: I don't think that word means what you think it means. In-Reply-To: <1239141469.77.0.706973197517.issue5720@psf.upfronthosting.co.za> Message-ID: <1239141469.77.0.706973197517.issue5720@psf.upfronthosting.co.za> New submission from Zooko O'Whielacronx : The stat module currently uses the "st_ctime" slot to hold two kinds values which are semantically different but which are frequently confused with one another. It chooses which kind of value to put in there based on platform -- Windows gets the file creation time and all other platforms get the "ctime". The only sane way to use this API is then to switch on platform: if platform.system() == "Windows": metadata["creation time"] = s.st_ctime else: metadata["unix ctime"] = s.st_ctime (That is an actual code snippet from the Allmydata-Tahoe project.) Many or even most programmers incorrectly think that unix ctime is file creation time, so instead of using the sane idiom above, they write the following: metadata["ctime"] = s.st_ctime thus passing on the confusion to the users of their metadata, who may not know on which platform this metadata was created. This is the situation we have found ourselves in for the Allmydata-Tahoe project -- we now have a bunch of "ctime" values stored in our filesystem and no way to tell which kind they were. More and more filesystems such as ZFS and Macintosh apparently offer creation time nowadays. I propose the following changes: 1. Add a "st_crtime" field which gets populated on filesystems (Windows, ZFS, Mac) which can do so. That is hopefully not too controversial and we could proceed to do so even if the next proposal gets bogged down: 2. Add a "st_unixctime" field which gets populated *only* by the unix ctime and never by any other value (even on Windows, where the unix ctime *is* available even though nobody cares about it), and deprecate the hopelessly ambiguous "st_ctime" field. You may be interested in http://allmydata.org/trac/tahoe/ticket/628 ("mtime" and "ctime": I don't think that word means what you think it means.) where the Allmydata-Tahoe project is carefully unpicking the mess we made for ourselves by confusing ctime with file-creation time. ---------- components: Library (Lib) messages: 85750 nosy: zooko severity: normal status: open title: ctime: I don't think that word means what you think it means. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 00:15:33 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 07 Apr 2009 22:15:33 +0000 Subject: [issue5696] test_telnetlib augmentation In-Reply-To: <1239135838.38.0.0898429359405.issue5696@psf.upfronthosting.co.za> Message-ID: <1afaf6160904071515l44092d8fwabd3a917b35eeab2@mail.gmail.com> Benjamin Peterson added the comment: 2009/4/7 Jack Diederich : > > Jack Diederich added the comment: > > committed some changes in r71377. ?This uses Queue.join() to [hopefully] > eliminate the race condidtions. Thanks! Works like a charm now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 00:23:55 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 07 Apr 2009 22:23:55 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1239143035.85.0.440066943086.issue4136@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Here's a half-baked patch against py3k. It resolves all the conflicts but still has 15 failing tests. Perhaps someone would like to finish it up. For example, json.dumps(b"hi") works, but not json.dumps([b"hi", "hi"]) ---------- Added file: http://bugs.python.org/file13647/json_py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 00:29:22 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 07 Apr 2009 22:29:22 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1239143362.42.0.999155711765.issue4136@psf.upfronthosting.co.za> Antoine Pitrou added the comment: There is the problem in the current py3k version of json. b"hi" can be serialized, but not [b"hi"]. >>> json.dumps(b"hi") '"hi"' >>> json.dumps([b"hi"]) Traceback (most recent call last): File "", line 1, in File "/home/antoine/py3k/__svn__/Lib/json/__init__.py", line 230, in dumps return _default_encoder.encode(obj) File "/home/antoine/py3k/__svn__/Lib/json/encoder.py", line 367, in encode chunks = list(self.iterencode(o)) File "/home/antoine/py3k/__svn__/Lib/json/encoder.py", line 306, in _iterencode for chunk in self._iterencode_list(o, markers): File "/home/antoine/py3k/__svn__/Lib/json/encoder.py", line 204, in _iterencode_list for chunk in self._iterencode(value, markers): File "/home/antoine/py3k/__svn__/Lib/json/encoder.py", line 317, in _iterencode for chunk in self._iterencode_default(o, markers): File "/home/antoine/py3k/__svn__/Lib/json/encoder.py", line 323, in _iterencode_default newobj = self.default(o) File "/home/antoine/py3k/__svn__/Lib/json/encoder.py", line 344, in default raise TypeError(repr(o) + " is not JSON serializable") TypeError: b'hi' is not JSON serializable ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 00:34:48 2009 From: report at bugs.python.org (Jack Diederich) Date: Tue, 07 Apr 2009 22:34:48 +0000 Subject: [issue5696] test_telnetlib augmentation In-Reply-To: <1238895962.87.0.497816781262.issue5696@psf.upfronthosting.co.za> Message-ID: <1239143688.79.0.113897133843.issue5696@psf.upfronthosting.co.za> Jack Diederich added the comment: except when it doesn't! Still failing on some buildbots. The couple places where it expects 1% wibble in timing is far too strict. I'm fixing it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 00:49:38 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 07 Apr 2009 22:49:38 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1239144578.51.0.631723070852.issue4136@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 00:52:39 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 07 Apr 2009 22:52:39 +0000 Subject: [issue2725] Handle ASDLSyntaxErrors gracefully In-Reply-To: <1209557288.23.0.65253319009.issue2725@psf.upfronthosting.co.za> Message-ID: <1239144759.15.0.271907705127.issue2725@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 00:54:54 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 07 Apr 2009 22:54:54 +0000 Subject: [issue5703] inside *currentmodule* some links is disabled In-Reply-To: <1238970240.42.0.00430283210892.issue5703@psf.upfronthosting.co.za> Message-ID: <1239144894.25.0.322994795639.issue5703@psf.upfronthosting.co.za> Georg Brandl added the comment: Since NonMultipart is in another module, it is not found automatically by unqualified name. This is working as expected. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 00:55:33 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 07 Apr 2009 22:55:33 +0000 Subject: [issue5706] setuptools doesn't honor standard compiler variables In-Reply-To: <1238992798.79.0.661202545175.issue5706@psf.upfronthosting.co.za> Message-ID: <1239144933.94.0.112814259035.issue5706@psf.upfronthosting.co.za> Georg Brandl added the comment: Is this about setuptools, or distutils? setuptools-specific bugs do not go in this tracker. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 00:58:08 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 07 Apr 2009 22:58:08 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1239145088.99.0.701651363085.issue4136@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Christian: 1) in py3k, loads and dumps always seem to operate on/produce str objects, but encode_basestring_ascii returns a bytes object. Why is that? 2) what is the use of the encoding argument in py3k? it looks completely ignored (bytes objects are not allowed as input and never produced as output) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 00:59:39 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 07 Apr 2009 22:59:39 +0000 Subject: [issue5708] Tiny code polishing to unicode_repeat In-Reply-To: <1239007305.41.0.910418406517.issue5708@psf.upfronthosting.co.za> Message-ID: <1239145179.9.0.811756302445.issue5708@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> georg.brandl nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 00:59:48 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 07 Apr 2009 22:59:48 +0000 Subject: [issue5704] Command line option '-3' should imply '-t' In-Reply-To: <1238970289.11.0.298374772869.issue5704@psf.upfronthosting.co.za> Message-ID: <1239145188.97.0.761400030544.issue5704@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> georg.brandl nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 01:13:40 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Tue, 07 Apr 2009 23:13:40 +0000 Subject: [issue2304] subprocess under windows fails to quote properly when shell=True In-Reply-To: <1205685138.96.0.183811169845.issue2304@psf.upfronthosting.co.za> Message-ID: <1239146020.3.0.44161224939.issue2304@psf.upfronthosting.co.za> Changes by Tennessee Leeuwenburg : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 01:56:45 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 07 Apr 2009 23:56:45 +0000 Subject: [issue5703] inside *currentmodule* some links is disabled In-Reply-To: <1238970240.42.0.00430283210892.issue5703@psf.upfronthosting.co.za> Message-ID: <1239148605.87.0.227160636913.issue5703@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Sorry, I shouldn't call this a bug. Rather I should use the word "proposal". I think a link to MIMENonMultipart is also useful. What I can imagine how to achieve this is... 1. Rewrite MIMENonMultipart to email.mime.MIMENonMultipart 2. Introduce something new directive to sphinx? Like :class: 3. When class is not found in current module, search in document global module. How do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 02:07:35 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 08 Apr 2009 00:07:35 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1239149255.25.0.224936094051.issue4136@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch: - fixes all failures - removes bytes input and output "support" (which didn't work but still involved a lot of code) To be done: - remove all traces of the encoding argument, and associated machinery ---------- Added file: http://bugs.python.org/file13648/json_py3k-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 02:56:03 2009 From: report at bugs.python.org (Steven Bethard) Date: Wed, 08 Apr 2009 00:56:03 +0000 Subject: [issue5311] bdist_msi generates version number for pure Python packages In-Reply-To: <1235016969.03.0.818386696301.issue5311@psf.upfronthosting.co.za> Message-ID: <1239152163.82.0.328454609565.issue5311@psf.upfronthosting.co.za> Changes by Steven Bethard : Removed file: http://bugs.python.org/file13536/PythonVersions.vbs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 02:56:41 2009 From: report at bugs.python.org (Steven Bethard) Date: Wed, 08 Apr 2009 00:56:41 +0000 Subject: [issue5311] bdist_msi generates version number for pure Python packages In-Reply-To: <1235016969.03.0.818386696301.issue5311@psf.upfronthosting.co.za> Message-ID: <1239152201.16.0.636886908257.issue5311@psf.upfronthosting.co.za> Steven Bethard added the comment: Ok, I've made some progress on this. The attached patch now generates MSIs which are version agnostic and look up the appropriate Python version in the registry. Some things still remaining to do: * The ProductName needs to be modified at runtime to prefix the "Python X.Y" for Add/Remove Programs (ARP). I have a custom action making the appropriate modifications, but this doesn't seem to affect the name in ARP. Not entirely sure what the problem is, but it seems I may only be setting the property on the client, and not on the server. I'll continue looking into this. * I need to thoroughly test that it does the right thing when a particular version of Python is required. The code should basically be there now to do that, but I haven't tested it at all. Probably I need to play around both with target_version and actually building an extension module. Speaking of tests, I have no idea how I would write a unittest for any of these things. To check some of them, it seems like you'd actually have to install the .msi onto a Windows machine. So at the moment, all my tests are by hand. Any better suggestions for testing these kinds of things would be greatly appreciated. ---------- keywords: +patch Added file: http://bugs.python.org/file13649/bdist_msi.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 03:09:45 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Wed, 08 Apr 2009 01:09:45 +0000 Subject: [issue3119] pickle.py is limited by python's call stack In-Reply-To: <1213589185.62.0.660916672679.issue3119@psf.upfronthosting.co.za> Message-ID: <1239152985.76.0.934745709808.issue3119@psf.upfronthosting.co.za> Tennessee Leeuwenburg added the comment: Aaron, Could you please upload another patch against the current trunk, then the issue could be flagged as requiring a patch review? Thanks, -Tennessee ---------- nosy: +tleeuwenburg at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 03:15:29 2009 From: report at bugs.python.org (A.M. Kuchling) Date: Wed, 08 Apr 2009 01:15:29 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1239153329.85.0.220935667301.issue2170@psf.upfronthosting.co.za> A.M. Kuchling added the comment: The new version of the code looks all right, so I think this patch can be applied. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 09:34:20 2009 From: report at bugs.python.org (Atsuo Ishimoto) Date: Wed, 08 Apr 2009 07:34:20 +0000 Subject: [issue1079] decode_header does not follow RFC 2047 In-Reply-To: <1188637019.25.0.0476259625696.issue1079@psf.upfronthosting.co.za> Message-ID: <1239176060.35.0.866390089266.issue1079@psf.upfronthosting.co.za> Atsuo Ishimoto added the comment: +1 for Tony's patch. This patch reverts fix for Issue1582282 filed by tkikuchi. I cannot understand the rationale for solution proposed in Issue1582282. How does the fix make easier to read mails from Entourage? ---------- nosy: +ishimoto, tkikuchi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 11:23:05 2009 From: report at bugs.python.org (Tim Golden) Date: Wed, 08 Apr 2009 09:23:05 +0000 Subject: [issue5721] msi.py still tries to copy non-existent test/README In-Reply-To: <1239182585.76.0.888462056491.issue5721@psf.upfronthosting.co.za> Message-ID: <1239182585.76.0.888462056491.issue5721@psf.upfronthosting.co.za> New submission from Tim Golden : tools/msi/msi.py is still trying to copy the README file from the lib/test directory. This file was removed in r70872. Patch attached against r71393 of msi.py. ---------- components: Build, Demos and Tools, Windows files: msi.r71393.patch keywords: patch messages: 85764 nosy: loewis, tim.golden severity: normal status: open title: msi.py still tries to copy non-existent test/README type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file13650/msi.r71393.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 12:18:05 2009 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 08 Apr 2009 10:18:05 +0000 Subject: [issue5717] os.defpath includes unix /bin on windows In-Reply-To: <1239116630.78.0.64068842306.issue5717@psf.upfronthosting.co.za> Message-ID: <1239185885.75.0.696242432214.issue5717@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- keywords: +patch Added file: http://bugs.python.org/file13651/issue5717.py25.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 12:49:04 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Wed, 08 Apr 2009 10:49:04 +0000 Subject: [issue5722] settimer / gettimer functionality on FreeBSD 6.3 (not 7.x) In-Reply-To: <1239187744.6.0.565034475162.issue5722@psf.upfronthosting.co.za> Message-ID: <1239187744.6.0.565034475162.issue5722@psf.upfronthosting.co.za> New submission from Tennessee Leeuwenburg : Tests fail on FreeBSD 6.3 http://www.python.org/dev/buildbot/trunk/x86%20FreeBSD%203%20trunk/build s/77/step-test/0 Relevant extract from parent issue, post by Guilherme Polo: ----------------------------------------------------------- Trent Nelson kindly gave me access to his FreeBSD 6.2 buildbot so I had chance to do some tests. The problem happens when Python is built against or libc_r, or if you are using libmap you won't need to recompile but the problem still happens when using libc_r. I started searching in the FreeBSD bug tracker and found this issue: http://www.freebsd.org/cgi/query-pr.cgi?pr=threads/49087 which seems very similar to the problem related here. I've also done a very simple "test" in C, just to demonstrate that this issue isn't related to Python at all: #include #include #include void h(int signo) { struct itimerval t; getitimer(ITIMER_PROF, &t); printf("%d %d\n", t.it_value.tv_sec, t.it_value.tv_usec); printf("deactive ITIMER_PROF\n"); t.it_value.tv_sec = 0; t.it_value.tv_usec = 0; setitimer(ITIMER_PROF, &t, &t); } int main(void) { struct itimerval ival; ival.it_value.tv_sec = 1; ival.it_value.tv_usec = 0; ival.it_interval.tv_sec = 1; ival.it_interval.tv_usec = 0; signal(SIGPROF, h); printf("%d\n", setitimer(ITIMER_PROF, &ival, NULL)); alarm(2); while (1) { getitimer(ITIMER_PROF, &ival); if (ival.it_value.tv_sec == 0 && ival.it_value.tv_usec == 0) break; } return 0; } When I compile this using -lc_r then the callback "h" is never called and then the alarm is fired. Compiling against pthread, thr or nothing (since this example doesn't need any threading library) doesn't demonstrate this problem and all is fine (callback "h" is invoked, infinite loop finishes and test returns 0). Should further discussion be moved to python-dev ? I'm somewhat stuck on how to resolve this, besides saying to upgrade to FreeBSD 7 which uses libthr by default. ---------- messages: 85765 nosy: tleeuwenburg at gmail.com severity: normal status: open title: settimer / gettimer functionality on FreeBSD 6.3 (not 7.x) type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 12:49:47 2009 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 08 Apr 2009 10:49:47 +0000 Subject: [issue5717] os.defpath includes unix /bin on windows In-Reply-To: <1239116630.78.0.64068842306.issue5717@psf.upfronthosting.co.za> Message-ID: <1239187787.18.0.434162325454.issue5717@psf.upfronthosting.co.za> anatoly techtonik added the comment: On the second try it was much easier. For py3k I saw a post about removing defpath and some of its friends, with which I partially agree. http://groups.google.com/group/comp.lang.python/browse_thread/thread/e8072370bfbef398/a0215b5820f76c0e ---------- Added file: http://bugs.python.org/file13652/issue5717.py26.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 12:50:06 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Wed, 08 Apr 2009 10:50:06 +0000 Subject: [issue5722] settimer / gettimer functionality on FreeBSD 6.3 (not 7.x) In-Reply-To: <1239187744.6.0.565034475162.issue5722@psf.upfronthosting.co.za> Message-ID: <1239187806.41.0.987061024488.issue5722@psf.upfronthosting.co.za> Tennessee Leeuwenburg added the comment: This issue is a follow-up to Issue 2240 (now closed). http://bugs.python.org/issue2240 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 12:50:46 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Wed, 08 Apr 2009 10:50:46 +0000 Subject: [issue2240] setitimer, getitimer wrapper In-Reply-To: <1204728133.7.0.556949621776.issue2240@psf.upfronthosting.co.za> Message-ID: <1239187846.93.0.720153129119.issue2240@psf.upfronthosting.co.za> Tennessee Leeuwenburg added the comment: Closing this issue as the main functionality is committed. See issue 5722 for follow-up regarding FreeBSD functionality. ---------- nosy: +tleeuwenburg at gmail.com status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 13:43:36 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Wed, 08 Apr 2009 11:43:36 +0000 Subject: [issue2706] datetime: define division timedelta/timedelta In-Reply-To: <1209330247.56.0.71148380164.issue2706@psf.upfronthosting.co.za> Message-ID: <1239191016.27.0.43108607264.issue2706@psf.upfronthosting.co.za> Changes by Tennessee Leeuwenburg : ---------- assignee: -> tleeuwenburg at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 15:59:41 2009 From: report at bugs.python.org (Andrew Gregory) Date: Wed, 08 Apr 2009 13:59:41 +0000 Subject: [issue5466] Tix.Balloon causes TCLError: unknown color name "{#ffff60}" in Python 2.6.1 In-Reply-To: <1236687460.92.0.36885933672.issue5466@psf.upfronthosting.co.za> Message-ID: <1239199181.25.0.663878762994.issue5466@psf.upfronthosting.co.za> Andrew Gregory added the comment: This has been fixed in the 2.6.2c1 release candidate. Thank you for updating Tix. Andrew. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 17:43:26 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 08 Apr 2009 15:43:26 +0000 Subject: [issue5723] Incomplete json tests In-Reply-To: <1239205406.15.0.353111609778.issue5723@psf.upfronthosting.co.za> Message-ID: <1239205406.15.0.353111609778.issue5723@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Looking at the tests it seems that the pure-Python paths of json are partly untested. In particular, py_make_scanner (as oppose to c_make_scanner). ---------- assignee: bob.ippolito components: Tests messages: 85770 nosy: benjamin.peterson, bob.ippolito, pitrou priority: high severity: normal stage: test needed status: open title: Incomplete json tests type: behavior versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 17:51:45 2009 From: report at bugs.python.org (Bob Ippolito) Date: Wed, 08 Apr 2009 15:51:45 +0000 Subject: [issue5723] Incomplete json tests In-Reply-To: <1239205406.15.0.353111609778.issue5723@psf.upfronthosting.co.za> Message-ID: <1239205905.04.0.140762298078.issue5723@psf.upfronthosting.co.za> Bob Ippolito added the comment: Is this high priority? The pure-Python code paths don't even run in cpython. I test them manually with simplejson by just deleting the extension and then running the tests again. There doesn't seem to be a very good way to do this sort of thing ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 18:01:36 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 08 Apr 2009 16:01:36 +0000 Subject: [issue5723] Incomplete json tests In-Reply-To: <1239205905.04.0.140762298078.issue5723@psf.upfronthosting.co.za> Message-ID: <1239206585.8071.5.camel@fsol> Antoine Pitrou added the comment: > Is this high priority? The pure-Python code paths don't even run in > cpython. I test them manually with simplejson by just deleting the > extension and then running the tests again. There doesn't seem to be a > very good way to do this sort of thing The main reason I've put it as "high priority" is that right now I'm porting the new json to py3k, and I can't know whether the pure Python paths are ported correctly. That probably won't refrain us from committing it, especially if you say that they are never run with CPython. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Walter_D=C3=B6rwald_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Wed Apr 8 18:04:47 2009 From: =?utf-8?q?Walter_D=C3=B6rwald_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Walter_D=C3=B6rwald_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Wed, 08 Apr 2009 16:04:47 +0000 Subject: [issue5723] Incomplete json tests In-Reply-To: <1239205406.15.0.353111609778.issue5723@psf.upfronthosting.co.za> Message-ID: <1239206687.98.0.133036637147.issue5723@psf.upfronthosting.co.za> Walter D?rwald added the comment: test_quopri has a decorator that calls a test using both the C and Python version of the tested function. This decorator looks like this: def withpythonimplementation(testfunc): def newtest(self): # Test default implementation testfunc(self) # Test Python implementation if quopri.b2a_qp is not None or quopri.a2b_qp is not None: oldencode = quopri.b2a_qp olddecode = quopri.a2b_qp try: quopri.b2a_qp = None quopri.a2b_qp = None testfunc(self) finally: quopri.b2a_qp = oldencode quopri.a2b_qp = olddecode newtest.__name__ = testfunc.__name__ return newtest Adding such a decorator to every test method might solve the problem. ---------- nosy: +doerwalter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 18:07:55 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 08 Apr 2009 16:07:55 +0000 Subject: [issue5723] Incomplete json tests In-Reply-To: <1239205406.15.0.353111609778.issue5723@psf.upfronthosting.co.za> Message-ID: <1239206875.56.0.592310597594.issue5723@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It is a priority because we need solid test coverage in order to successfully port 2.7 to 3.1 without breaking code or changing semantics. The original 3.0 port was done badly. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 18:08:13 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 08 Apr 2009 16:08:13 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1239206893.57.0.215613091633.issue4136@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is an updated patch, completely removing the `encoding` parameter and fixing docs. ---------- Added file: http://bugs.python.org/file13653/json_py3k-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 18:12:10 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 08 Apr 2009 16:12:10 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1239207130.82.0.90754778181.issue4136@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (by the way, all tests pass) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 18:14:26 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 08 Apr 2009 16:14:26 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1239207266.17.0.362031624888.issue4136@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It would be better to have a patch that diff's from the current 2.7 version than to start with the 3.0 version; otherwise, the two will never be fully synchronized and some of the choices made in 2.6-to-3.0 will live on forever. The 2.7 version reflects more patch review and real world usage (from simplejson) than the relatively unexercised 3.0 version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 18:31:00 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 08 Apr 2009 16:31:00 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1239207266.17.0.362031624888.issue4136@psf.upfronthosting.co.za> Message-ID: <1239208350.8071.6.camel@fsol> Antoine Pitrou added the comment: > It would be better to have a patch that diff's from the current 2.7 > version than to start with the 3.0 version; otherwise, the two will > never be fully synchronized and some of the choices made in 2.6-to-3.0 > will live on forever. How am I supposed to produce this patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 18:37:30 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 08 Apr 2009 16:37:30 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1239208650.65.0.995369348784.issue4136@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The idea is to ignore the current 3.0 version and just redo the 2-to-3 conversion from 2.7 and do it well this time. Compute the 3.1 patch as if the current 3.0 version was blown away (reverted). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 19:28:07 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Wed, 08 Apr 2009 17:28:07 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1239211687.45.0.790231396471.issue3873@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Victor, Unpickler shouldn't raise an error if the given file object does support seek(); it should gracefully fall back to using only read() and readline(). Also, I think you could get a greater performance improvement by using peek() and avoiding backward seeks. As far as I know, a backward seek may invalidate the internal buffer of the file object, thus forcing a read from disk. Incidentally, I think it would be nice to add to Python 3 some kind of file protocol as this would provide a way to mitigate the function call overhead for I/O operations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 20:16:37 2009 From: report at bugs.python.org (Christian Heimes) Date: Wed, 08 Apr 2009 18:16:37 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1239214597.55.0.72411135624.issue4136@psf.upfronthosting.co.za> Christian Heimes added the comment: +1 for Raymond's suggestion The 3.0 version of json was more like a last minute patch work than thorough work. You might wanna svn rm the 3.0 code, svn cp the 2.7 code to the py3k branch and start all over. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Wed Apr 8 20:16:39 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Wed, 08 Apr 2009 18:16:39 +0000 Subject: [issue5721] msi.py still tries to copy non-existent test/README In-Reply-To: <1239182585.76.0.888462056491.issue5721@psf.upfronthosting.co.za> Message-ID: <1239214599.41.0.630807324398.issue5721@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- assignee: -> loewis priority: -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 20:37:24 2009 From: report at bugs.python.org (Matthew Barnett) Date: Wed, 08 Apr 2009 18:37:24 +0000 Subject: [issue1744752] Newline skipped in "for line in file" Message-ID: <1239215844.26.0.571931388172.issue1744752@psf.upfronthosting.co.za> Matthew Barnett added the comment: What do you mean "towards the end of the file"? What are the offsets of the two lines? (I'm thinking it might be something to do with the \r\n lying across a boundary, such as the 4GB boundary.) ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 20:55:54 2009 From: report at bugs.python.org (Collin Winter) Date: Wed, 08 Apr 2009 18:55:54 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1239216954.63.0.539467835245.issue5665@psf.upfronthosting.co.za> Collin Winter added the comment: If no-one has any objections to the xpickle resource included in the latest version of the patch, I'd like to commit this soon so that we can be more confident in the other changes I have queued up. If I no-one objects, I'll commit this sometime early tomorrow morning PDT. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 23:28:14 2009 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 08 Apr 2009 21:28:14 +0000 Subject: [issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10 In-Reply-To: <1239226094.42.0.345959405343.issue5724@psf.upfronthosting.co.za> Message-ID: <1239226094.42.0.345959405343.issue5724@psf.upfronthosting.co.za> New submission from Skip Montanaro : I configured and built Python 2.6.2c1 on Solaris 10 using gcc 4.2. All tests pass except cmath: % LD_LIBRARY_PATH=. ./python Lib/test/regrtest.py -v test_cmath test_cmath test_abs (test.test_cmath.CMathTests) ... ok test_cmath_matches_math (test.test_cmath.CMathTests) ... ok test_constants (test.test_cmath.CMathTests) ... ok test_input_type (test.test_cmath.CMathTests) ... ok test_isinf (test.test_cmath.CMathTests) ... ok test_isnan (test.test_cmath.CMathTests) ... ok test_phase (test.test_cmath.CMathTests) ... ok test_polar (test.test_cmath.CMathTests) ... ok test_rect (test.test_cmath.CMathTests) ... ok test_specific_values (test.test_cmath.CMathTests) ... FAIL test_user_object (test.test_cmath.CMathTests) ... ok ====================================================================== FAIL: test_specific_values (test.test_cmath.CMathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tuba/skipm/src/Python-2.6.2c1/Lib/test/test_cmath.py", line 338, in test_specific_values self.fail('OverflowError not raised in test %s' % test_str) AssertionError: OverflowError not raised in test exp0052: exp(complex(710.0, 1.5)) ---------------------------------------------------------------------- Ran 11 tests in 0.048s FAILED (failures=1) test test_cmath failed -- Traceback (most recent call last): File "/home/tuba/skipm/src/Python-2.6.2c1/Lib/test/test_cmath.py", line 338, in test_specific_values self.fail('OverflowError not raised in test %s' % test_str) AssertionError: OverflowError not raised in test exp0052: exp(complex(710.0, 1.5)) 1 test failed: test_cmath Since we are so close to release I'm assigning it to Barry, though Mark Dickinson is probably the best person to look at this problem. I think this is a long-standing Solaris/cmath issue. I'm sorry Mark and I didn't connect long enough at PyCon to dig into this. It may not be serious enough to hold up a final release, but I wanted to mention the problem so it's recognized. ---------- assignee: barry components: Tests messages: 85784 nosy: barry, skip.montanaro severity: normal status: open title: 2.6.2c1 fails to pass test_cmath on Solaris10 type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 23:28:34 2009 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 08 Apr 2009 21:28:34 +0000 Subject: [issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10 In-Reply-To: <1239226094.42.0.345959405343.issue5724@psf.upfronthosting.co.za> Message-ID: <1239226114.67.0.881332776132.issue5724@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 8 23:40:25 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 08 Apr 2009 21:40:25 +0000 Subject: [issue1590] "make altinstall" installs pydoc, idle, smtpd.py In-Reply-To: <1197388115.32.0.880215268876.issue1590@psf.upfronthosting.co.za> Message-ID: <1239226825.15.0.0110512000472.issue1590@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Refixed in r71400. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 00:41:24 2009 From: report at bugs.python.org (Aaron Gallagher) Date: Wed, 08 Apr 2009 22:41:24 +0000 Subject: [issue3119] pickle.py is limited by python's call stack In-Reply-To: <1213589185.62.0.660916672679.issue3119@psf.upfronthosting.co.za> Message-ID: <1239230483.95.0.726454779372.issue3119@psf.upfronthosting.co.za> Aaron Gallagher added the comment: Okay, here's a new version for the py3k trunk. I'm assuming that this is not going to make it into 2.x at all, because of the API changes. This patch only touches the python version of the code and adds a unit test for testing whether pickle works with arbitrary nesting depth in test.pickletest. The test is disabled for the C pickle tests currently, since it causes python to run out of stack space and crash. So, does _pickle.Pickler's API need to be changed as well? Right now, pickle._Pickler.dump expects save (and save expects the other save_* methods) to either return None or an iterable, where the iterable yields either None or further iterables. I'm sure it wouldn't be hard to make _pickle.Pickler.dump work the same way, but since C doesn't have generators, I don't know how exactly the API would translate. ---------- versions: +Python 3.1 -Python 2.6, Python 3.0 Added file: http://bugs.python.org/file13654/pickle3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 01:12:42 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 08 Apr 2009 23:12:42 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1239216954.63.0.539467835245.issue5665@psf.upfronthosting.co.za> Message-ID: <1239232450.7169.0.camel@fsol> Antoine Pitrou added the comment: > If no-one has any objections to the xpickle resource included in the > latest version of the patch, I'd like to commit this soon so that we can > be more confident in the other changes I have queued up. If I no-one > objects, I'll commit this sometime early tomorrow morning PDT. Ok if it doesn't take too long to run the tests (which may imply implementing something like Raymond's suggestion of randomizing test order, if you haven't already done so). Thanks for your work, cheers Antoine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 02:06:29 2009 From: report at bugs.python.org (Collin Winter) Date: Thu, 09 Apr 2009 00:06:29 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1239235589.44.0.234682517992.issue5665@psf.upfronthosting.co.za> Collin Winter added the comment: > Ok if it doesn't take too long to run the tests (which may imply > implementing something like Raymond's suggestion of randomizing test > order, if you haven't already done so). I did something similar: if you don't pass the -uxpickle flag to regrtest, only a small subset of the tests will be run, which takes less than half a second on my machine; if you do pass -uxpickle, the full battery of tests will run, which takes ~5 minutes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 03:57:27 2009 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 09 Apr 2009 01:57:27 +0000 Subject: [issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10 In-Reply-To: <1239226094.42.0.345959405343.issue5724@psf.upfronthosting.co.za> Message-ID: <1239242247.84.0.0452509454036.issue5724@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'll mark this as a release blocker for 2.6.2 for now, until Mark weighs in. ---------- priority: -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 05:12:12 2009 From: report at bugs.python.org (Andy Sk) Date: Thu, 09 Apr 2009 03:12:12 +0000 Subject: [issue3924] cookielib chokes on non-integer cookie version, should ignore it instead In-Reply-To: <1222021824.75.0.209543556591.issue3924@psf.upfronthosting.co.za> Message-ID: <1239246732.93.0.719691441345.issue3924@psf.upfronthosting.co.za> Andy Sk added the comment: Thank you Henrik. The workaround in the first comment caused some cookies to be handled incorrectly due to ignoring version on all cookies, but your workaround is nice. It seems that the patch jjlee supplied should really be applied, however, to save others from having this problem. ---------- nosy: +andysk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 07:21:01 2009 From: report at bugs.python.org (jvdias) Date: Thu, 09 Apr 2009 05:21:01 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <1239254455.57.0.547868960031.issue5725@psf.upfronthosting.co.za> Message-ID: <1239254455.57.0.547868960031.issue5725@psf.upfronthosting.co.za> New submission from jvdias : Please could we have an API in the Python Core for PROCESS as opposed to THREAD Semaphores , to enable facilities such as I have done in the attached example "psempy.so" compiled "C" python module. ie. I'd like to be able to : ' import sys.semget sys.semop sys.semctl ' Because of being un-able to do this, the attached "psem.*" module provides a workaround for my application. Should I expand this into a Python Add-On or will full support for SysV PROCESS Semaphores be coming to Python core soon ? ---------- files: psempy.c messages: 85791 nosy: jvdias severity: normal status: open title: process SysV-Semaphore support type: feature request Added file: http://bugs.python.org/file13655/psempy.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 08:22:09 2009 From: report at bugs.python.org (jvdias) Date: Thu, 09 Apr 2009 06:22:09 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <1239254455.57.0.547868960031.issue5725@psf.upfronthosting.co.za> Message-ID: <1239258129.57.0.360132834791.issue5725@psf.upfronthosting.co.za> jvdias added the comment: To Build: $ gcc -fPIC -shared -o psempy.c psempy.so -I/usr/include/python2.6 -L/usr/lib/python2.6 -lpython2.6 && mv psempy.so psem.so $ dd if=/dev/urandom of=app1_20090407.01.log bs=1000000 count=1 $ python >>> import sys, os, re, datetime, psem, psem_example >>> psem_example.compress_log( "app1", "2009", "04", "07", "01", "bzip", "app1_20090407.01.log"); 0 Example psem.so using program that compresses logs named *{YEAR}-${MONTH}-${DAY}* in a psem.* based parallel for . On a 32 2Ghz processor SPARC, the time taken to compress 32 1MB files using the psem parallel-for (for 32 CPUs) was really of the order of the time taken to compress 1 1MB file - ie. roughly 1/32nd of the time taken to compress 32 files serially . The number of processes was made secure and "run-away" safe ONLY because direct access was available to the semop(2), semget(2), and semctl(2) system calls. Please can Python put this API into sys or I will create a Python add-on module to do so - let me know whether this is a good idea or not - thank you, Jason. ---------- Added file: http://bugs.python.org/file13656/psem_example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 08:37:28 2009 From: report at bugs.python.org (jvdias) Date: Thu, 09 Apr 2009 06:37:28 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <1239254455.57.0.547868960031.issue5725@psf.upfronthosting.co.za> Message-ID: <1239259048.58.0.644916463618.issue5725@psf.upfronthosting.co.za> Changes by jvdias : Removed file: http://bugs.python.org/file13656/psem_example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 08:43:11 2009 From: report at bugs.python.org (jvdias) Date: Thu, 09 Apr 2009 06:43:11 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <1239254455.57.0.547868960031.issue5725@psf.upfronthosting.co.za> Message-ID: <1239259391.17.0.587935519406.issue5725@psf.upfronthosting.co.za> jvdias added the comment: Example Python use of psem.so Parallel ForEach : Log Compressor Usage: $ gcc -o psem.so -fPIC -shared psempy.c -I/usr/include/python2.6 -L/usr/lib/python2.6 -lpython2.6 $ dd if=/dev/urandom bs=1000000 count=1 of=app1_20090407.01.log $ python Python 2.6 (r26:66714, Oct 16 2008, 00:21:12) [GCC 4.2.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys, os, re, datetime, psem, psem_example >>> psem_example.compress_log( "app1", "2009", "04", "07", "01", "bzip", "app2_20090407.02.log"); 0 >>> quit Use quit() or Ctrl-D (i.e. EOF) to exit >>> Now, one can time for example 16 runs of the above command with 16 different input files, and on a 16 CPU machine one would expect the elapsed time between start and finish to be of the order of 1/16th of the time taken to compress all of the 16 files sequentially. ---------- Added file: http://bugs.python.org/file13657/psem_example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 09:19:33 2009 From: report at bugs.python.org (Julian Scheid) Date: Thu, 09 Apr 2009 07:19:33 +0000 Subject: [issue3646] MacOS X framework install to non-standard directory fails In-Reply-To: <1219392826.4.0.166247537114.issue3646@psf.upfronthosting.co.za> Message-ID: <1239261573.53.0.00745864799862.issue3646@psf.upfronthosting.co.za> Julian Scheid added the comment: The same issue is present in 2.4 and 2.5 as well as 3.0 so I'm updating this issue accordingly (haven't tried 2.7 or 3.1). I've been working around this issue with some success and will be posting patches shortly. ---------- nosy: +julians37 versions: +Python 2.4, Python 2.5, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 09:32:06 2009 From: report at bugs.python.org (jvdias) Date: Thu, 09 Apr 2009 07:32:06 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <1239254455.57.0.547868960031.issue5725@psf.upfronthosting.co.za> Message-ID: <1239262326.2.0.076751170362.issue5725@psf.upfronthosting.co.za> jvdias added the comment: $ time /usr/bin/python2.6 ./psem_example.py 2>&1 | tee log Do you really want to run test using 16 1MB log files ? Y/Ny generating files 0..15 generating file 0 generating file 1 generating file 2 generating file 3 generating file 4 generating file 5 1+0 records in 1+0 records out 1000000 bytes (1.0 MB) copied, 0.783862 s, 1.3 MB/s 1+0 records in 1+0 records out 1000000 bytes (1.0 MB) copied, 0.890675 s, 1.1 MB/s 1+0 records in 1+0 records out 1000000 bytes (1.0 MB) copied, 0.831693 s, 1.2 MB/s 1+0 records in 1+0 records out 1000000 bytes (1.0 MB) copied, 0.84914 s, 1.2 MB/s 1+0 records in 1+0 records out 1000000 bytes (1.0 MB) copied, 0.885601 s, 1.1 MB/s generating file 6 generating file 7 1+0 records in 1+0 records out 1000000 bytes (1.0 MB) copied, 0.942455 s, 1.1 MB/s 1+0 records in 1+0 records out 1000000 bytes (1.0 MB) copied, 0.282143 s, 3.5 MB/s generating file 8 generating file 9 1+0 records in 1+0 records out 1000000 bytes (1.0 MB) copied, 0.41776 s, 2.4 MB/s 1+0 records in 1+0 records out 1000000 bytes (1.0 MB) copied, 0.292488 s, 3.4 MB/s generating file 10 generating file 11 1+0 records in 1+0 records out 1000000 bytes (1.0 MB) copied, 0.396643 s, 2.5 MB/s 1+0 records in 1+0 records out 1000000 bytes (1.0 MB) copied, 0.2736 s, 3.7 MB/s 1+0 records in 1+0 records out 1000000 bytes (1.0 MB) copied, 0.316026 s, 3.2 MB/s generating file 12 generating file 13 generating file 14 1+0 records in 1+0 records out 1000000 bytes (1.0 MB) copied, 0.349368 s, 2.9 MB/s 1+0 records in 1+0 records out 1000000 bytes (1.0 MB) copied, 0.364177 s, 2.7 MB/s generating file 15 compressing files 0..15 compressing file 0 1+0 records in 1+0 records out 1000000 bytes (1.0 MB) copied, 0.495831 s, 2.0 MB/s 1+0 records in 1+0 records out 1000000 bytes (1.0 MB) copied, 0.229301 s, 4.4 MB/s compressing file 1 compressing file 2 compressing file 3 compressing file 4 compressing file 5 compressing file 6 compressing file 7 compressing file 8 compressing file 9 compressing file 10 compressing file 11 compressing file 12 compressing file 13 compressing file 14 compressing file 15 real 0m10.700s user 0m7.987s sys 0m5.130s ---------- Added file: http://bugs.python.org/file13658/psem_example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 09:45:02 2009 From: report at bugs.python.org (Julian Scheid) Date: Thu, 09 Apr 2009 07:45:02 +0000 Subject: [issue3646] MacOS X framework install to non-standard directory fails In-Reply-To: <1219392826.4.0.166247537114.issue3646@psf.upfronthosting.co.za> Message-ID: <1239263102.8.0.0861594897576.issue3646@psf.upfronthosting.co.za> Julian Scheid added the comment: Actually this seems to be fixed in 3.0.1 - yay! ---------- versions: -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 10:26:04 2009 From: report at bugs.python.org (Julian Scheid) Date: Thu, 09 Apr 2009 08:26:04 +0000 Subject: [issue3646] MacOS X framework install to non-standard directory fails In-Reply-To: <1219392826.4.0.166247537114.issue3646@psf.upfronthosting.co.za> Message-ID: <1239265564.43.0.296779920819.issue3646@psf.upfronthosting.co.za> Julian Scheid added the comment: Attached a fix for release26-maint branch. I've tested this as follows: ./configure --enable-toolbox-glue --enable-universalsdk --enable-framework=/tmp/python-2.6-maint-install/Library/Framework --prefix=/tmp/python-2.6-maint-install && make -j3 && make frameworkinstall I have not tested this with the default install paths. Patches for 2.5 and 2.4 coming up. ---------- keywords: +patch Added file: http://bugs.python.org/file13659/Python-2.6-maint-osx-framework-path.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 10:37:00 2009 From: report at bugs.python.org (Larry Hastings) Date: Thu, 09 Apr 2009 08:37:00 +0000 Subject: [issue5676] shutils test fails on ZFS (on FUSE, on Linux) In-Reply-To: <1238719617.07.0.390323030603.issue5676@psf.upfronthosting.co.za> Message-ID: <1239266220.34.0.315690768363.issue5676@psf.upfronthosting.co.za> Larry Hastings added the comment: The analysis I wrote on 2009/4/6 is correct, but I just discovered another important detail: it only happens on my ZFS partition. I'm using ZFS on Linux, via FUSE. No wonder I'm the only person it's happening to! I don't know whether it's because of FUSE or because of ZFS; if it's because of ZFS, then more people will see this once the next rev of OS X hits the streets. To reproduce: % mkdir foo % touch foo/a % chmod 400 foo % python -c 'import os ; print(os.listdir("foo"))' On my ext4 root partition this works, printing ['a'] On my ZFS home partition this fails, printing Traceback (most recent call last): File "", line 1, in OSError: [Errno 13] Permission denied: 'foo' I observe this behavior in Python 2.6.1 and in py3k/trunk. The attached patch fixes test_shutil so it passes on both partitions. The fix: allow the first failure to be *either* os.listdir (in which case arg must be TESTFN) or os.remove (in which case arg must be self.childpath). Patch was written against r71404. ---------- title: Fix "make clean" in py3k/trunk -> shutils test fails on ZFS (on FUSE, on Linux) versions: +Python 2.6 Added file: http://bugs.python.org/file13660/lch.test_shutil.r71404.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 10:38:14 2009 From: report at bugs.python.org (Larry Hastings) Date: Thu, 09 Apr 2009 08:38:14 +0000 Subject: [issue5676] shutils test fails on ZFS (on FUSE, on Linux) In-Reply-To: <1238719617.07.0.390323030603.issue5676@psf.upfronthosting.co.za> Message-ID: <1239266294.0.0.429376588982.issue5676@psf.upfronthosting.co.za> Larry Hastings added the comment: I should be more specific: patch was written against py3k/trunk r71404. Though I imagine a very similar patch could be written for 2.7 (or 2.6 if appropriate). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 10:39:47 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 09 Apr 2009 08:39:47 +0000 Subject: [issue3646] MacOS X framework install to non-standard directory fails In-Reply-To: <1219392826.4.0.166247537114.issue3646@psf.upfronthosting.co.za> Message-ID: <1239266387.74.0.732545290211.issue3646@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Julian: patches for 2.4 and 2.5 will not be accepted, both releases are in "critical security fixes only" mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 10:43:53 2009 From: report at bugs.python.org (Julian Scheid) Date: Thu, 09 Apr 2009 08:43:53 +0000 Subject: [issue3646] MacOS X framework install to non-standard directory fails In-Reply-To: <1219392826.4.0.166247537114.issue3646@psf.upfronthosting.co.za> Message-ID: <1239266633.06.0.21906026705.issue3646@psf.upfronthosting.co.za> Julian Scheid added the comment: I had a hunch that might be the case. I'm still planning to upload them here for the benefit of others who, like me, have to maintain those versions as framework installs. Is that OK? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 11:00:34 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 09 Apr 2009 09:00:34 +0000 Subject: [issue3646] MacOS X framework install to non-standard directory fails In-Reply-To: <1219392826.4.0.166247537114.issue3646@psf.upfronthosting.co.za> Message-ID: <1239267634.41.0.59933832923.issue3646@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Uploading a patch is fine, my comment was just a warning that your patch won't be applied in the repository (at least not for 2.4 and 2.5). I will look at your patch for 2.6 in the near future. Are you sure that the issue is fixed in 3.x? AFAIK that would be completely accidental, I'm pretty sure I haven't changed anything that would affect this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 11:12:31 2009 From: report at bugs.python.org (Julian Scheid) Date: Thu, 09 Apr 2009 09:12:31 +0000 Subject: [issue3646] MacOS X framework install to non-standard directory fails In-Reply-To: <1219392826.4.0.166247537114.issue3646@psf.upfronthosting.co.za> Message-ID: <1239268351.69.0.983819575072.issue3646@psf.upfronthosting.co.za> Julian Scheid added the comment: I was a bit surprised myself but I've just double-checked and it seems to work fine. I started with a freshly unpacked 3.0.1 tarball and used the following command: ./configure --enable-toolbox-glue --enable-universalsdk --enable-framework=/tmp/python-3.0.1-install/Library/Framework --prefix=/tmp/python-3.0.1-install && make -j3 && make fullinstall That went through OK, everything seems to be in its place and the interpreter starts up. I was testing with "make frameworkinstall" earlier, that worked, too. One question, $PREFIX/bin doesn't have the files without version number (e.g. it has python3.0 but doesn't have python) even in fullinstall mode. Is that intentional? (The framework's bin directory does have all files.) I've seen the same issue in 2.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 11:33:44 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 09 Apr 2009 09:33:44 +0000 Subject: [issue3646] MacOS X framework install to non-standard directory fails In-Reply-To: <1219392826.4.0.166247537114.issue3646@psf.upfronthosting.co.za> Message-ID: <1239269624.53.0.465622430024.issue3646@psf.upfronthosting.co.za> Ronald Oussoren added the comment: For 3.1 I need to check if the right files get install into the various 'bin' directories. At the languages summit at PyCon'09 the consensus seemed to be that the command-line interpreter for Python 3.x should be "python3" and that "python" would always refer to a Python 2.x interpreter. I haven't updated the Mac Makefiles for that yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 11:40:51 2009 From: report at bugs.python.org (Julian Scheid) Date: Thu, 09 Apr 2009 09:40:51 +0000 Subject: [issue3646] MacOS X framework install to non-standard directory fails In-Reply-To: <1219392826.4.0.166247537114.issue3646@psf.upfronthosting.co.za> Message-ID: <1239270051.5.0.31584277175.issue3646@psf.upfronthosting.co.za> Julian Scheid added the comment: Ah, that makes sense - thanks for clarifying. And I was mistaken about 2.6, the no-suffix symlinks are there in $PREFIX/bin so all is good. Let me know what you think of the patch when you get a chance to look at it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 11:49:32 2009 From: report at bugs.python.org (Julian Scheid) Date: Thu, 09 Apr 2009 09:49:32 +0000 Subject: [issue3646] MacOS X framework install to non-standard directory fails In-Reply-To: <1219392826.4.0.166247537114.issue3646@psf.upfronthosting.co.za> Message-ID: <1239270572.36.0.630919131344.issue3646@psf.upfronthosting.co.za> Julian Scheid added the comment: On second thought, are you sure that's how fullinstall is meant to work? If I use frameworkinstall I get the following message at the end: * Note: not installed as 'python'. * Use 'make fullinstall' to install as 'python'. * However, 'make fullinstall' is discouraged, * as it will clobber your Python 2.x installation. Doesn't that suggest that fullinstall would put the no-suffix symlinks in place? In other words, is there a reason that no-suffix links _are_ installed in the framework bin directory in fullinstall mode, but aren't installed in $PREFIX/bin? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 11:54:44 2009 From: report at bugs.python.org (Floris Bruynooghe) Date: Thu, 09 Apr 2009 09:54:44 +0000 Subject: [issue5726] ld_so_aix does exit successfully even in case of failure In-Reply-To: <1239270884.66.0.724599515484.issue5726@psf.upfronthosting.co.za> Message-ID: <1239270884.66.0.724599515484.issue5726@psf.upfronthosting.co.za> New submission from Floris Bruynooghe : ld_so_aix is used to invoke the linker correctly on AIX. However when the linking fails the script happily returns 0 and a Makefile using it will assume all went well. See the trivial patch attached. ---------- components: Build files: ld_so_aix.diff keywords: patch messages: 85807 nosy: flub severity: normal status: open title: ld_so_aix does exit successfully even in case of failure type: compile error versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13661/ld_so_aix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 13:25:06 2009 From: report at bugs.python.org (Wolfgang Schnerring) Date: Thu, 09 Apr 2009 11:25:06 +0000 Subject: [issue5727] doctest pdb readline broken In-Reply-To: <1239276305.19.0.526867750163.issue5727@psf.upfronthosting.co.za> Message-ID: <1239276305.19.0.526867750163.issue5727@psf.upfronthosting.co.za> New submission from Wolfgang Schnerring : When pdb is called from inside a doctest under python2.5, the readline keys do not work anymore -- like they did just fine in 2.4. Steps to reproduce: 1. Create two files, foo.txt and foo.py, like so: $ cat > foo.txt >>> import pdb; pdb.set_trace() $ cat > foo.py import doctest; doctest.testfile('foo.txt') 2. run it $ python2.5 foo.py 3. If I now press Ctrl-P, I get "^P" printed on the prompt, instead of going back in the readline history. Likewise, the arrow keys print escape sequences instead of moving the cursor. ---------- components: Library (Lib) messages: 85808 nosy: wosc severity: normal status: open title: doctest pdb readline broken type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 13:27:52 2009 From: report at bugs.python.org (jvdias) Date: Thu, 09 Apr 2009 11:27:52 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <1239254455.57.0.547868960031.issue5725@psf.upfronthosting.co.za> Message-ID: <1239276472.59.0.551552361275.issue5725@psf.upfronthosting.co.za> jvdias added the comment: I suggest a new sys SysV-semaphore API : sys.semget( sem_key, sem_nsems, sem_flags) sys.SEM_KEY_ANY = 0 sys.SEM_UNDO = 0x1000 /*chain of atomic kernel UNDO operations*/ sys.SEM_GETPID = 11 /* get sempid */ sys.SEM_GETVAL = 12 /* get semval */ sys.SEM_GETALL = 13 /* get all semval's */ sys.SEM_GETNCNT = 14 /* get semncnt */ sys.SEM_GETZCNT = 15 /* get semzcnt */ sys.SEM_SETVAL = 16 /* set semval */ sys.SEM_SETALL = 17 /* set all semval's */ #if ( ! defined(__sun__) ) || defined ( __GNU__ ) sys.SEM_STAT = 18 sys.SEM_INFO = 19 #endif sys.semop(semid, sops, nsops) sys.semtimedop(semid, sops, nsops, timeout ) sys.semctl(semid, semnum, cmd, ...); ---------- versions: +Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 13:36:06 2009 From: report at bugs.python.org (jvdias) Date: Thu, 09 Apr 2009 11:36:06 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <1239254455.57.0.547868960031.issue5725@psf.upfronthosting.co.za> Message-ID: <1239276966.96.0.240176721261.issue5725@psf.upfronthosting.co.za> jvdias added the comment: PS: Timings for x86{-32,-64} or ia{32,64} architectures are likely to show a significantly smaller speedup because they truly are MIMD CISC pipeline machines ( the multiple-core feature and IA64 "instruction triplet groups" mean they are more optimized for "hyperthreading" WITHIN the same process. Please remember that Python must also be capable of taking advantage of SIMD parallelism also on architectures such as the SPARC where often fork()-ing a new process is vastly more efficient than creating a new LWP with true shared memory . On the amd64 machines, also, which do not have such a huge microcode overhead headache such as on IA64 machines, running multiple processes instead of multiple threads can often be more efficient. But on ia64 and of course single-processor machines of all types there is no improvement to be found in running multiple processes and running multiple threads is greatly to be preferred . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 13:48:35 2009 From: report at bugs.python.org (jvdias) Date: Thu, 09 Apr 2009 11:48:35 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <1239254455.57.0.547868960031.issue5725@psf.upfronthosting.co.za> Message-ID: <1239277715.88.0.341595575135.issue5725@psf.upfronthosting.co.za> jvdias added the comment: C source code implementing "psem.*" python module functions ---------- Added file: http://bugs.python.org/file13662/psempy.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 13:48:47 2009 From: report at bugs.python.org (jvdias) Date: Thu, 09 Apr 2009 11:48:47 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <1239254455.57.0.547868960031.issue5725@psf.upfronthosting.co.za> Message-ID: <1239277727.62.0.379194254096.issue5725@psf.upfronthosting.co.za> Changes by jvdias : Removed file: http://bugs.python.org/file13655/psempy.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 13:49:53 2009 From: report at bugs.python.org (jvdias) Date: Thu, 09 Apr 2009 11:49:53 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <1239254455.57.0.547868960031.issue5725@psf.upfronthosting.co.za> Message-ID: <1239277793.38.0.440809624833.issue5725@psf.upfronthosting.co.za> Changes by jvdias : Removed file: http://bugs.python.org/file13657/psem_example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 13:53:46 2009 From: report at bugs.python.org (jvdias) Date: Thu, 09 Apr 2009 11:53:46 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <1239254455.57.0.547868960031.issue5725@psf.upfronthosting.co.za> Message-ID: <1239278026.46.0.863904436681.issue5725@psf.upfronthosting.co.za> Changes by jvdias : ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 14:15:24 2009 From: report at bugs.python.org (Robert Collins) Date: Thu, 09 Apr 2009 12:15:24 +0000 Subject: [issue5728] Support telling TestResult objects a test run has finished In-Reply-To: <1239279324.74.0.826216289254.issue5728@psf.upfronthosting.co.za> Message-ID: <1239279324.74.0.826216289254.issue5728@psf.upfronthosting.co.za> New submission from Robert Collins : Original mail: JML's testtools has a TestResult subclass with a done() method. The reason for this method is to allow doing things after the last test has run. While a result can infer 'first test' it can't infer 'last test' without ugliness like __del__. Some uses for this are: - reporting summary data - closing external resources like log files, sockets to remote machines etc - This can be added quite safely I think - check for the attribute, and if present call it. done() could be spelt differently - I don't think anyone would care. testsFinished() finished() etc. ---------- components: Library (Lib) messages: 85812 nosy: michael.foord, olemis, rbcollins severity: normal status: open title: Support telling TestResult objects a test run has finished versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 14:23:12 2009 From: report at bugs.python.org (Robert Collins) Date: Thu, 09 Apr 2009 12:23:12 +0000 Subject: [issue5728] Support telling TestResult objects a test run has finished In-Reply-To: <1239279324.74.0.826216289254.issue5728@psf.upfronthosting.co.za> Message-ID: <1239279792.97.0.0128666336525.issue5728@psf.upfronthosting.co.za> Robert Collins added the comment: Now, some refinements, as usual (for me at least) when considering a feature like this from an upstream perspective, where one's immediate use cases are just special cases not general case, I've come up with some refinements. Firstly, I said you can infer starting. But its asymmetrical to have a 'run is finished' method that unittest will call, and not a 'run is about to start' method too. So I think we should have two methods, paired. This will avoid people having to write inference code themselves every time. Secondly, TestCase.run(None) creates a result. I think it would be good to make a clear statement about who, and when should and will call these two new methods. Something like: "Whomever calls 'start' is responsible for calling 'done'." Concretely this means that when TestCase implicitly creates a TestResult, it will call start, and also call done. Thirdly, naming. I'm agnostic, but I'd lean towards something clear, and something that can't be easily confused with startTest/stopTest. e.g. 'startTestRun' and 'stopTestRun' (just pluralising 'Test' to 'Tests' would be easily confusable). If this all makes sense, I'll write up some tests and put a patch together. I'm pasting this into the issue to, for folk that watch issues only :). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 14:32:00 2009 From: report at bugs.python.org (djc) Date: Thu, 09 Apr 2009 12:32:00 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1239280320.43.0.928534019537.issue4136@psf.upfronthosting.co.za> Changes by djc : ---------- nosy: +djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 14:32:30 2009 From: report at bugs.python.org (djc) Date: Thu, 09 Apr 2009 12:32:30 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1239280350.83.0.174071673182.issue4136@psf.upfronthosting.co.za> djc added the comment: I'll take a stab at doing it Raymond's way this weekend. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 15:15:56 2009 From: report at bugs.python.org (Michael Foord) Date: Thu, 09 Apr 2009 13:15:56 +0000 Subject: [issue5728] Support telling TestResult objects a test run has finished In-Reply-To: <1239279324.74.0.826216289254.issue5728@psf.upfronthosting.co.za> Message-ID: <1239282956.75.0.546032809325.issue5728@psf.upfronthosting.co.za> Michael Foord added the comment: startTestRun and stopTestRun sound good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 16:08:32 2009 From: report at bugs.python.org (R. David Murray) Date: Thu, 09 Apr 2009 14:08:32 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1239286112.57.0.996636402442.issue5673@psf.upfronthosting.co.za> R. David Murray added the comment: I think taking this to python-ideas to discuss the API (and the implementation) would be the best way forward. You can probably get help on the Windows stuff there, too. You are also going to need unit tests. ---------- nosy: +r.david.murray stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 16:41:59 2009 From: report at bugs.python.org (jvdias) Date: Thu, 09 Apr 2009 14:41:59 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <1239254455.57.0.547868960031.issue5725@psf.upfronthosting.co.za> Message-ID: <1239288119.62.0.595075693212.issue5725@psf.upfronthosting.co.za> jvdias added the comment: Contrast what I had to do to perform a process semaphore operation in Python with how one would do it in PERL : -- Perl 5.10.0 documentation -- Show toolbar Home > Language reference > Functions > semop semop Perl functions A-Z | Perl functions by category | The 'perlfunc' manpage * semop KEY,OPSTRING Calls the System V IPC function semop to perform semaphore operations such as signalling and waiting. OPSTRING must be a packed array of semop structures. Each semop structure can be generated with pack("s!3", $semnum, $semop, $semflag) . The length of OPSTRING implies the number of semaphore operations. Returns true if successful, or false if there is an error. As an example, the following code waits on semaphore $semnum of semaphore id $semid: $semop = pack("s!3", $semnum, -1, 0); die "Semaphore trouble: $!\n" unless semop($semid, $semop); To signal the semaphore, replace -1 with 1 . See also "SysV IPC" in perlipc, IPC::SysV , and IPC::SysV::Semaphore documentation. Nice ! Why can't Python provide something similar ? Then my example psempy.c module could be implemented in 100% pure python. I'm bringing this issue up here so as to gain some feedback from the Python development team as to the likelihood of Python's Core 'sys' module ever supportting process-scope semaphores - if I don't here back from them within three days I'll submit a patch for Python to support the sys.semget(), sys.semctl(), and sys.semop/sys.semtimedop operations as described above . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 17:54:20 2009 From: report at bugs.python.org (Paul Morelle) Date: Thu, 09 Apr 2009 15:54:20 +0000 Subject: [issue3440] Starting any program as a subprocess fails when subprocess.Popen has env argument In-Reply-To: <1216933135.87.0.837899480676.issue3440@psf.upfronthosting.co.za> Message-ID: <1239292460.55.0.844608137217.issue3440@psf.upfronthosting.co.za> Paul Morelle added the comment: Hello, I can reproduce the bug on a Windows XP Professional, SP 3, with three versions of Python: Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on win32 Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on win32 I can have this error code with the following code: =================================================== import struct, subprocess command = 'C:\\WINDOWS\\NOTEPAD.EXE' env = {'FOO': 'bar'} p = subprocess.Popen(command, env=env) p.wait() err = struct.unpack('I', struct.pack('i', p.returncode))[0] print '%x (%d)'%(err, err) =================================================== The output is "c0150004 (3222601732)" with the three versions If the `env' variable is set to None before the creation of the Popen object, then Notepad.exe is launched correctly. So, it is not only the python interpreter that fails with this call, it would be the call to CreateProcess in the subprocess module that would be incorrect? Any hint? ---------- nosy: +madprog title: Starting Python as a subprocess fails when subprocess.Popen has env argument -> Starting any program as a subprocess fails when subprocess.Popen has env argument Added file: http://bugs.python.org/file13663/fail2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 18:23:43 2009 From: report at bugs.python.org (R. David Murray) Date: Thu, 09 Apr 2009 16:23:43 +0000 Subject: [issue3440] Starting any program as a subprocess fails when subprocess.Popen has env argument In-Reply-To: <1216933135.87.0.837899480676.issue3440@psf.upfronthosting.co.za> Message-ID: <1239294223.15.0.505309896792.issue3440@psf.upfronthosting.co.za> R. David Murray added the comment: If you are passing a custom environment to a subprocess, then you must supply everything in that environment that the program you are calling requires in order to run. That said, it would be a good idea to document the Windows minimum environment requirements in the subprocess documentation. Hopefully someone can come up with a doc patch; as a non-Windows user I can't be of much help with that. ---------- assignee: -> georg.brandl components: +Documentation -Library (Lib), Windows nosy: +georg.brandl, r.david.murray priority: -> normal stage: -> needs patch type: crash -> feature request versions: +Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 18:29:35 2009 From: report at bugs.python.org (Paul Morelle) Date: Thu, 09 Apr 2009 16:29:35 +0000 Subject: [issue3440] Starting any program as a subprocess fails when subprocess.Popen has env argument In-Reply-To: <1216933135.87.0.837899480676.issue3440@psf.upfronthosting.co.za> Message-ID: <1239294575.36.0.0677699767853.issue3440@psf.upfronthosting.co.za> Paul Morelle added the comment: I have just figured out that if you initialize env with os.environ.copy() and then add/modify its components, then the bug disappears: env = os.environ.copy() env['FOO'] = 'BAR' [?] But I have no idea (for the moment) of which variable is mandatory or not. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Walter_D=C3=B6rwald_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Thu Apr 9 19:15:30 2009 From: =?utf-8?q?Walter_D=C3=B6rwald_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Walter_D=C3=B6rwald_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Thu, 09 Apr 2009 17:15:30 +0000 Subject: [issue5729] Allows tabs for indenting JSON output In-Reply-To: <1239297330.19.0.24635332127.issue5729@psf.upfronthosting.co.za> Message-ID: <1239297330.19.0.24635332127.issue5729@psf.upfronthosting.co.za> New submission from Walter D?rwald : This patchs makes it possible to use tabs for indenting the output of json.dumps(). With this patch the indent argument can now be either an integer specifying the number of spaces per indent level or a string specifying the indent string directly:: json.dumps(list(range(10), indent=3) # three spaces per indent json.dumps(list(range(10), indent="\t") # one tab per indent ---------- components: Library (Lib) files: json.diff keywords: patch messages: 85821 nosy: doerwalter severity: normal status: open title: Allows tabs for indenting JSON output type: feature request versions: Python 3.1 Added file: http://bugs.python.org/file13664/json.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 19:24:18 2009 From: report at bugs.python.org (jvdias) Date: Thu, 09 Apr 2009 17:24:18 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <1239254455.57.0.547868960031.issue5725@psf.upfronthosting.co.za> Message-ID: <1239297858.78.0.665437859081.issue5725@psf.upfronthosting.co.za> Changes by jvdias : ---------- versions: +Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 19:45:48 2009 From: report at bugs.python.org (Christoph Zwerschke) Date: Thu, 09 Apr 2009 17:45:48 +0000 Subject: [issue4799] handling inf/nan in '%f' In-Reply-To: <1230796367.25.0.681154044554.issue4799@psf.upfronthosting.co.za> Message-ID: <1239299148.97.0.57230702628.issue4799@psf.upfronthosting.co.za> Christoph Zwerschke added the comment: This is a related problem on Windows: '%g' % 1e400 -> '1.#INF' '%.f' % 1e400 --> '1' ---------- nosy: +cito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 20:46:19 2009 From: report at bugs.python.org (R. David Murray) Date: Thu, 09 Apr 2009 18:46:19 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1239302779.07.0.509837091823.issue2170@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 20:53:02 2009 From: report at bugs.python.org (Doug Philips) Date: Thu, 09 Apr 2009 18:53:02 +0000 Subject: [issue5728] Support telling TestResult objects a test run has finished In-Reply-To: <1239279324.74.0.826216289254.issue5728@psf.upfronthosting.co.za> Message-ID: <1239303182.07.0.863017552941.issue5728@psf.upfronthosting.co.za> Doug Philips added the comment: Quite useful! Names are hard, but the ones proposed are pretty good. ---------- nosy: +dgou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 21:35:30 2009 From: report at bugs.python.org (Dan Schult) Date: Thu, 09 Apr 2009 19:35:30 +0000 Subject: [issue5730] setdefault speedup In-Reply-To: <1239305730.8.0.484085764135.issue5730@psf.upfronthosting.co.za> Message-ID: <1239305730.8.0.484085764135.issue5730@psf.upfronthosting.co.za> New submission from Dan Schult : In the depths of dictobject.c one can see that dict_setdefault uses two identical calls to PyObject_Hash and ma_lookup. The first to see if the item is in the dict, the second (only if key is not present) to add the item to the dict. This second lookup (and hash) are not needed and can be avoided by inlining a portion of PyDict_SetItem instead of calling the entire subroutine. ---------- components: Interpreter Core messages: 85824 nosy: dschult severity: normal status: open title: setdefault speedup type: performance versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 21:36:34 2009 From: report at bugs.python.org (Dan Schult) Date: Thu, 09 Apr 2009 19:36:34 +0000 Subject: [issue5730] setdefault speedup In-Reply-To: <1239305730.8.0.484085764135.issue5730@psf.upfronthosting.co.za> Message-ID: <1239305794.99.0.0517721104778.issue5730@psf.upfronthosting.co.za> Changes by Dan Schult : ---------- keywords: +patch Added file: http://bugs.python.org/file13665/dict_setdefault.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 21:42:18 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Apr 2009 19:42:18 +0000 Subject: [issue5730] setdefault speedup In-Reply-To: <1239305730.8.0.484085764135.issue5730@psf.upfronthosting.co.za> Message-ID: <1239306138.5.0.56231505267.issue5730@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 22:08:01 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 09 Apr 2009 20:08:01 +0000 Subject: [issue5322] Python 2.6 object.__new__ argument calling autodetection faulty In-Reply-To: <1235075665.37.0.301694124748.issue5322@psf.upfronthosting.co.za> Message-ID: <1239307681.32.0.770950101897.issue5322@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> pitrou nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 22:51:24 2009 From: report at bugs.python.org (Paul Moore) Date: Thu, 09 Apr 2009 20:51:24 +0000 Subject: [issue5731] bdist_wininst no longer works on non-Windows platforms In-Reply-To: <1239310284.73.0.299420830333.issue5731@psf.upfronthosting.co.za> Message-ID: <1239310284.73.0.299420830333.issue5731@psf.upfronthosting.co.za> New submission from Paul Moore : In revision 62197, Mon Apr 7 01:53:39 2008 UTC, Mark Hammond added code to Lib/distutils/command/bdist_wininst.py which was intended to select an architecture-specific installer executable. In doing so, the code appears to have broken the ability to build installers on non-Windows platforms. The current code is if self.plat_name == 'win32': sfix = '' else: sfix = self.plat_name[3:] # strip 'win' - leaves eg '-amd64' filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix)) return open(filename, "rb").read() This says "strip 'win'", but in practice strips the first 3 characters from any plat_name other than win32. I've attached an untested patch to fix this, by setting sfix to '' if self.plat_name doesn't start with 'win'. ---------- assignee: tarek components: Distutils files: bdist_wininst.patch keywords: patch messages: 85825 nosy: mhammond, pmoore, tarek priority: normal severity: normal status: open title: bdist_wininst no longer works on non-Windows platforms type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file13666/bdist_wininst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 23:23:19 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Apr 2009 21:23:19 +0000 Subject: [issue5730] setdefault speedup In-Reply-To: <1239305730.8.0.484085764135.issue5730@psf.upfronthosting.co.za> Message-ID: <1239312199.25.0.914608525949.issue5730@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Inlining code saves work but breaks the effort to minimize the number of functions that have direct access to the underlying data structure. The performance of setdefault() is hard to improve in real apps because the cost of instantiating the default object is outside of the method. Also, the method often gets used in a loop where the first call adds an entry and subsequent calls just do a get; so, any efforts to optimize the second look-up only help on the first call and are completely wasted on subsequent calls. All that being said, there's no reason we can't save the double call to PyObject_Hash(). See attached patch. Martin, any thoughts? ---------- assignee: rhettinger -> loewis nosy: +loewis priority: -> low Added file: http://bugs.python.org/file13667/setdefault.diff _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Walter_D=C3=B6rwald_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Thu Apr 9 23:26:07 2009 From: =?utf-8?q?Walter_D=C3=B6rwald_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Walter_D=C3=B6rwald_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Thu, 09 Apr 2009 21:26:07 +0000 Subject: [issue5108] Invalid UTF-8 ("%s") length in PyUnicode_FromFormatV() In-Reply-To: <1233314818.25.0.50797871273.issue5108@psf.upfronthosting.co.za> Message-ID: <1239312367.48.0.588461300829.issue5108@psf.upfronthosting.co.za> Walter D?rwald added the comment: The problem with your patch is that it calls PyUnicode_DecodeUTF8() twice. It would be better if step 1 in the code would include the %s format specifiers and step 3 would then call PyUnicode_DecodeUTF8() and put the result into the callresults buffer. BTW, I can't make your examples segfault. Attached is a new version of the patch that implements this. Could you test this new version to see if there's still a Valgrind report? ---------- nosy: +doerwalter Added file: http://bugs.python.org/file13668/diff.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 23:46:47 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 09 Apr 2009 21:46:47 +0000 Subject: [issue5322] Python 2.6 object.__new__ argument calling autodetection faulty In-Reply-To: <1235075665.37.0.301694124748.issue5322@psf.upfronthosting.co.za> Message-ID: <1239313607.03.0.36584279787.issue5322@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm sorry, I don't have any opinion on this. ---------- assignee: pitrou -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 9 23:51:44 2009 From: report at bugs.python.org (Mark Hammond) Date: Thu, 09 Apr 2009 21:51:44 +0000 Subject: [issue5731] bdist_wininst no longer works on non-Windows platforms In-Reply-To: <1239310284.73.0.299420830333.issue5731@psf.upfronthosting.co.za> Message-ID: <1239313904.96.0.766360703059.issue5731@psf.upfronthosting.co.za> Mark Hammond added the comment: +1 on the idea - it's not the first time I've forgotten that works on platforms other than Windows. It appears the patch you attached is reversed though (or its just way too early for me...) ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Thu Apr 9 23:53:35 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Thu, 09 Apr 2009 21:53:35 +0000 Subject: [issue5731] bdist_wininst no longer works on non-Windows platforms In-Reply-To: <1239310284.73.0.299420830333.issue5731@psf.upfronthosting.co.za> Message-ID: <1239314015.93.0.258494671108.issue5731@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Mark, I have just applied the patch in r71413 because it was obvious. If it's fine with you I'll backport it to 2.6 so it makes it to 2.6.2 final ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 10 00:20:31 2009 From: report at bugs.python.org (R. David Murray) Date: Thu, 09 Apr 2009 22:20:31 +0000 Subject: [issue2170] rewrite of minidom.Node.normalize In-Reply-To: <1203793267.02.0.633185244836.issue2170@psf.upfronthosting.co.za> Message-ID: <1239315631.41.0.655415351789.issue2170@psf.upfronthosting.co.za> R. David Murray added the comment: Committed in r71414. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Fri Apr 10 00:27:22 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Thu, 09 Apr 2009 22:27:22 +0000 Subject: [issue5730] setdefault speedup In-Reply-To: <1239312199.25.0.914608525949.issue5730@psf.upfronthosting.co.za> Message-ID: <49DE7646.7040501@v.loewis.de> Martin v. L?wis added the comment: > Martin, any thoughts? The same as always: Dan, do you have any benchmarks that demonstrate the speedup? Looking at the usage of setdefault in the standard library, it seems that it's most of the time either an interned string, or an object hashed by memory address that gets passed as a key. Hashing these is very cheap, so I would be skeptical that any real benefits can be demonstrated. I also agree with Raymond that, by nature, setdefault only calls hash() twice on the very first call, and not in subsequent calls, so even if there was an improvement, it shouldn't matter for the total runtime. I also agree that setdefault is somewhat inappropriate for performance critical code, since it will create the default value anyway (often a dict or a list), even if a value is already stored. So users who care about performance should write something like try: l = d[k] except KeyError: l = d[k] = [] to avoid the list creation in the common case, or use a defaultdict in the first place. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Fri Apr 10 00:52:16 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Thu, 09 Apr 2009 22:52:16 +0000 Subject: [issue5731] bdist_wininst no longer works on non-Windows platforms In-Reply-To: <1239310284.73.0.299420830333.issue5731@psf.upfronthosting.co.za> Message-ID: <1239317536.6.0.874239726516.issue5731@psf.upfronthosting.co.za> Tarek Ziad? added the comment: fixed in r71413 and r71415. Thanks for the patch ! ---------- status: open -> closed versions: +Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 10 00:57:31 2009 From: report at bugs.python.org (Lenard Lindstrom) Date: Thu, 09 Apr 2009 22:57:31 +0000 Subject: [issue3440] Starting any program as a subprocess fails when subprocess.Popen has env argument In-Reply-To: <1216933135.87.0.837899480676.issue3440@psf.upfronthosting.co.za> Message-ID: <1239317851.59.0.361827687238.issue3440@psf.upfronthosting.co.za> Lenard Lindstrom added the comment: The notepad example works with Pythons 2.4.4 and 2.5.4 on Windows 98. So something changed in Windows XP. The 0xc0150004 error code crops up when a side-by-side assembly fails to load. The DLL loader appears to use the SystemRoot environment variable to find dependencies. I will check if the XP notepad.exe is an SxS and post a follow-up. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Fri Apr 10 01:15:36 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Thu, 09 Apr 2009 23:15:36 +0000 Subject: [issue5732] add a new command called "check" into Distutils In-Reply-To: <1239318936.64.0.115245902927.issue5732@psf.upfronthosting.co.za> Message-ID: <1239318936.64.0.115245902927.issue5732@psf.upfronthosting.co.za> New submission from Tarek Ziad? : Right now, both register and sdist commands are implementing a check_metadata function to check that the metadata are complete enough. check will refactor this and also add a test to validate that the long_description is/is not reST compliant (if asked *and* if docutils is present) of course distutils will not introduce a hard dependency on docutils and both register and sdist wil continue to work the same way (but use check underneath) ---------- assignee: tarek messages: 85835 nosy: tarek severity: normal status: open title: add a new command called "check" into Distutils type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 10 01:31:30 2009 From: report at bugs.python.org (R. David Murray) Date: Thu, 09 Apr 2009 23:31:30 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <1239254455.57.0.547868960031.issue5725@psf.upfronthosting.co.za> Message-ID: <1239319890.91.0.90979481852.issue5725@psf.upfronthosting.co.za> R. David Murray added the comment: In issue5672 Martin said: If somebody would provide a patch that adds prctl to the posix module, that would be fine with me - we have a long tradition of exposing all available system calls if somebody wants them. However, you are talking about a System V call, not a posix call, so it's not clear to me if the same rules apply. I suggest bringing this up on python-ideas. (BTW, sys is for python system stuff, not OS system stuff (which goes in the 'os' module). ---------- components: +Library (Lib) -Interpreter Core nosy: +r.david.murray priority: -> low versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 10 02:50:32 2009 From: report at bugs.python.org (Bob Ippolito) Date: Fri, 10 Apr 2009 00:50:32 +0000 Subject: [issue5723] Incomplete json tests In-Reply-To: <1239205406.15.0.353111609778.issue5723@psf.upfronthosting.co.za> Message-ID: <1239324632.1.0.819939614205.issue5723@psf.upfronthosting.co.za> Bob Ippolito added the comment: I don't think the decorator approach would work for the doctests, it looks like it could be an interesting approach though. I have a feeling that it's going to have to be done in some kind of ugly subclass though, I'll dig into unittest deeper this weekend to see how that might be done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 10 04:15:42 2009 From: report at bugs.python.org (Andrew I MacIntyre) Date: Fri, 10 Apr 2009 02:15:42 +0000 Subject: [issue4753] Faster opcode dispatch on gcc In-Reply-To: <1230325778.98.0.752974375077.issue4753@psf.upfronthosting.co.za> Message-ID: <1239329742.05.0.434382665624.issue4753@psf.upfronthosting.co.za> Andrew I MacIntyre added the comment: Antoine, in my testing the "loss" of the HAS_ARG() optimisation in my patch appears to have negligible cost on i386, but starts to look significant on amd64. On an Intel E8200 cpu running FreeBSD 7.1 amd64, with gcc 7.2.1 and the 3.1a2 sources, the computed goto version is ~8% faster (average time of all rounds) for pybench (with warp factor set to 3 rather than the default 10, to get the round time up over 10s) than without computed gotos. With my patch applied, the computed goto version is ~5.5% faster than without computed gotos by the same measure. On this platform, Pystone rates at ~86k (no computed gotos), ~85k (computed gotos) and ~82k (computed gotos + my patch). For comparison, this machine running Windows XP (32 bit) with the python.org builds rates ~92k pystones for 2.6.1 and ~81k for 3.1a2. Pybench isn't distributed in the MSI installers :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 10 06:54:55 2009 From: report at bugs.python.org (Dan Schult) Date: Fri, 10 Apr 2009 04:54:55 +0000 Subject: [issue5730] setdefault speedup In-Reply-To: <49DE7646.7040501@v.loewis.de> Message-ID: <666A36BE-5DEB-4A8C-B524-FC6A4D89E071@colgate.edu> Dan Schult added the comment: Benchmarks: Upon trying cooked up examples, I do not notice any speedup beyond 5-10%. Seems like function calling time swamps everything for small examples with fast hashes. I don't have a handy dandy example with long hash times or long lookup times. That's what it would take to show a large performance boost with this patch. I also agree with Martin that there are many reasons not to use setdefault... But it is part of the API. We might as well make it worth using. (Which probably means changing the default value to a factory function which gets called when the key is not found. But that's a much bigger change...) I'm just suggesting that the code should not do extra work. By the way, defaultdict is NOT like setdefault--it is like get(). Missing entries do no get set. Perhaps there should be a collections entry that does setdefault instead of get...... Next, the second hash gets executed "only the first time" for EACH key. So, e.g. if you have a lot of entries that get called up 2 or 3 times, using the second hash does make a difference1/2 to 1/3 of the time. And we don't need a second hash or lookup so why do it. I understand Raymond's concern about more code using the data structure directly. There are three basic routines to deal with the data structure: ma_lookup/lookdict, insertdict and resizedict. The comments for lookdict encourage you to use the "ep" entry to check if it is empty and add the key/value pair if desired. But as currently implemented, insertdict calls lookdict, so they aren't atomistic in that sense. If atomism is a design goal (even if it isn't a word :) then insertdict would take "ep" as an input instead of doing a lookup. I'm not sure if atomism is part of the design in Python though... From my perspective creating an internal SetItem adds another function handling the data structure just as setdefault would--that's why I inlined in setdefault. But, it does keep the name similar and thus its easier to identify it as writing to the data structure. If this style is promoted here then I think there ought to be an internal insertdict that doesn't do the lookup. Also shouldn't the parent functions call these internal versions instead of duplicating code? Ack---that means more changes. Not difficult ones though... What do you think? Dan ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 10 08:08:21 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Fri, 10 Apr 2009 06:08:21 +0000 Subject: [issue5733] py3_test_grammar.py syntax error In-Reply-To: <1239343700.07.0.933756737051.issue5733@psf.upfronthosting.co.za> Message-ID: <1239343700.07.0.933756737051.issue5733@psf.upfronthosting.co.za> New submission from Kurt B. Kaiser : Try running it as a script: File "Lib/lib2to3/tests/data/py3_test_grammar.py", line 130 x = ... ^ SyntaxError: invalid syntax Furthermore, testEllipsis seems invalid. What is intended? >>> class C: def __getitem__(self, x): return x >>> c[...] Ellipsis >>> c[. . .] Ellipsis >>> eval(...) SyntaxError: invalid syntax ---------- assignee: collinwinter components: 2to3 (2.x to 3.0 conversion tool) messages: 85840 nosy: collinwinter, kbk priority: normal severity: normal status: open title: py3_test_grammar.py syntax error type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 10:29:36 2009 From: report at bugs.python.org (Robert Collins) Date: Sat, 11 Apr 2009 08:29:36 +0000 Subject: [issue5728] Support telling TestResult objects a test run has finished In-Reply-To: <1239282956.75.0.546032809325.issue5728@psf.upfronthosting.co.za> Message-ID: <1239353965.2892.212.camel@lifeless-64> Robert Collins added the comment: I've written up a patch for this; it works with old result classes too. Hopefully the bugtracker will attach it in reply to this mail; if not I'll put in via the webui this evening. -Rob ---------- keywords: +patch Added file: http://bugs.python.org/file13669/start-stop-TestRun.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- === modified file 'Lib/test/test_unittest.py' --- Lib/test/test_unittest.py 2009-04-05 19:19:28 +0000 +++ Lib/test/test_unittest.py 2009-04-10 08:54:32 +0000 @@ -6,6 +6,7 @@ TestCase.{assert,fail}* methods (some are tested implicitly) """ +from StringIO import StringIO import re from test import test_support import unittest @@ -25,10 +26,18 @@ self._events.append('startTest') super(LoggingResult, self).startTest(test) + def startTestRun(self): + self._events.append('startTestRun') + # super(LoggingResult, self).startTestRun(test) + def stopTest(self, test): self._events.append('stopTest') super(LoggingResult, self).stopTest(test) + def stopTestRun(self): + self._events.append('stopTestRun') + # super(LoggingResult, self).stopTestRun(test) + def addFailure(self, *args): self._events.append('addFailure') super(LoggingResult, self).addFailure(*args) @@ -1816,6 +1825,12 @@ self.assertEqual(result.testsRun, 1) self.assertEqual(result.shouldStop, False) + # "Called before and after tests are run. The default implementation does nothing." + def test_startTestRun_stopTestRun(self): + result = unittest.TestResult() + result.startTestRun() + result.stopTestRun() + # "addSuccess(test)" # ... # "Called when the test case test succeeds" @@ -1963,6 +1978,53 @@ class Bar(Foo): def test2(self): pass +class LoggingTestCase(unittest.TestCase): + """A test case which logs its calls.""" + + def __init__(self, events): + super(LoggingTestCase, self).__init__('test') + self.events = events + + def setUp(self): + self.events.append('setUp') + + def test(self): + self.events.append('test') + + def tearDown(self): + self.events.append('tearDown') + +class ResultWithNoStartTestRunStopTestRun(object): + """An object honouring TestResult before startTestRun/stopTestRun.""" + + def __init__(self): + self.failures = [] + self.errors = [] + self.testsRun = 0 + self.skipped = [] + self.expectedFailures = [] + self.unexpectedSuccesses = [] + self.shouldStop = False + + def startTest(self, test): + pass + + def stopTest(self, test): + pass + + def addError(self, test): + pass + + def addFailure(self, test): + pass + + def addSuccess(self, test): + pass + + def wasSuccessful(self): + return True + + ################################################################ ### /Support code for Test_TestCase @@ -2057,21 +2119,32 @@ events = [] result = LoggingResult(events) - class Foo(unittest.TestCase): + class Foo(LoggingTestCase): def setUp(self): - events.append('setUp') + super(Foo, self).setUp() raise RuntimeError('raised by Foo.setUp') - def test(self): - events.append('test') - - def tearDown(self): - events.append('tearDown') - - Foo('test').run(result) + Foo(events).run(result) expected = ['startTest', 'setUp', 'addError', 'stopTest'] self.assertEqual(events, expected) + # "With a temporary result stopTestRun is called when setUp errors. + def test_run_call_order__error_in_setUp_default_result(self): + events = [] + + class Foo(LoggingTestCase): + def defaultTestResult(self): + return LoggingResult(self.events) + + def setUp(self): + super(Foo, self).setUp() + raise RuntimeError('raised by Foo.setUp') + + Foo(events).run() + expected = ['startTestRun', 'startTest', 'setUp', 'addError', + 'stopTest', 'stopTestRun'] + self.assertEqual(events, expected) + # "When a setUp() method is defined, the test runner will run that method # prior to each test. Likewise, if a tearDown() method is defined, the # test runner will invoke that method after each test. In the example, @@ -2083,20 +2156,32 @@ events = [] result = LoggingResult(events) - class Foo(unittest.TestCase): - def setUp(self): - events.append('setUp') - + class Foo(LoggingTestCase): def test(self): - events.append('test') + super(Foo, self).test() raise RuntimeError('raised by Foo.test') - def tearDown(self): - events.append('tearDown') - expected = ['startTest', 'setUp', 'test', 'addError', 'tearDown', 'stopTest'] - Foo('test').run(result) + Foo(events).run(result) + self.assertEqual(events, expected) + + # "With a default result, an error in the test still results in stopTestRun + # being called." + def test_run_call_order__error_in_test_default_result(self): + events = [] + + class Foo(LoggingTestCase): + def defaultTestResult(self): + return LoggingResult(self.events) + + def test(self): + super(Foo, self).test() + raise RuntimeError('raised by Foo.test') + + expected = ['startTestRun', 'startTest', 'setUp', 'test', 'addError', + 'tearDown', 'stopTest', 'stopTestRun'] + Foo(events).run() self.assertEqual(events, expected) # "When a setUp() method is defined, the test runner will run that method @@ -2110,20 +2195,30 @@ events = [] result = LoggingResult(events) - class Foo(unittest.TestCase): - def setUp(self): - events.append('setUp') - + class Foo(LoggingTestCase): def test(self): - events.append('test') + super(Foo, self).test() self.fail('raised by Foo.test') - def tearDown(self): - events.append('tearDown') - expected = ['startTest', 'setUp', 'test', 'addFailure', 'tearDown', 'stopTest'] - Foo('test').run(result) + Foo(events).run(result) + self.assertEqual(events, expected) + + # "When a test fails with a default result stopTestRun is still called." + def test_run_call_order__failure_in_test_default_result(self): + + class Foo(LoggingTestCase): + def defaultTestResult(self): + return LoggingResult(self.events) + def test(self): + super(Foo, self).test() + self.fail('raised by Foo.test') + + expected = ['startTestRun', 'startTest', 'setUp', 'test', 'addFailure', + 'tearDown', 'stopTest', 'stopTestRun'] + events = [] + Foo(events).run() self.assertEqual(events, expected) # "When a setUp() method is defined, the test runner will run that method @@ -2137,22 +2232,44 @@ events = [] result = LoggingResult(events) - class Foo(unittest.TestCase): - def setUp(self): - events.append('setUp') - - def test(self): - events.append('test') - + class Foo(LoggingTestCase): def tearDown(self): - events.append('tearDown') + super(Foo, self).tearDown() raise RuntimeError('raised by Foo.tearDown') - Foo('test').run(result) + Foo(events).run(result) expected = ['startTest', 'setUp', 'test', 'tearDown', 'addError', 'stopTest'] self.assertEqual(events, expected) + # "When tearDown errors with a default result stopTestRun is still called." + def test_run_call_order__error_in_tearDown_default_result(self): + + class Foo(LoggingTestCase): + def defaultTestResult(self): + return LoggingResult(self.events) + def tearDown(self): + super(Foo, self).tearDown() + raise RuntimeError('raised by Foo.tearDown') + + events = [] + Foo(events).run() + expected = ['startTestRun', 'startTest', 'setUp', 'test', 'tearDown', + 'addError', 'stopTest', 'stopTestRun'] + self.assertEqual(events, expected) + + # "TestCase.run() still works when the defaultTestResult is a TestResult + # that does not support startTestRun and stopTestRun. + def test_run_call_order_default_result(self): + + class Foo(unittest.TestCase): + def defaultTestResult(self): + return ResultWithNoStartTestRunStopTestRun() + def test(self): + pass + + Foo('test').run() + # "This class attribute gives the exception raised by the test() method. # If a test framework needs to use a specialized exception, possibly to # carry additional information, it must subclass this exception in @@ -2243,7 +2360,9 @@ self.failUnless(isinstance(Foo().id(), basestring)) # "If result is omitted or None, a temporary result object is created - # and used, but is not made available to the caller" + # and used, but is not made available to the caller. As TestCase owns the + # temporary result startTestRun and stopTestRun are called. + def test_run__uses_defaultTestResult(self): events = [] @@ -2257,7 +2376,8 @@ # Make run() find a result object on its own Foo('test').run() - expected = ['startTest', 'test', 'addSuccess', 'stopTest'] + expected = ['startTestRun', 'startTest', 'test', 'addSuccess', + 'stopTest', 'stopTestRun'] self.assertEqual(events, expected) def testShortDescriptionWithoutDocstring(self): @@ -3040,6 +3160,46 @@ "^unexpectedly identical: None : oops$"]) +class Test_TextTestRunner(TestCase): + """Tests for TextTestRunner.""" + + def test_works_with_result_without_startTestRun_stopTestRun(self): + class OldTextResult(ResultWithNoStartTestRunStopTestRun): + separator2 = '' + def printErrors(self): + pass + + class Runner(unittest.TextTestRunner): + def __init__(self): + super(Runner, self).__init__(StringIO()) + + def _makeResult(self): + return OldTextResult() + + runner = Runner() + runner.run(unittest.TestSuite()) + + def test_startTestRun_stopTestRun_called(self): + class LoggingTextResult(LoggingResult): + separator2 = '' + def printErrors(self): + pass + + class LoggingRunner(unittest.TextTestRunner): + def __init__(self, events): + super(LoggingRunner, self).__init__(StringIO()) + self._events = events + + def _makeResult(self): + return LoggingTextResult(self._events) + + events = [] + runner = LoggingRunner(events) + runner.run(unittest.TestSuite()) + expected = ['startTestRun', 'stopTestRun'] + self.assertEqual(events, expected) + + ###################################################################### ## Main ###################################################################### @@ -3047,7 +3207,8 @@ def test_main(): test_support.run_unittest(Test_TestCase, Test_TestLoader, Test_TestSuite, Test_TestResult, Test_FunctionTestCase, - Test_TestSkipping, Test_Assertions, TestLongMessage) + Test_TestSkipping, Test_Assertions, TestLongMessage, + Test_TextTestRunner) if __name__ == "__main__": test_main() === modified file 'Lib/unittest.py' --- Lib/unittest.py 2009-04-05 19:19:28 +0000 +++ Lib/unittest.py 2009-04-10 08:55:54 +0000 @@ -186,10 +186,22 @@ "Called when the given test is about to be run" self.testsRun = self.testsRun + 1 + def startTestRun(self): + """Called once before any tests are executed. + + See startTest for a method called before each test. + """ + def stopTest(self, test): "Called when the given test has been run" pass + def stopTestRun(self): + """Called once after all tests are executed. + + See stopTest for a method called after each test. + """ + def addError(self, test, err): """Called when an error has occurred. 'err' is a tuple of values as returned by sys.exc_info(). @@ -427,8 +439,12 @@ (_strclass(self.__class__), self._testMethodName) def run(self, result=None): + orig_result = result if result is None: result = self.defaultTestResult() + startTestRun = getattr(result, 'startTestRun', None) + if startTestRun is not None: + startTestRun() result.startTest(self) testMethod = getattr(self, self._testMethodName) try: @@ -466,6 +482,10 @@ result.addSuccess(self) finally: result.stopTest(self) + if orig_result is None: + stopTestRun = getattr(result, 'stopTestRun', None) + if stopTestRun is not None: + stopTestRun() def __call__(self, *args, **kwds): return self.run(*args, **kwds) @@ -1407,7 +1427,15 @@ "Run the given test case or test suite." result = self._makeResult() startTime = time.time() - test(result) + startTestRun = getattr(result, 'startTestRun', None) + if startTestRun is not None: + startTestRun() + try: + test(result) + finally: + stopTestRun = getattr(result, 'stopTestRun', None) + if stopTestRun is not None: + stopTestRun() stopTime = time.time() timeTaken = stopTime - startTime result.printErrors() From report at bugs.python.org Sat Apr 11 10:37:29 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 11 Apr 2009 08:37:29 +0000 Subject: [issue4977] test_maxint64 fails on 32-bit systems due to assumption that 64-bit fits into "long" In-Reply-To: <1232229660.32.0.518084727508.issue4977@psf.upfronthosting.co.za> Message-ID: <1239439049.18.0.0615001455623.issue4977@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Closing since I haven't seen any sign of such failures on a 64-bit build. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 10:42:48 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 11 Apr 2009 08:42:48 +0000 Subject: [issue5729] Allows tabs for indenting JSON output In-Reply-To: <1239297330.19.0.24635332127.issue5729@psf.upfronthosting.co.za> Message-ID: <1239439368.43.0.869077314772.issue5729@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> bob.ippolito nosy: +bob.ippolito priority: -> normal stage: -> patch review versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 11:06:18 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 11 Apr 2009 09:06:18 +0000 Subject: [issue4753] Faster opcode dispatch on gcc In-Reply-To: <1230325778.98.0.752974375077.issue4753@psf.upfronthosting.co.za> Message-ID: <1239440778.76.0.990161028394.issue4753@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: -marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 11:09:39 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 11 Apr 2009 09:09:39 +0000 Subject: [issue5723] Incomplete json tests In-Reply-To: <1239324632.1.0.819939614205.issue5723@psf.upfronthosting.co.za> Message-ID: <1239393177.7235.5.camel@fsol> Antoine Pitrou added the comment: Hi, > I don't think the decorator approach would work for the doctests, it looks > like it could be an interesting approach though. I have a feeling that > it's going to have to be done in some kind of ugly subclass though, I'll > dig into unittest deeper this weekend to see how that might be done. Doctests will be annoying indeed. I never use doctests so I can't suggest you anything. As for standard unit tests, the common idiom is something like: class JSONEncodingTests: def test_encode1(self): self.assertEquals(self.encode("foo"), "bar") # etc. class CJSONEncodingTests(JSONEncodingTests, unittest.TestCase): encode = json.c_encode class PyJSONEncodingTests(JSONEncodingTests, unittest.TestCase): encode = json.py_encode (I'm CC'ing you since bugs.python.org looks down) Regards Antoine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 11:12:25 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 11 Apr 2009 09:12:25 +0000 Subject: [issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10 In-Reply-To: <1239226094.42.0.345959405343.issue5724@psf.upfronthosting.co.za> Message-ID: <1239441145.6.0.521245997162.issue5724@psf.upfronthosting.co.za> Mark Dickinson added the comment: Sorry for the late reply: I've been away for a few days. This looks like the same problem as issue 4575, so should already be fixed in the trunk and py3k. It looks as though I never got around to backporting the fix to 2.6 (or 3.0). I'll do that today. ---------- assignee: barry -> marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 11:20:00 2009 From: report at bugs.python.org (Andrew I MacIntyre) Date: Sat, 11 Apr 2009 09:20:00 +0000 Subject: [issue5722] settimer / gettimer functionality on FreeBSD 6.3 (not 7.x) In-Reply-To: <1239187744.6.0.565034475162.issue5722@psf.upfronthosting.co.za> Message-ID: <1239441600.73.0.679101216712.issue5722@psf.upfronthosting.co.za> Andrew I MacIntyre added the comment: I've just built (using ./configure; make) 3.1a on FreeBSD 6.4 amd64. libpthread is used by the resulting binary, not libc_r, according to ldd. I would expect then that explicit action is required to use libc_r, and given that FreeBSD people have indicated that it is deprecated and no fixes are likely to be made, I would suggest documenting this as a "don't do that" (ie use -lc_r) and close this as "won't fix". The README file in the root of the source tree would seem an appropriate place for such documentation, though I note that there appears to be a lot of out of date information in there already... ---------- nosy: +aimacintyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 11:29:31 2009 From: report at bugs.python.org (jvdias) Date: Sat, 11 Apr 2009 09:29:31 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <1239319890.91.0.90979481852.issue5725@psf.upfronthosting.co.za> Message-ID: <200904101332.21982.jason.vas.dias@gmail.com> jvdias added the comment: Thanks for responding ! I also think that the the Solaris Python should provide support for prctl . Well, actually in modern Solaris what can be achieved with "prctl" can be achieved my mmap()-ping and manipulating the procfs(4) mounted under /proc - but yes, what I meant was not that process-scope semaphore support was required to solve the problem solved in the example code for this bug report - actually, there are many other ways of doing that on either Linux or Solaris, such as with rlimit(1) - but was only that, had process-scope semaphore support been available in Python , then the algorithm used by the example would have been a simple and robust one and suitable for use in Python code ; but as the application the example code was originally part of required process-scope semaphores anyway , and for many other reasons, such as when a process is killed with -9, its semaphore count is automatically adjusted by specifying the SEM_UNDO option, meaning another "slot" is available, this was the best among several methods investigated . Actually, the example code I submitted for this bug report also raises another, completely separate issue, which is that any parent using Python fork() MUST somehow do a fflush() of its standard output and error C stdio file descriptors before doing so ; otherwise the child's first Python "print " statement is prefixed by what was in the parent's stdio buffer, so that more than one initial "log" line can occasionally appear if Python "print" is used to produce the log - but if the parent does 'print "\n"' immediately before calling "fork()" then both processes proceed with clean buffers and there are no doubled log lines . Can't Python provide a better print() implementation or a fflush() implementation that will enable print()'s buffers to be flushed ? Perhaps something like PERL's IO::Handle::autoflush() ? Maybe I should raise another "fflush() support required" bug ? Thanks & Regards, Jason On Thursday 09 April 2009 19:31:31 you wrote: > > R. David Murray added the comment: > > In issue5672 Martin said: > > If somebody would provide a patch that adds prctl to the posix module, > that would be fine with me - we have a long tradition of exposing all > available system calls if somebody wants them. > > However, you are talking about a System V call, not a posix call, so > it's not clear to me if the same rules apply. > > I suggest bringing this up on python-ideas. > > (BTW, sys is for python system stuff, not OS system stuff (which goes in > the 'os' module). > > ---------- > components: +Library (Lib) -Interpreter Core > nosy: +r.david.murray > priority: -> low > versions: -Python 2.6, Python 3.0 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 12:12:28 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 11 Apr 2009 10:12:28 +0000 Subject: [issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10 In-Reply-To: <1239226094.42.0.345959405343.issue5724@psf.upfronthosting.co.za> Message-ID: <1239444748.97.0.373577421683.issue5724@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch that backports the corresponding changes from trunk. Skip, can you confirm that this fixes the issue? ---------- keywords: +patch Added file: http://bugs.python.org/file13670/issue5724.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 12:31:56 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 11 Apr 2009 10:31:56 +0000 Subject: [issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10 In-Reply-To: <1239226094.42.0.345959405343.issue5724@psf.upfronthosting.co.za> Message-ID: <1239445916.85.0.668664043354.issue5724@psf.upfronthosting.co.za> Mark Dickinson added the comment: Just to say, I'm a bit uncomfortable with a patch this large going into a release candidate. It's all code that's been backported from 2.7, so it *should* be okay, but I really don't want to be responsible for breaking 2.6.2. The test failure that Skip reports *is* due to a bug, but the bug is platform-specific (only affects x86 platforms where the math library doesn't have isinf or isnan---in practice, that's only Solaris/x86), and it's a bug in a somewhat obscure corner case (overflow in cmath.acosh) that's not likely to affect many people. I don't think the (small, I hope) risk of breaking a release candidate is worth the (even smaller, IMO) benefit from fixing this bug. If Skip confirms that the patch works, I'd suggest that it can wait for 2.6.3. Assigning back to Barry for pronouncement. ---------- assignee: marketdickinson -> barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 12:41:09 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 11 Apr 2009 10:41:09 +0000 Subject: [issue5734] BufferedRWPair broken In-Reply-To: <1239446469.87.0.208856663223.issue5734@psf.upfronthosting.co.za> Message-ID: <1239446469.87.0.208856663223.issue5734@psf.upfronthosting.co.za> New submission from Brian Quinlan : The C implementation: - doesn't correctly initialize its reader and writer instances - incorrectly maps its "readinto" method to another class - incorrectly delegates its "closed" property to its base class i.e. this class can't be used at all The Python implementation: - Calls internal methods of its constructor arguments that aren't part of the IOBase interface to determine if its streams are readable/writable There aren't any useful tests for either. ---------- files: rwpair.diff keywords: patch messages: 85849 nosy: bquinlan severity: normal status: open title: BufferedRWPair broken versions: Python 3.1 Added file: http://bugs.python.org/file13671/rwpair.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 12:41:43 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 11 Apr 2009 10:41:43 +0000 Subject: [issue5734] BufferedRWPair broken In-Reply-To: <1239446469.87.0.208856663223.issue5734@psf.upfronthosting.co.za> Message-ID: <1239446503.37.0.649762348644.issue5734@psf.upfronthosting.co.za> Changes by Brian Quinlan : ---------- components: +Library (Lib) type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 12:46:55 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 11 Apr 2009 10:46:55 +0000 Subject: [issue5734] BufferedRWPair broken In-Reply-To: <1239446469.87.0.208856663223.issue5734@psf.upfronthosting.co.za> Message-ID: <1239446815.89.0.0717697893501.issue5734@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hey, thanks a lot for caring. I'll take a look at the patch and come back later. If you want to add some more tests, you are welcome too :-) ---------- assignee: -> pitrou nosy: +pitrou priority: -> release blocker stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 12:57:09 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 11 Apr 2009 10:57:09 +0000 Subject: [issue5698] pydoc -w doesn't produce proper HTML In-Reply-To: <1238943815.07.0.410392153276.issue5698@psf.upfronthosting.co.za> Message-ID: <1239447429.51.0.578538973307.issue5698@psf.upfronthosting.co.za> Georg Brandl added the comment: I fixed the DOCTYPE in trunk/3k r71443/71444, and the encoding issue in 3k only, because there the encoding is well-defined, in r71445. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 12:57:54 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 11 Apr 2009 10:57:54 +0000 Subject: [issue5733] py3_test_grammar.py syntax error In-Reply-To: <1239343700.07.0.933756737051.issue5733@psf.upfronthosting.co.za> Message-ID: <1239447474.62.0.28416076976.issue5733@psf.upfronthosting.co.za> Georg Brandl added the comment: I think this file is only meant as a test that 2to3 can parse both 2.x and 3.x syntax, not Python itself. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 13:08:42 2009 From: report at bugs.python.org (Leonid Vasilev) Date: Sat, 11 Apr 2009 11:08:42 +0000 Subject: [issue5735] Segfault when loading not recompiled module In-Reply-To: <1239448122.29.0.383715698899.issue5735@psf.upfronthosting.co.za> Message-ID: <1239448122.29.0.383715698899.issue5735@psf.upfronthosting.co.za> New submission from Leonid Vasilev : I compiled two versions of python(both from main trunk) Here's what I do: $cd /usr/local/src/Python-3.0.1/ $./configure $make && make install ... $cd ~/pyext/ $python3.0 setup.py install ... "run python3.0 and import ext1 -- it worked ok" ... $cd /usr/local/src/Python-3.0.1 $mkdir debug $cd debug $./../configure --with-pydebug $make $./python ... Try to import a ext1, and got a Segfault Backtrace from gdb: (gdb) backtrace #0 0xb7e9b1cb in strlen () from /lib/i686/cmov/libc.so.6 #1 0x0807c06d in PyUnicodeUCS2_FromString (u=0xffffffff
) at ./../Objects/unicodeobject.c:553 #2 0x0816251a in PyModule_New (name=0xffffffff
) at ./../Objects/moduleobject.c:39 #3 0x0816282d in PyModule_Create2 (module=0xb7fd26a0, module_api_version=1013) at ./../Objects/moduleobject.c:106 #4 0xb7fd14b8 in PyInit_ext1 () at ext1.c:40 #5 0x080cfda0 in _PyImport_LoadDynamicModule (name=0xbf9f8a17 "ext1", pathname=0xbf9f798f "/usr/local/lib/python3.0/site-packages/ext1.so", fp=0x9a18ef8) at ./../Python/importdl.c:57 #6 0x080cc226 in load_module (name=0xbf9f8a17 "ext1", fp=0x9a18ef8, buf=0xbf9f798f "/usr/local/lib/python3.0/site-packages/ext1.so", type=3, loader=0x0) at ./../Python/import.c:1807 #7 0x080ce236 in import_submodule (mod=0x81b8d4c, subname=0xbf9f8a17 "ext1", fullname=0xbf9f8a17 "ext1") at ./../Python/import.c:2601 #8 0x080cd7b6 in load_next (mod=0x81b8d4c, altmod=0x81b8d4c, p_name=0xbf9f9a30, buf=0xbf9f8a17 "ext1", p_buflen=0xbf9f8a10) at ./../Python/import.c:2406 #9 0x080ccbdf in import_module_level (name=0x0, globals=0xb7e10714, locals=0xb7e10714, fromlist=0x81b8d4c, level=0) at ./../Python/import.c:2123 #10 0x080ccfc7 in PyImport_ImportModuleLevel (name=0x9a057f0 "ext1", globals=0xb7e10714, locals=0xb7e10714, fromlist=0x81b8d4c, level=0) at ./../Python/import.c:2174 #11 0x0809f65f in builtin___import__ (self=0xb7df6ce4, args=0xb7df7a9c, kwds=0x0) at ./../Python/bltinmodule.c:173 #12 0x08161e56 in PyCFunction_Call (func=0xb7df6dfc, arg=0xb7df7a9c, kw=0x0) at ./../Objects/methodobject.c:84 #13 0x081179c1 in PyObject_Call (func=0xb7df6dfc, arg=0xb7df7a9c, kw=0x0) at ./../Objects/abstract.c:2161 #14 0x080b1806 in PyEval_CallObjectWithKeywords (func=0xb7df6dfc, arg=0xb7df7a9c, kw=0x0) at ./../Python/ceval.c:3313 #15 0x080ac71c in PyEval_EvalFrameEx (f=0x9a3105c, throwflag=0) at ./../Python/ceval.c:1995 #16 0x080b03fa in PyEval_EvalCodeEx (co=0x9983ec8, globals=0xb7e10714, locals=0xb7e10714, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at ./../Python/ceval.c:2869 #17 0x080a562b in PyEval_EvalCode (co=0x9983ec8, globals=0xb7e10714, locals=0xb7e10714) at ./../Python/ceval.c:526 #18 0x080dcb68 in run_mod (mod=0x9a78d68, filename=0x819ff60 "", globals=0xb7e10714, locals=0xb7e10714, flags=0xbf9faf70, arena=0x99126d8) at ./../Python/pythonrun.c:1686 #19 0x080dadf1 in PyRun_InteractiveOneFlags (fp=0xb7f81420, filename=0x819ff60 "", flags=0xbf9faf70) at ./../Python/pythonrun.c:1081 #20 0x080da953 in PyRun_InteractiveLoopFlags (fp=0xb7f81420, filename=0x819ff60 "", flags=0xbf9faf70) at ./../Python/pythonrun.c:993 #21 0x080da7ab in PyRun_AnyFileExFlags (fp=0xb7f81420, filename=0x819ff60 "", closeit=0, flags=0xbf9faf70) at ./../Python/pythonrun.c:962 #22 0x080ec7a7 in Py_Main (argc=1, argv=0xb7de3028) at ./../Modules/main.c:625 #23 0x0805a75b in main (argc=1, argv=0xbf9fb0b4) at ./../Modules/python.c:70 ---------- assignee: tarek components: Build, Distutils, Installation files: ext1.c messages: 85853 nosy: chin, tarek severity: normal status: open title: Segfault when loading not recompiled module type: crash versions: Python 3.0 Added file: http://bugs.python.org/file13672/ext1.c _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Apr 11 14:15:18 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Sat, 11 Apr 2009 12:15:18 +0000 Subject: [issue5730] setdefault speedup In-Reply-To: <666A36BE-5DEB-4A8C-B524-FC6A4D89E071@colgate.edu> Message-ID: <49DF1236.5020304@v.loewis.de> Martin v. L?wis added the comment: > By the way, defaultdict is NOT like setdefault--it is like get(). > Missing entries do no get set. Why do you say that? __missing__(...) __missing__(key) # Called by __getitem__ for missing key; pseudo-code: if self.default_factory is None: raise KeyError((key,)) self[key] = value = self.default_factory() return value In all cases of setdefault that I know of, replacing this with a defaultdict would be appropriate. The only case where it wouldn't work is if the default value depends on the key. > What do you think? If no speedup can be demonstrated, we should not change it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 14:23:47 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 11 Apr 2009 12:23:47 +0000 Subject: [issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10 In-Reply-To: <1239226094.42.0.345959405343.issue5724@psf.upfronthosting.co.za> Message-ID: <1239452627.43.0.512422099508.issue5724@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 15:20:19 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 11 Apr 2009 13:20:19 +0000 Subject: [issue5733] py3_test_grammar.py syntax error In-Reply-To: <1239343700.07.0.933756737051.issue5733@psf.upfronthosting.co.za> Message-ID: <1239456019.0.0.0952866505591.issue5733@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Quite correct. ---------- nosy: +benjamin.peterson resolution: wont fix -> invalid status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 15:47:53 2009 From: report at bugs.python.org (Akira Kitada) Date: Sat, 11 Apr 2009 13:47:53 +0000 Subject: [issue5736] Add the iterator protocol to dbm modules In-Reply-To: <1239457673.6.0.50765651359.issue5736@psf.upfronthosting.co.za> Message-ID: <1239457673.6.0.50765651359.issue5736@psf.upfronthosting.co.za> New submission from Akira Kitada : In Python 2.6, dbm modules othar than bsddb don't support the iterator protocol. >>> import dbm >>> d = dbm.open('spam.dbm', 'c') >>> for k in range(5): d["key%d" % k] = "value%d" % k ... >>> for k in d: print k, d[k] ... Traceback (most recent call last): File "", line 1, in TypeError: 'dbm.dbm' object is not iterable Adding iterator support would make dbm modules more convenient and easier to use. ---------- components: Extension Modules messages: 85856 nosy: akitada severity: normal status: open title: Add the iterator protocol to dbm modules type: feature request versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 15:51:07 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sat, 11 Apr 2009 13:51:07 +0000 Subject: [issue5733] py3_test_grammar.py syntax error In-Reply-To: <1239343700.07.0.933756737051.issue5733@psf.upfronthosting.co.za> Message-ID: <1239457867.19.0.0729750609686.issue5733@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: So the error during libinstall should be ignored.... http://docs.python.org/dev/results/make-install.out ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 16:06:37 2009 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 11 Apr 2009 14:06:37 +0000 Subject: [issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10 In-Reply-To: <1239444748.97.0.373577421683.issue5724@psf.upfronthosting.co.za> Message-ID: <18912.41954.992558.972339@montanaro.dyndns.org> Skip Montanaro added the comment: Mark> Here's a patch that backports the corresponding changes from Mark> trunk. Mark> Skip, can you confirm that this fixes the issue? Indeed, your patch appears to fix the problem: % LD_LIBRARY_PATH=. ./python Lib/test/regrtest.py -v test_cmath test_cmath test_abs (test.test_cmath.CMathTests) ... ok test_cmath_matches_math (test.test_cmath.CMathTests) ... ok test_constants (test.test_cmath.CMathTests) ... ok test_input_type (test.test_cmath.CMathTests) ... ok test_isinf (test.test_cmath.CMathTests) ... ok test_isnan (test.test_cmath.CMathTests) ... ok test_phase (test.test_cmath.CMathTests) ... ok test_polar (test.test_cmath.CMathTests) ... ok test_rect (test.test_cmath.CMathTests) ... ok test_specific_values (test.test_cmath.CMathTests) ... ok test_user_object (test.test_cmath.CMathTests) ... ok ---------------------------------------------------------------------- Ran 11 tests in 0.063s OK 1 test OK. I'll leave it to you and Barry to consider if the patch is too hefty for backport. Skip ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 16:11:29 2009 From: report at bugs.python.org (Akira Kitada) Date: Sat, 11 Apr 2009 14:11:29 +0000 Subject: [issue5736] Add the iterator protocol to dbm modules In-Reply-To: <1239457673.6.0.50765651359.issue5736@psf.upfronthosting.co.za> Message-ID: <1239459089.3.0.568639974223.issue5736@psf.upfronthosting.co.za> Akira Kitada added the comment: Attached is a patch that adds the iterator protocol. Now it can be interated through like: >>> for k in d: print k, d[k] ... key1 vale1 key3 vale3 key0 vale0 key2 vale2 key4 vale4 The problem is there is no way to get the internal pointer back to the start. So Once it reached to the end, you are done. >>> for k in d: print k, d[k] ... The solution to this would be: - Add a method to get the pointer back to the start (with {first,next}key API) - Add a method that returns a generator ---------- keywords: +patch Added file: http://bugs.python.org/file13673/issue5736.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 16:24:55 2009 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 11 Apr 2009 14:24:55 +0000 Subject: [issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10 In-Reply-To: <18912.41954.992558.972339@montanaro.dyndns.org> Message-ID: <18912.43059.764143.728476@montanaro.dyndns.org> Skip Montanaro added the comment: FWIW, with the patch applied all tests still pass on Mac OS X 10.5.6 (Intel). S ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 16:25:18 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 11 Apr 2009 14:25:18 +0000 Subject: [issue5354] Add test.support.import_python_only In-Reply-To: <1235423974.71.0.0926342206599.issue5354@psf.upfronthosting.co.za> Message-ID: <1239459918.2.0.609238207934.issue5354@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ended up going for a slightly more general name "import_fresh_module". Reason being, test_warnings *also* wanted a fresh version of the accelerated module along with a pure Python version - it seemed silly to only factor out half of the problem into a support function, when the support function could handle both tasks fairly easily. So I implemented a version of the fresh import function that blocks no extension modules by default, but still accepts a list of names to be disabled during the import. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 16:28:49 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 11 Apr 2009 14:28:49 +0000 Subject: [issue5354] Add test.support.import_python_only In-Reply-To: <1235423974.71.0.0926342206599.issue5354@psf.upfronthosting.co.za> Message-ID: <1239460129.59.0.324151081249.issue5354@psf.upfronthosting.co.za> Nick Coghlan added the comment: Implemented for 2.7 in r71465 Implemented for 3.1 in r7146 Leaving issue open for the moment - the 3.1 test_warnings fails if I don't get a fresh copy of _warnings before running the unit tests. I want to figure out why that is necessary before closing the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 16:29:01 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 11 Apr 2009 14:29:01 +0000 Subject: [issue5354] Add test.support.import_python_only In-Reply-To: <1235423974.71.0.0926342206599.issue5354@psf.upfronthosting.co.za> Message-ID: <1239460141.07.0.443983553177.issue5354@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 16:31:12 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 11 Apr 2009 14:31:12 +0000 Subject: [issue5354] Add test.support.import_python_only In-Reply-To: <1235423974.71.0.0926342206599.issue5354@psf.upfronthosting.co.za> Message-ID: <1239460272.28.0.357232430739.issue5354@psf.upfronthosting.co.za> Nick Coghlan added the comment: Implemented for 2.7 in r71465 Implemented for 3.1 in r71469 Leaving issue open for the moment - the 3.1 test_warnings fails if I don't get a fresh copy of _warnings before running the unit tests. I want to figure out why that is necessary before closing the issue. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sat Apr 11 17:17:47 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sat, 11 Apr 2009 15:17:47 +0000 Subject: [issue5732] add a new command called "check" into Distutils In-Reply-To: <1239318936.64.0.115245902927.issue5732@psf.upfronthosting.co.za> Message-ID: <1239463067.78.0.641859235344.issue5732@psf.upfronthosting.co.za> Tarek Ziad? added the comment: 'check' added in r71473 and r71473 Now working on sdist and register so they use it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 17:39:47 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 11 Apr 2009 15:39:47 +0000 Subject: [issue5502] io-c: TextIOWrapper is faster than BufferedReader but not protected by a lock In-Reply-To: <1237338972.64.0.602798435318.issue5502@psf.upfronthosting.co.za> Message-ID: <1239464387.21.0.68241363852.issue5502@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r71483. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 17:59:55 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 11 Apr 2009 15:59:55 +0000 Subject: [issue5733] ignore py3_test_grammar.py syntax error In-Reply-To: <1239343700.07.0.933756737051.issue5733@psf.upfronthosting.co.za> Message-ID: <1239465595.7.0.345303830209.issue5733@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Oh, indeed. I wonder what the best way to do that is? ---------- assignee: collinwinter -> resolution: invalid -> status: closed -> open title: py3_test_grammar.py syntax error -> ignore py3_test_grammar.py syntax error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 18:14:08 2009 From: report at bugs.python.org (Akira Kitada) Date: Sat, 11 Apr 2009 16:14:08 +0000 Subject: [issue5736] Add the iterator protocol to dbm modules In-Reply-To: <1239457673.6.0.50765651359.issue5736@psf.upfronthosting.co.za> Message-ID: <1239466448.84.0.813824842578.issue5736@psf.upfronthosting.co.za> Akira Kitada added the comment: Revised patch adds firstkey and nextkey to dbm. Now the internal pointer can be reset with firstkey. ---------- Added file: http://bugs.python.org/file13674/issue5736.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 19:05:50 2009 From: report at bugs.python.org (Matthew Ahrens) Date: Sat, 11 Apr 2009 17:05:50 +0000 Subject: [issue5737] add Solaris errnos In-Reply-To: <1239469549.92.0.788554665966.issue5737@psf.upfronthosting.co.za> Message-ID: <1239469549.92.0.788554665966.issue5737@psf.upfronthosting.co.za> New submission from Matthew Ahrens : The "errno" module does not contain some error names/numbers that are used on Solaris. Please add them. from /usr/include/sys/errno.h: #define ECANCELED 47 /* Operation canceled */ #define ENOTSUP 48 /* Operation not supported */ /* Interprocess Robust Locks */ #define EOWNERDEAD 58 /* process died with the lock */ #define ENOTRECOVERABLE 59 /* lock is not recoverable */ #define ELOCKUNMAPPED 72 /* locked lock was unmapped */ #define ENOTACTIVE 73 /* Facility is not active */ ---------- components: Library (Lib) messages: 85868 nosy: mahrens severity: normal status: open title: add Solaris errnos type: feature request versions: Python 2.4, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 19:06:49 2009 From: report at bugs.python.org (Kuang-che Wu) Date: Sat, 11 Apr 2009 17:06:49 +0000 Subject: [issue1751245] Popen pipe file descriptor leak on OSError in init Message-ID: <1239469609.58.0.0728638407873.issue1751245@psf.upfronthosting.co.za> Kuang-che Wu added the comment: this is duplicated to issue 5179 and is fixed in trunk ---------- nosy: +kcwu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 19:50:53 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 11 Apr 2009 17:50:53 +0000 Subject: [issue5734] BufferedRWPair broken In-Reply-To: <1239446469.87.0.208856663223.issue5734@psf.upfronthosting.co.za> Message-ID: <1239472253.11.0.959905626681.issue5734@psf.upfronthosting.co.za> Brian Quinlan added the comment: Hey Antoine, Will do - but first I'll finish up my reason for needing a working version of this class in the first place ;-) Cheers, Brian ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 20:08:05 2009 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 11 Apr 2009 18:08:05 +0000 Subject: [issue4753] Faster opcode dispatch on gcc In-Reply-To: <1230325778.98.0.752974375077.issue4753@psf.upfronthosting.co.za> Message-ID: <1239473285.89.0.388518844872.issue4753@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- nosy: -alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 20:34:56 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 11 Apr 2009 18:34:56 +0000 Subject: [issue1751245] Popen pipe file descriptor leak on OSError in init Message-ID: <1239474896.39.0.844260676058.issue1751245@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 21:31:16 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 11 Apr 2009 19:31:16 +0000 Subject: [issue5733] ignore py3_test_grammar.py syntax error In-Reply-To: <1239343700.07.0.933756737051.issue5733@psf.upfronthosting.co.za> Message-ID: <1239478276.01.0.104010885325.issue5733@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Should be fixed in r71494. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 21:36:32 2009 From: report at bugs.python.org (Brett Cannon) Date: Sat, 11 Apr 2009 19:36:32 +0000 Subject: [issue5354] Add test.support.import_python_only In-Reply-To: <1239460129.59.0.324151081249.issue5354@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Sat, Apr 11, 2009 at 07:28, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Implemented for 2.7 in r71465 > Implemented for 3.1 in r7146 > Style nit: why the extra check for block_names being None to later set it to an empty tuple? Why not make the default argument the empty tuple? > > Leaving issue open for the moment - the 3.1 test_warnings fails if I > don't get a fresh copy of _warnings before running the unit tests. I > want to figure out why that is necessary before closing the issue. Might have to do with _warnings trying to import warnings for certain things in certain cases. And just something I thought about, Nick, is possibly coming up with a class decorator that sets self.module on the class. This could have the perk of taking an optional argument that checks if the optimized module is even in existence so as to skip running the tests twice if it is not needed. Then again this might over-optimizing and best to just let the tests run twice even if it is not needed. ---------- Added file: http://bugs.python.org/file13675/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------

On Sat, Apr 11, 2009 at 07:28, Nick Coghlan <report at bugs.python.org> wrote:

Nick Coghlan <ncoghlan at gmail.com> added the comment:

Implemented for 2.7 in r71465
Implemented for 3.1 in r7146

Style nit: why the extra check for block_names being None to later set it to an empty tuple? Why not make the default argument the empty tuple?
??

Leaving issue open for the moment - the 3.1 test_warnings fails if I
don't get a fresh copy of _warnings before running the unit tests. I
want to figure out why that is necessary before closing the issue.

Might have to do with _warnings trying to import warnings for certain things in certain cases.

And just something I thought about, Nick, is possibly coming up with a class decorator that sets self.module on the class. This could have the perk of taking an optional argument that checks if the optimized module is even in existence so as to skip running the tests twice if it is not needed. Then again this might over-optimizing and best to just let the tests run twice even if it is not needed.
From report at bugs.python.org Sat Apr 11 22:52:13 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 11 Apr 2009 20:52:13 +0000 Subject: [issue5623] test_fdopen fails with vs2005, release build on Windows 2000 In-Reply-To: <1238513083.42.0.065691454167.issue5623@psf.upfronthosting.co.za> Message-ID: <1239483133.76.0.602631077992.issue5623@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Could someone port this to 3.1, please? I'm not Windows savy enough to do it. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 22:53:57 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sat, 11 Apr 2009 20:53:57 +0000 Subject: [issue5738] multiprocessing example wrong In-Reply-To: <1239483237.04.0.0741779763922.issue5738@psf.upfronthosting.co.za> Message-ID: <1239483237.04.0.0741779763922.issue5738@psf.upfronthosting.co.za> New submission from Garrett Cooper : The last example on the multiprocessing documentation page is clearly wrong. It references a lot of renamed / deprecated API's from processing that are no longer in multiprocessing. I'll try and come up with a comparable working example on all platforms (I use FreeBSD). ---------- assignee: georg.brandl components: Documentation messages: 85874 nosy: georg.brandl, yaneurabeya severity: normal status: open title: multiprocessing example wrong type: feature request versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 22:55:01 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 11 Apr 2009 20:55:01 +0000 Subject: [issue5738] multiprocessing example wrong In-Reply-To: <1239483237.04.0.0741779763922.issue5738@psf.upfronthosting.co.za> Message-ID: <1239483301.52.0.741519012458.issue5738@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: georg.brandl -> jnoller nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 22:56:43 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 11 Apr 2009 20:56:43 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1239483403.11.0.5110249514.issue5665@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Collin, can you port these new tests to Py3k? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 22:57:04 2009 From: report at bugs.python.org (Jesse Noller) Date: Sat, 11 Apr 2009 20:57:04 +0000 Subject: [issue5738] multiprocessing example wrong In-Reply-To: <1239483237.04.0.0741779763922.issue5738@psf.upfronthosting.co.za> Message-ID: <1239483424.31.0.44936615051.issue5738@psf.upfronthosting.co.za> Jesse Noller added the comment: Ugh, I thought that was cleaned up. Don't bother with FreeBSD, or any other BSDes. If you're willing to do it, just make it work on linux. MP support on BSD is severely broken right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 11 23:35:46 2009 From: report at bugs.python.org (Senthil) Date: Sat, 11 Apr 2009 21:35:46 +0000 Subject: [issue754016] urlparse goes wrong with IP:port without scheme Message-ID: <1239485746.39.0.268639166546.issue754016@psf.upfronthosting.co.za> Senthil added the comment: Facundo, I re-looked at this issue (after a long time; sorry for that) and I think that the patch is good to be applied as it is for this issue. The Web-SIG discussion, which you pointed to in the comment (http://mail.python.org/pipermail/web-sig/2008-June/003458.html) suggests a more "general case" of thinking and parsing of the urls. The suggestion is specifically for "//path" kind of urls, which is will be parsed into authority (as per RFC2396) or into netloc as in the patch. My suggestion is to fix this issue with patch and if the corner case like "//path" comes up, then I shall look the modifications required as there is No RFC Specifications and Tests defining those cases. Your comments? ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Apr 11 23:50:40 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Sat, 11 Apr 2009 21:50:40 +0000 Subject: [issue5735] Segfault when loading not recompiled module In-Reply-To: <1239448122.29.0.383715698899.issue5735@psf.upfronthosting.co.za> Message-ID: <1239486640.61.0.0361119890304.issue5735@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sun Apr 12 00:03:39 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Sat, 11 Apr 2009 22:03:39 +0000 Subject: [issue5736] Add the iterator protocol to dbm modules In-Reply-To: <1239457673.6.0.50765651359.issue5736@psf.upfronthosting.co.za> Message-ID: <1239487419.62.0.249818169865.issue5736@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Would you like to fix gdbm as well? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 01:12:07 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sat, 11 Apr 2009 23:12:07 +0000 Subject: [issue5738] multiprocessing example wrong In-Reply-To: <1239483237.04.0.0741779763922.issue5738@psf.upfronthosting.co.za> Message-ID: <1239491527.21.0.422884086124.issue5738@psf.upfronthosting.co.za> Garrett Cooper added the comment: How about this? I'll do both :). I'm avoiding sync + semaphore stuff because it's still non-portable (Issue 3770 fun), even though I have a functioning copy of FreeBSD... but I do have a Mac, VMware fusion, etc, and I'll toss in a working example with Fedora 10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 02:35:38 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Apr 2009 00:35:38 +0000 Subject: [issue5354] Add test.support.import_python_only In-Reply-To: <1235423974.71.0.0926342206599.issue5354@psf.upfronthosting.co.za> Message-ID: <1239496538.6.0.688836268612.issue5354@psf.upfronthosting.co.za> Nick Coghlan added the comment: The None->tuple check is a legacy of the original API where "None" actually meant to block "_name". I'll change it as you suggest. Your explanation as to why the test was failing in py3k makes sense. I think I will tidy that use case up a bit by adding a "fresh=()" argument to the function to go along with the "blocked=()" argument. Then the two warnings imports would be: py_warnings = support.import_fresh_module('warnings', blocked=['_warnings'] c_warnings = support.import_fresh_module('warnings', fresh=['_warnings'] On the last topic, implementations that don't have an accelerated version of a module can use the new features for marking implementation specific tests to skip over those ones. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 02:45:54 2009 From: report at bugs.python.org (Naoki INADA) Date: Sun, 12 Apr 2009 00:45:54 +0000 Subject: [issue1542677] IDLE shell gives different len() of unicode strings compared to Python shell Message-ID: <1239497154.87.0.635159253865.issue1542677@psf.upfronthosting.co.za> Naoki INADA added the comment: This issue is caused by compile() behavior. Following sample is in codepage 932. >>> '?' '\x82\xa0' # OK - '?' is '\x82\xa0' in cp932 >>> u'?' u'\u3042' # OK - u'?' is '\u3042' in UCS-2 compile as byte string. >>> c = compile("'?'", 'test', 'single') >>> exec c '\x82\xa0' # OK >>> c = compile("u'?'", 'test', 'single') >>> exec c u'\x82\xa0' # NG!!! compile as unicode string. >>> c = compile(u"'?'", 'test', 'single') >>> exec c '\xe3\x81\x82' # NG!!! >>> c = compile(u"u'?'", 'test', 'single') >>> exec c u'\u3042' # OK compile as byte string with pep 0263 >>> c = compile("# coding: mbcs\n'?'", 'test', 'single') >>> exec c '\x82\xa0' # OK >>> c = compile("# coding: mbcs\nu'?'", 'test', 'single') >>> exec c u'\u3042' # OK ---------- nosy: +naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 02:54:40 2009 From: report at bugs.python.org (Naoki INADA) Date: Sun, 12 Apr 2009 00:54:40 +0000 Subject: [issue1542677] IDLE shell gives different len() of unicode strings compared to Python shell Message-ID: <1239497680.33.0.162795242404.issue1542677@psf.upfronthosting.co.za> Naoki INADA added the comment: This patch is for iplib/PyShell.py#ModifiedInterpreter.runsource. if isinstance(source, types.UnicodeType): import IOBinding try: source = source.encode(IOBinding.encoding) + source = "# coding: %s\n%s" % (IOBinding.encoding, source) except UnicodeError: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 02:58:27 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Apr 2009 00:58:27 +0000 Subject: [issue5739] Language reference is ambiguous regarding next() method lookup In-Reply-To: <1239497907.46.0.481458734082.issue5739@psf.upfronthosting.co.za> Message-ID: <1239497907.46.0.481458734082.issue5739@psf.upfronthosting.co.za> New submission from Nick Coghlan : The language reference is currently silent as to whether or not an iterator's next() method is looked up on every pass around a for loop, or whether it is OK for an implementation to look the method up once at the start of the loop, cache the result and call it again each time around the loop without doing the lookup again. The language reference should require implementations to follow CPython's behaviour in this respect: the method should be looked up again on each pass around the loop. As per this email on python-ideas: http://mail.python.org/pipermail/python-ideas/2009-April/004083.html ---------- assignee: georg.brandl components: Documentation messages: 85883 nosy: georg.brandl, ncoghlan priority: normal severity: normal status: open title: Language reference is ambiguous regarding next() method lookup type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 02:58:54 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 12 Apr 2009 00:58:54 +0000 Subject: [issue5730] setdefault speedup In-Reply-To: <1239305730.8.0.484085764135.issue5730@psf.upfronthosting.co.za> Message-ID: <1239497934.31.0.271829015803.issue5730@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I would support fixing the double call to PyObject_Hash(). For user defined classes with their own __hash__ methods, this is by far the slowest part of the operation. > from my perspective creating an internal SetItem adds another > function handling the data structure just as setdefault would Incorrect comparison. Your in-lining manipulated the ep structure directly (not a good thing). In contrast, adding an alternative _PyDict_SetItemWithHash uses the insertdict() function, fully isolating itself of from the table implementation. The whole purpose of having insertdict() and lookdict() is to isolate the data structure internals from all externally visible functions. >>> setup = ''' class A(object): def __hash__(self): return 10 class B(object): pass a = A() b = B() ''' >>> min(Timer('{}.setdefault(a, 0)', setup).repeat(7, 100000)) 0.12840011789208106 >>> min(Timer('{}.setdefault(b, 0)', setup).repeat(7, 100000)) 0.053155359130840907 The double call to a very simple user defined __hash__ adds .07 to call that takes on .05 with the double call to builtin object hash. So, we could save half of the the .07 just by elimating the double call to __hash__. With more complex hash functions the overall speedup is huge (essentially cutting the total work almost in half). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 06:38:01 2009 From: report at bugs.python.org (Collin Winter) Date: Sun, 12 Apr 2009 04:38:01 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1239511081.54.0.318642738169.issue5665@psf.upfronthosting.co.za> Collin Winter added the comment: Yes, I'm porting them. I got started, but got distracted by other things since there were a lot of conflicts in the merge ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 11:02:32 2009 From: report at bugs.python.org (Santiago Gala) Date: Sun, 12 Apr 2009 09:02:32 +0000 Subject: [issue1542677] IDLE shell gives different len() of unicode strings compared to Python shell Message-ID: <1239526952.71.0.692053615077.issue1542677@psf.upfronthosting.co.za> Santiago Gala added the comment: Updating the components as the error surfaces in the compile builtin. the compile builtin works when given unicode, but fails when using a utf8 (local input encoding) string. Rather than adding a "coding" string to compile, my guess is that compile should be fixed or fed a unicode string. See the effects on the shell: >>> print len('?') 2 >>> print len(u'?') 1 >>> exec compile("print len('?')",'test', 'single') 2 >>> exec compile("print len(u'?')",'test', 'single') 2 >>> exec compile("print len('?')".decode("utf8"),'test', 'single') 2 >>> exec compile("print len(u'?')".decode("utf8"),'test', 'single') 1 >>> So the error disappears when the string fed to exec compile is properly decoded to unicode. In idlelib there is an attempt to encode the input to IOBindings.encoding, but IOBindings.encoding is broken here, as locale.nl_langinfo(locale.CODESET) gives 'ANSI_X3.4-1968', which looks up as 'ascii', while locale.getpreferredencoding() gives 'UTF-8' (as it should). If I comment the whole attempt, idle works (for this test, not fully tested): sgala at marlow ~ $ diff -u /tmp/PyShell.py /usr/lib64/python2.6/idlelib/PyShell.py --- /tmp/PyShell.py 2009-04-12 11:01:01.000000000 +0200 +++ /usr/lib64/python2.6/idlelib/PyShell.py 2009-04-12 10:59:16.000000000 +0200 @@ -592,14 +592,14 @@ self.more = 0 self.save_warnings_filters = warnings.filters[:] warnings.filterwarnings(action="error", category=SyntaxWarning) - if isinstance(source, types.UnicodeType): - import IOBinding - try: - source = source.encode(IOBinding.encoding) - except UnicodeError: - self.tkconsole.resetoutput() - self.write("Unsupported characters in input\n") - return + #if isinstance(source, types.UnicodeType): + # import IOBinding + # try: + # source = source.encode(IOBinding.encoding) + # except UnicodeError: + # self.tkconsole.resetoutput() + # self.write("Unsupported characters in input\n") + # return try: # InteractiveInterpreter.runsource() calls its runcode() method, # which is overridden (see below) >>> print len('?') 2 >>> print len(u'?') 1 >>> print '?' ? >>> print u'?' ? >>> Now using Python 2.6.1 (r261:67515, Apr 10 2009, 14:34:00) on x86_64 ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 11:45:28 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 12 Apr 2009 09:45:28 +0000 Subject: [issue5740] multiprocessing.connection.Client API documentation incorrect In-Reply-To: <1239529527.71.0.759387601738.issue5740@psf.upfronthosting.co.za> Message-ID: <1239529527.71.0.759387601738.issue5740@psf.upfronthosting.co.za> New submission from Garrett Cooper : In the API for connections.Client, it says: multiprocessing.connection.Client(address[, family[, authenticate[, authkey]]]) In the final paragraph is says: `If authentication is True or authkey ' As per the API provided it should be: `If authenticate is True or authkey ' This is true for the 2.6.1 and 3.1 documentation, so I assume it's incorrect for the 2.7 and 3.0 documentation as well. ---------- assignee: georg.brandl components: Documentation messages: 85887 nosy: georg.brandl, jnoller, yaneurabeya severity: normal status: open title: multiprocessing.connection.Client API documentation incorrect versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 11:47:39 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 12 Apr 2009 09:47:39 +0000 Subject: [issue5736] Add the iterator protocol to dbm modules In-Reply-To: <1239457673.6.0.50765651359.issue5736@psf.upfronthosting.co.za> Message-ID: <1239529659.3.0.960618338891.issue5736@psf.upfronthosting.co.za> Akira Kitada added the comment: Here's another patch which addsd iter to dbm and gdbm. Note that dbm and gdbm C API is a little different. gdbm_nextkey requires key for its argument, dbm_nextkey don't. So I had to use for gdbm an static variable that points to the current position. Now iterator in gdbm and dbm works differently. >>> import dbm >>> d = dbm.open('foo', 'n') >>> d['k1'] = 'v1';d['k2'] = 'v2'; >>> for i in d: print i; break ... k1 >>> for i in d: print i ... k2 >>> for i in d: print i ... >>> import gdbm >>> gd = gdbm.open('foo.gdbm', 'n') >>> gd['k1'] = 'v1';gd['k2'] = 'v2'; >>> for i in gd: print i; break ... k2 >>> for i in gd: print i for i in gd: print i ... k1 >>> for i in gd: print i ... k2 k1 ---------- Added file: http://bugs.python.org/file13676/issue5736.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 12:11:43 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 12 Apr 2009 10:11:43 +0000 Subject: [issue5736] Add the iterator protocol to dbm modules In-Reply-To: <1239457673.6.0.50765651359.issue5736@psf.upfronthosting.co.za> Message-ID: <1239531103.3.0.905129165828.issue5736@psf.upfronthosting.co.za> Akira Kitada added the comment: Of course iter should work in the same way in all dbm modules. iter in dbm/gdbm should work like dumbdbm's iter. >>> dumb = dumbdbm.open('foo', 'n') >>> dumb['k1'] = 'v1';dumb['k2'] = 'v2'; >>> for i in dumb: print i; break ... k2 >>> for i in dumb: print i for i in dumb: print i ... k2 k1 >>> for i in dumb: print i for i in dumb: print i ... k2 k1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 12:25:29 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sun, 12 Apr 2009 10:25:29 +0000 Subject: [issue5700] io.FileIO calls flush() after file closed In-Reply-To: <1238945758.46.0.01809197792.issue5700@psf.upfronthosting.co.za> Message-ID: <1239531929.1.0.968447081403.issue5700@psf.upfronthosting.co.za> Changes by Brian Quinlan : Added file: http://bugs.python.org/file13677/cooperation.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 12:33:09 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sun, 12 Apr 2009 10:33:09 +0000 Subject: [issue5700] io.FileIO calls flush() after file closed In-Reply-To: <1238945758.46.0.01809197792.issue5700@psf.upfronthosting.co.za> Message-ID: <1239532389.3.0.650746174894.issue5700@psf.upfronthosting.co.za> Brian Quinlan added the comment: cooperation.diff: - change the close method to call .flush() and then ._close() - only IOBase implements close() (though a subclass can override close without causing problems - so long as it calls super().close()) - .flush() invokes super().flush() - ._close() invokes super()._close() - FileIO is implemented in Python in _pyio.py so that it can have the same base class as the other Python-implemented files classes - tests verify that .flush() is not called after the file is closed - tests verify that ._close()/.flush() calls move correctly are propagated correctly ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 12:40:45 2009 From: report at bugs.python.org (Naoki INADA) Date: Sun, 12 Apr 2009 10:40:45 +0000 Subject: [issue1542677] IDLE shell gives different len() of unicode strings compared to Python shell Message-ID: <1239532845.85.0.768059245132.issue1542677@psf.upfronthosting.co.za> Naoki INADA added the comment: utf-8 is not locale encoding. >>> f = open('?.txt') If this line compiled into utf-8 and locale encoding is not utf-8, can't open '?.txt'. IMHO, in case of Python 2.x, correct approach is fix IOBindings.encoding and compile() with pep0263. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 13:04:20 2009 From: report at bugs.python.org (Naoki INADA) Date: Sun, 12 Apr 2009 11:04:20 +0000 Subject: [issue1542677] IDLE shell gives different len() of unicode strings compared to Python shell Message-ID: <1239534260.19.0.349075523492.issue1542677@psf.upfronthosting.co.za> Naoki INADA added the comment: How to use locale.getpreferredencoding() instead of locale.nl_langinfo(locale.CODESET). --- IOBinding.py.back Sun Apr 12 19:54:52 2009 +++ IOBinding.py Sun Apr 12 20:02:58 2009 @@ -35,40 +35,16 @@ # Encoding for file names filesystemencoding = sys.getfilesystemencoding() -encoding = "ascii" -if sys.platform == 'win32': - # On Windows, we could use "mbcs". However, to give the user - # a portable encoding name, we need to find the code page - try: - encoding = locale.getdefaultlocale()[1] - codecs.lookup(encoding) - except LookupError: - pass -else: - try: - # Different things can fail here: the locale module may not be - # loaded, it may not offer nl_langinfo, or CODESET, or the - # resulting codeset may be unknown to Python. We ignore all - # these problems, falling back to ASCII - encoding = locale.nl_langinfo(locale.CODESET) - if encoding is None or encoding is '': - # situation occurs on Mac OS X - encoding = 'ascii' - codecs.lookup(encoding) - except (NameError, AttributeError, LookupError): - # Try getdefaultlocale well: it parses environment variables, - # which may give a clue. Unfortunately, getdefaultlocale has - # bugs that can cause ValueError. - try: - encoding = locale.getdefaultlocale()[1] - if encoding is None or encoding is '': - # situation occurs on Mac OS X - encoding = 'ascii' - codecs.lookup(encoding) - except (ValueError, LookupError): - pass +encoding = "utf-8" -encoding = encoding.lower() +preferredencoding = None +try: + preferredencoding = locale.getpreferredencoding() + codecs.lookup(preferredencoding) + encoding = preferredencoding.lower() +except LookupError: + pass +del preferredencoding coding_re = re.compile("coding[:=]\s*([-\w_.]+)") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 13:34:23 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 12 Apr 2009 11:34:23 +0000 Subject: [issue2725] Handle ASDLSyntaxErrors gracefully In-Reply-To: <1209557288.23.0.65253319009.issue2725@psf.upfronthosting.co.za> Message-ID: <1239536063.02.0.065577838339.issue2725@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed a similar patch in r71505. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 13:34:39 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 12 Apr 2009 11:34:39 +0000 Subject: [issue5700] io.FileIO calls flush() after file closed In-Reply-To: <1238945758.46.0.01809197792.issue5700@psf.upfronthosting.co.za> Message-ID: <1239536079.73.0.585174915416.issue5700@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > - FileIO is implemented in Python in _pyio.py so that it can have the > same base class as the other Python-implemented files classes Is it really necessary (e.g. to pass the tests)? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 13:34:48 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 12 Apr 2009 11:34:48 +0000 Subject: [issue5706] setuptools doesn't honor standard compiler variables In-Reply-To: <1238992798.79.0.661202545175.issue5706@psf.upfronthosting.co.za> Message-ID: <1239536088.28.0.856392012404.issue5706@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> tarek nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 13:50:41 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sun, 12 Apr 2009 11:50:41 +0000 Subject: [issue5700] io.FileIO calls flush() after file closed In-Reply-To: <1238945758.46.0.01809197792.issue5700@psf.upfronthosting.co.za> Message-ID: <1239537041.45.0.943211184648.issue5700@psf.upfronthosting.co.za> Brian Quinlan added the comment: >> - FileIO is implemented in Python in _pyio.py so that it can have the >> same base class as the other Python-implemented files classes > Is it really necessary (e.g. to pass the tests)? It is necessary to make MI work. With out it the inheritance graph looks like this (using _pyio): io.IOBase _pyio.IOBase | | io.FileIO MyMixin | | \ / \ / \ / MyClass If you call MyClass.flush() with this hierarchy then it will propagate to io.IOBase. Since io.IOBase doesn't call super().flush() in its flush implementation (because it has no super class), flush propagation would stop and MyMixin.flush wouldn't be called. There are other ways you could solve this, of course, like getting io.IOBase to call super().flush and ignore any errors that it gets. But it seems like this is the right way to fix this problem anyway - as a user, I would expect isinstance(FileIO(...), IOBase) but that is not currently the case with _pyio. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 14:01:58 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 12 Apr 2009 12:01:58 +0000 Subject: [issue5708] Tiny code polishing to unicode_repeat In-Reply-To: <1239007305.41.0.910418406517.issue5708@psf.upfronthosting.co.za> Message-ID: <1239537718.94.0.970697722859.issue5708@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r71506. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 14:08:30 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 12 Apr 2009 12:08:30 +0000 Subject: [issue5704] Command line option '-3' should imply '-t' In-Reply-To: <1238970289.11.0.298374772869.issue5704@psf.upfronthosting.co.za> Message-ID: <1239538110.39.0.426708463081.issue5704@psf.upfronthosting.co.za> Georg Brandl added the comment: Added in r71507. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 14:23:39 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 12 Apr 2009 12:23:39 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1239539019.46.0.23213637423.issue5665@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Ok. Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 14:23:58 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 12 Apr 2009 12:23:58 +0000 Subject: [issue1720250] PyGILState_Ensure does not acquires GIL Message-ID: <1239539038.23.0.565899960249.issue1720250@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: georg.brandl -> _______________________________________ Python tracker _______________________________________ From =?utf-8?q?M=C3=A1rcio_Faustino_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sun Apr 12 14:35:10 2009 From: =?utf-8?q?M=C3=A1rcio_Faustino_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?M=C3=A1rcio_Faustino_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sun, 12 Apr 2009 12:35:10 +0000 Subject: [issue5741] SafeConfigParser incorrectly detects lone percent signs In-Reply-To: <1239539710.2.0.0497586832683.issue5741@psf.upfronthosting.co.za> Message-ID: <1239539710.2.0.0497586832683.issue5741@psf.upfronthosting.co.za> New submission from M?rcio Faustino : The SafeConfigParser class incorrectly detects lone percent signs, for example, it doesn't accept "100%%" as a valid value. The cause of this is the "_badpercent_re" regular expression: - The first alternative "%[^%]" fails with the string "%%_", because it matches "%_". - The second alternative "%$" fails with the string "%%", because it matches "%". --- from ConfigParser import * SafeConfigParser().set('DEFAULT', 'test', '100%%') ---------- components: Library (Lib) messages: 85899 nosy: marcio severity: normal status: open title: SafeConfigParser incorrectly detects lone percent signs type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 14:54:29 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 12 Apr 2009 12:54:29 +0000 Subject: [issue5700] io.FileIO calls flush() after file closed In-Reply-To: <1239537041.45.0.943211184648.issue5700@psf.upfronthosting.co.za> Message-ID: <1239540960.9257.11.camel@fsol> Antoine Pitrou added the comment: > It is necessary to make MI work. With out it the inheritance graph looks > like this (using _pyio): > > > io.IOBase _pyio.IOBase > | | > io.FileIO MyMixin > | | > \ / > \ / > \ / > MyClass MyMixin doesn't need to inherit from IOBase, since precisely it is a mixin. It's just a piece of functionality that you drop into an already existing inheritance tree. > But it seems like this is the right way to fix this problem anyway - as > a user, I would expect isinstance(FileIO(...), IOBase) but that is not > currently the case with _pyio. That's because the reference ABCs are defined in the io module, not in _pyio: True >>> issubclass(_pyio.FileIO, io.IOBase) True >>> issubclass(io.TextIOWrapper, io.IOBase) True >>> issubclass(_pyio.TextIOWrapper, io.IOBase) True _pyio.IOBase and friends are just concrete implementations of those ABCs: True >>> issubclass(_pyio.TextIOBase, io.TextIOBase) True I know it looks a bit non-intuitive at first, but the point is that the ABCs are unified, even there are two different implementations. I think it's better than having two different sets of ABCs depending on whether you import the pure-Python version or the C version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 15:44:24 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sun, 12 Apr 2009 13:44:24 +0000 Subject: [issue5700] io.FileIO calls flush() after file closed In-Reply-To: <1239540960.9257.11.camel@fsol> Message-ID: <49E1F032.1060109@sweetapp.com> Brian Quinlan added the comment: Antoine Pitrou wrote: > Antoine Pitrou added the comment: > >> It is necessary to make MI work. With out it the inheritance graph looks >> like this (using _pyio): >> >> >> io.IOBase _pyio.IOBase >> | | >> io.FileIO MyMixin >> | | >> \ / >> \ / >> \ / >> MyClass > > MyMixin doesn't need to inherit from IOBase, since precisely it is a > mixin. It's just a piece of functionality that you drop into an already > existing inheritance tree. In my implementation, it does. Otherwise the linearization of the class hierarchy becomes: MyClass -> io.FileIO -> io.IOBase -> MyMixin (-> _pyio.IOBase) But io.IOBase doesn't make super calls so MyMixin method won't be called. I think that this linearization is probably more useful: MyClass -> io.FileIO -> MyMixin -> IOBase And you get that when io.FileIO and MyMixin share the same IOBase as a base class. I don't mind changing io.IOBase to make super calls in ._close() and .flush() and suppressing the attributes errors that will be generated if a mixin is not present - but it feels a bit untidy to me. [snipped] > I know it looks a bit non-intuitive at first, but the point is that the > ABCs are unified, even there are two different implementations. I think > it's better than having two different sets of ABCs depending on whether > you import the pure-Python version or the C version. I'm not trying to change the ABC unification at all - and if I did then there is a bug in my code. I just think that the immediate parent class of _pyio.FileIO should be _pyio.IOBase (just like _io.FileIO has _io.IOBase as an immediate parent). That will make the Python and C class hierarchies completely consistent within themselves. Cheers, Brian ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 15:48:20 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 12 Apr 2009 13:48:20 +0000 Subject: [issue5700] io.FileIO calls flush() after file closed In-Reply-To: <49E1F032.1060109@sweetapp.com> Message-ID: <1239544193.9257.14.camel@fsol> Antoine Pitrou added the comment: > I think that this linearization is probably more useful: > > MyClass -> io.FileIO -> MyMixin -> IOBase But why not simply: MyClass -> MyMixin -> io.FileIO -> IOBase ? Is there something I'm missing that prevents you from doing this? > I'm not trying to change the ABC unification at all - and if I did then > there is a bug in my code. I just think that the immediate parent class > of _pyio.FileIO should be _pyio.IOBase (just like _io.FileIO has > _io.IOBase as an immediate parent). That will make the Python and C > class hierarchies completely consistent within themselves. I understand, but that's at the price of an otherwise useless indirection layer, which will also make _pyio even slower that it already is :-) (I admit, however, that _pyio shouldn't be used in normal circumstances, so this is not a showstopper argument) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 16:14:25 2009 From: report at bugs.python.org (Jesse Noller) Date: Sun, 12 Apr 2009 14:14:25 +0000 Subject: [issue5740] multiprocessing.connection.Client API documentation incorrect In-Reply-To: <1239529527.71.0.759387601738.issue5740@psf.upfronthosting.co.za> Message-ID: <1239545665.99.0.450894086924.issue5740@psf.upfronthosting.co.za> Jesse Noller added the comment: Will fix tomorrow ---------- assignee: georg.brandl -> jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 17:52:03 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 12 Apr 2009 15:52:03 +0000 Subject: [issue5675] string module requires bytes type for maketrans, but calling method on regular string does not In-Reply-To: <1238716476.0.0.609350611694.issue5675@psf.upfronthosting.co.za> Message-ID: <1239551523.28.0.0907515729319.issue5675@psf.upfronthosting.co.za> Georg Brandl added the comment: This is (kind of) intentional. string.maketrans operates on bytes, not string objects. However, this is quite confusing, so I added bytes.maketrans() now in py3k, and deprecated string.maketrans(). (r71521) ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 18:19:42 2009 From: report at bugs.python.org (Eric Smith) Date: Sun, 12 Apr 2009 16:19:42 +0000 Subject: [issue4799] handling inf/nan in '%f' In-Reply-To: <1230796367.25.0.681154044554.issue4799@psf.upfronthosting.co.za> Message-ID: <1239553182.4.0.275985605177.issue4799@psf.upfronthosting.co.za> Eric Smith added the comment: I believe this is a duplicate of issue 4482. I'm closing this and will add everyone who is nosy on this to be nosy on 4482. ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 18:23:16 2009 From: report at bugs.python.org (Eric Smith) Date: Sun, 12 Apr 2009 16:23:16 +0000 Subject: [issue4482] 10e667.__format__('+') should return 'inf' In-Reply-To: <1228153945.74.0.126553636811.issue4482@psf.upfronthosting.co.za> Message-ID: <1239553396.89.0.316778145836.issue4482@psf.upfronthosting.co.za> Eric Smith added the comment: This is a duplicate of 4799, which I've closed. I've resisted fixing this because differences in various platform sprintf's have made it difficult. Now that Mark Dickinson and I are close to removing the use of sprintf for float formatting, I'll have the tools to deal with this better. Not sure what this means for 2.7, yet. We're not planning on backporting the new float formatting to 2.7. ---------- nosy: +cdavid, cito, marketdickinson versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 18:24:42 2009 From: report at bugs.python.org (Eric Smith) Date: Sun, 12 Apr 2009 16:24:42 +0000 Subject: [issue4482] 10e667.__format__('+') should return 'inf' In-Reply-To: <1228153945.74.0.126553636811.issue4482@psf.upfronthosting.co.za> Message-ID: <1239553482.35.0.434572645708.issue4482@psf.upfronthosting.co.za> Eric Smith added the comment: Actually this isn't quite a duplicate of 4799, but it's close. Any fix to this issue will also address 4799's original report: > On windows, with python 2.6, s = '%s' % float('inf') is 'inf', > but s ='%f' % float('inf') is equal to '1.#INF'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 18:25:46 2009 From: report at bugs.python.org (Eric Smith) Date: Sun, 12 Apr 2009 16:25:46 +0000 Subject: [issue5515] 'n' formatting for int and float handles leading zero padding poorly In-Reply-To: <1237422838.11.0.502789865949.issue5515@psf.upfronthosting.co.za> Message-ID: <1239553546.57.0.230038378371.issue5515@psf.upfronthosting.co.za> Eric Smith added the comment: This won't get fixed in 3.0 or 2.6. Still not sure about 2.7, but I'm considering how to fix it there. ---------- versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 18:26:22 2009 From: report at bugs.python.org (Eric Smith) Date: Sun, 12 Apr 2009 16:26:22 +0000 Subject: [issue3382] Make '%F' and float.__format__('F') convert results to upper case. In-Reply-To: <1216232895.09.0.0435300563375.issue3382@psf.upfronthosting.co.za> Message-ID: <1239553582.74.0.335017571043.issue3382@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 18:41:42 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Sun, 12 Apr 2009 16:41:42 +0000 Subject: [issue4482] 10e667.__format__('+') should return 'inf' In-Reply-To: <1228153945.74.0.126553636811.issue4482@psf.upfronthosting.co.za> Message-ID: <1239554502.85.0.155651743684.issue4482@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: The patch I submitted adds a special-case for inf/-inf/NaN so that sprintf is avoided for those values. Should work on any platform, I believe. I'm not sure how it interacts with your 3.x plans. Seems like it would be a good patch for 2.7 at least, though. (and the patch that adds tests should go into both 2.7 and 3.x) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 18:46:26 2009 From: report at bugs.python.org (Eric Smith) Date: Sun, 12 Apr 2009 16:46:26 +0000 Subject: [issue4482] 10e667.__format__('+') should return 'inf' In-Reply-To: <1228153945.74.0.126553636811.issue4482@psf.upfronthosting.co.za> Message-ID: <1239554786.06.0.159518430479.issue4482@psf.upfronthosting.co.za> Eric Smith added the comment: Agreed. That might be the strategy for 2.7. But it depends on how much of the other float and int formatting code I can re-use from 3.1. If I can hide the 2.7/3.1 differences in PyOS_double_to_string, then the 2.7 and 3.1 code should be identical, and the fix will be different in the 3.1 code base. I'll decide in the next few weeks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 19:24:32 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 12 Apr 2009 17:24:32 +0000 Subject: [issue5741] SafeConfigParser incorrectly detects lone percent signs In-Reply-To: <1239539710.2.0.0497586832683.issue5741@psf.upfronthosting.co.za> Message-ID: <1239557072.83.0.981238858586.issue5741@psf.upfronthosting.co.za> Georg Brandl added the comment: Should be fixed in r71537. Will backport to 2.6. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 19:28:33 2009 From: report at bugs.python.org (R. David Murray) Date: Sun, 12 Apr 2009 17:28:33 +0000 Subject: [issue4501] asyncore's urgent data management and connection closed events are broken when using poll() In-Reply-To: <1228266655.05.0.188613442109.issue4501@psf.upfronthosting.co.za> Message-ID: <1239557313.53.0.3079676083.issue4501@psf.upfronthosting.co.za> R. David Murray added the comment: Fixed as part of the work done on issue1161031. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 19:44:11 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sun, 12 Apr 2009 17:44:11 +0000 Subject: [issue5700] io.FileIO calls flush() after file closed In-Reply-To: <1239544193.9257.14.camel@fsol> Message-ID: <49E22865.6040400@sweetapp.com> Brian Quinlan added the comment: Antoine Pitrou wrote: > Antoine Pitrou added the comment: > >> I think that this linearization is probably more useful: >> >> MyClass -> io.FileIO -> MyMixin -> IOBase > > But why not simply: > > MyClass -> MyMixin -> io.FileIO -> IOBase > > ? > Is there something I'm missing that prevents you from doing this? No, doing this is trivial. But shouldn't it be up to the implementor of MyClass to decide whether MyMixin or io.FileIO methods are evaluated first? >> I'm not trying to change the ABC unification at all - and if I did then >> there is a bug in my code. I just think that the immediate parent class >> of _pyio.FileIO should be _pyio.IOBase (just like _io.FileIO has >> _io.IOBase as an immediate parent). That will make the Python and C >> class hierarchies completely consistent within themselves. > > I understand, but that's at the price of an otherwise useless > indirection layer, which will also make _pyio even slower that it > already is :-) Maybe I misunderstand the purpose of _pyio. The Python 3.1 says that its purpose is for experimentation. For experimentation, having a Python implementation where you can add methods and change behavior (though perhaps not in as deep as way is if this class were completely written in Python) is useful. It is also useful for the behavior of the Python implementation to match that of the C implementation as closely as possible - this patch makes the inheritance graph for _pyio.FileIO more consistent. I, for example, want to add a sync() method to FileIO that will call fsync() on the file's file descriptor. With this change, I have a place to plug in that change in Python and I can write the C implementation when I have the Python implementation right. Cheers, Brian ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 19:52:36 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 12 Apr 2009 17:52:36 +0000 Subject: [issue5700] io.FileIO calls flush() after file closed In-Reply-To: <49E22865.6040400@sweetapp.com> Message-ID: <1239558850.9257.16.camel@fsol> Antoine Pitrou added the comment: > No, doing this is trivial. But shouldn't it be up to the implementor of > MyClass to decide whether MyMixin or io.FileIO methods are evaluated first? Is there a concrete use case, though? By the way, what if _pyio.FileIO inherited from io.FileIO instead of delegating all methods? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 20:19:43 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sun, 12 Apr 2009 18:19:43 +0000 Subject: [issue5700] io.FileIO calls flush() after file closed In-Reply-To: <1239558850.9257.16.camel@fsol> Message-ID: <49E230BB.6070804@sweetapp.com> Brian Quinlan added the comment: Antoine Pitrou wrote: > Antoine Pitrou added the comment: > >> No, doing this is trivial. But shouldn't it be up to the implementor of >> MyClass to decide whether MyMixin or io.FileIO methods are evaluated first? > > Is there a concrete use case, though? I don't have a good one in mind - though > By the way, what if _pyio.FileIO inherited from io.FileIO instead of > delegating all methods? I don't think that would work - but reasoning about MRO hurts my brain ;-) You'd have to declare the class like this: class FileIO(io.FileIO, IOBase): pass to get the io.File methods to resolve first. But that means that the method invocation chain would be broken by io.IOBase, which doesn't make super calls. Cheers, Brian ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 20:29:13 2009 From: report at bugs.python.org (Dmitry Vasiliev) Date: Sun, 12 Apr 2009 18:29:13 +0000 Subject: [issue5742] inspect.findsource() should look only for sources In-Reply-To: <1239560953.4.0.0140518593947.issue5742@psf.upfronthosting.co.za> Message-ID: <1239560953.4.0.0140518593947.issue5742@psf.upfronthosting.co.za> New submission from Dmitry Vasiliev : Currently help(zlib) gives the following traceback: Python 3.1a2+ (py3k:71538M, Apr 12 2009, 21:54:44) >>> import zlib >>> help(zlib) Traceback (most recent call last): File "", line 1, in File "Lib/site.py", line 429, in __call__ return pydoc.help(*args, **kwds) File "Lib/pydoc.py", line 1709, in __call__ self.help(request) File "Lib/pydoc.py", line 1755, in help else: doc(request, 'Help on %s:') File "Lib/pydoc.py", line 1505, in doc pager(render_doc(thing, title, forceload)) File "Lib/pydoc.py", line 1500, in render_doc return title % desc + '\n\n' + text.document(object, name) File "Lib/pydoc.py", line 320, in document if inspect.ismodule(object): return self.docmodule(*args) File "Lib/pydoc.py", line 1086, in docmodule contents.append(self.document(value, key, name)) File "Lib/pydoc.py", line 321, in document if inspect.isclass(object): return self.docclass(*args) File "Lib/pydoc.py", line 1131, in docclass doc = getdoc(object) File "Lib/pydoc.py", line 81, in getdoc result = inspect.getdoc(object) or inspect.getcomments(object) File "Lib/inspect.py", line 581, in getcomments lines, lnum = findsource(object) File "Lib/inspect.py", line 524, in findsource lines = linecache.getlines(file, module.__dict__) File "Lib/linecache.py", line 41, in getlines return updatecache(filename, module_globals) File "Lib/linecache.py", line 127, in updatecache lines = fp.readlines() File "Lib/codecs.py", line 300, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf8' codec can't decode bytes in position 41-42: invalid data After some investigation I've found that inspect.findsource() try to use getfile() if getsourcefile() fail to find the source file. I don't see why findsource() should return lines from a compiled file so I think it's a bug. The same bug also exists in Python 2.7 although it's not so critical. I've attached the patch which fixes the problem. ---------- components: Library (Lib) files: inspect.patch keywords: patch messages: 85916 nosy: hdima severity: normal status: open title: inspect.findsource() should look only for sources type: crash versions: Python 3.1 Added file: http://bugs.python.org/file13678/inspect.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 22:01:27 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sun, 12 Apr 2009 20:01:27 +0000 Subject: [issue5700] io.FileIO calls flush() after file closed In-Reply-To: <1238945758.46.0.01809197792.issue5700@psf.upfronthosting.co.za> Message-ID: <1239566487.58.0.106716765862.issue5700@psf.upfronthosting.co.za> Brian Quinlan added the comment: Oops, I didn't finish my thought: >> No, doing this is trivial. But shouldn't it be up to the implementor of >> MyClass to decide whether MyMixin or io.FileIO methods are evaluated first? > > Is there a concrete use case, though? I don't have a good one in mind - though writing the unit test implementation required that the mixin class methods be called last. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 22:26:31 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 12 Apr 2009 20:26:31 +0000 Subject: [issue5703] inside *currentmodule* some links is disabled In-Reply-To: <1238970240.42.0.00430283210892.issue5703@psf.upfronthosting.co.za> Message-ID: <1239567991.81.0.82715807391.issue5703@psf.upfronthosting.co.za> Georg Brandl added the comment: You can write :class:`~email.mime.MIMENonMultipart`; this will link to the correct class but only display the thing after the last dot, in this case "MIMENonMultipart". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 12 22:31:18 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 12 Apr 2009 20:31:18 +0000 Subject: [issue5719] optparse: please provide a usage example in the module docstring In-Reply-To: <1239120087.77.0.885148880477.issue5719@psf.upfronthosting.co.za> Message-ID: <1239568278.1.0.78543505178.issue5719@psf.upfronthosting.co.za> Georg Brandl added the comment: Added in r71540. Thanks for the suggestion! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 00:22:55 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 12 Apr 2009 22:22:55 +0000 Subject: [issue5706] setuptools doesn't honor standard compiler variables In-Reply-To: <1238992798.79.0.661202545175.issue5706@psf.upfronthosting.co.za> Message-ID: <1239574975.53.0.386854663623.issue5706@psf.upfronthosting.co.za> Garrett Cooper added the comment: I did some quick inspection and it appears to be tied purely into setuptools, not distutils. distutils does support the environment variables properly. So I take this item and submit it to PEAK I suppose? Fun times ><. Thanks for the help. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 00:42:03 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 12 Apr 2009 22:42:03 +0000 Subject: [issue5743] multiprocessing.managers not accessible even though docs say so In-Reply-To: <1239576123.32.0.939139207248.issue5743@psf.upfronthosting.co.za> Message-ID: <1239576123.32.0.939139207248.issue5743@psf.upfronthosting.co.za> New submission from Garrett Cooper : I'm not sure why but my copy doesn't have a managers module. I'm really confused because multiprocessing.managers exists in Lib/multiprocessing/managers.py and it should have been installed with easy_install... Please see the attached testcase (it shows the details verifying that I don't have support). I ran it against all copies of python I have besides 3.x (nose doesn't support 3.x because setuptools isn't there yet for 3.x support). -bash-3.00$ python2.4 `which nosetests` ~/test_managers_support.py Python version: 2.4.5 (#1, Mar 28 2009, 14:54:51) [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)]F ====================================================================== FAIL: test_managers_support.test_has_managers ---------------------------------------------------------------------- Traceback (most recent call last): File "/ws/garrcoop-sjc/tools/lib/python2.4/site-packages/nose-0.10.4-py2.4.egg/nose/case.py", line 182, in runTest self.test(*self.arg) File "/users/garrcoop/test_managers_support.py", line 9, in test_has_managers assert hasattr(multiprocessing, 'managers') AssertionError ---------------------------------------------------------------------- Ran 1 test in 0.050s FAILED (failures=1) -bash-3.00$ python2.5 `which nosetests` ~/test_managers_support.py /ws/garrcoop-sjc/tools/lib/python2.4/site-packages/multiprocessing-2.6.1.1-py2.4-linux-i686.egg/multiprocessing/__init__.py:86: RuntimeWarning: Python C API version mismatch for module _multiprocessing: This Python has API version 1013, module _multiprocessing has version 1012. import _multiprocessing Python version: 2.5.4 (r254:67916, Mar 28 2009, 15:01:19) [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)]F ====================================================================== FAIL: test_managers_support.test_has_managers ---------------------------------------------------------------------- Traceback (most recent call last): File "/ws/garrcoop-sjc/tools/lib/python2.4/site-packages/nose-0.10.4-py2.4.egg/nose/case.py", line 182, in runTest self.test(*self.arg) File "/users/garrcoop/test_managers_support.py", line 9, in test_has_managers assert hasattr(multiprocessing, 'managers') AssertionError ---------------------------------------------------------------------- Ran 1 test in 0.159s FAILED (failures=1) -bash-3.00$ python2.6 `which nosetests` ~/test_managers_support.py F ====================================================================== FAIL: test_managers_support.test_has_managers ---------------------------------------------------------------------- Traceback (most recent call last): File "/ws/garrcoop-sjc/tools/lib/python2.4/site-packages/nose-0.10.4-py2.4.egg/nose/case.py", line 182, in runTest self.test(*self.arg) File "/users/garrcoop/test_managers_support.py", line 7, in test_has_managers assert hasattr(multiprocessing, 'managers') AssertionError ---------------------------------------------------------------------- Ran 1 test in 0.029s FAILED (failures=1) ---------- components: Extension Modules, Installation files: test_managers_support.py messages: 85921 nosy: jnoller, yaneurabeya severity: normal status: open title: multiprocessing.managers not accessible even though docs say so versions: Python 2.4, Python 2.5, Python 2.6, Python 3.0 Added file: http://bugs.python.org/file13679/test_managers_support.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 00:52:21 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 12 Apr 2009 22:52:21 +0000 Subject: [issue5743] multiprocessing.managers not accessible even though docs say so In-Reply-To: <1239576123.32.0.939139207248.issue5743@psf.upfronthosting.co.za> Message-ID: <1239576741.02.0.964102814408.issue5743@psf.upfronthosting.co.za> Garrett Cooper added the comment: Sorry -- the info for my python2.6 was out of date. Here's the info (I had to set PYTHONPATH to "" to avoid a multiprocessing module conflict): bash-3.00$ PYTHONPATH=""; python2.6 `which nosetests` ~/test_managers_support.py Python version: 2.6.1 (r261:67515, Mar 28 2009, 06:39:52) [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)]F ====================================================================== FAIL: test_managers_support.test_has_managers ---------------------------------------------------------------------- Traceback (most recent call last): File "/ws/garrcoop-sjc/tools/lib/python2.6/site-packages/nose-0.10.4-py2.6.egg/nose/case.py", line 182, in runTest self.test(*self.arg) File "/users/garrcoop/test_managers_support.py", line 9, in test_has_managers assert hasattr(multiprocessing, 'managers') AssertionError ---------------------------------------------------------------------- Ran 1 test in 0.045s FAILED (failures=1) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 00:55:18 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 12 Apr 2009 22:55:18 +0000 Subject: [issue5743] multiprocessing.managers not accessible even though docs say so In-Reply-To: <1239576123.32.0.939139207248.issue5743@psf.upfronthosting.co.za> Message-ID: <1239576918.13.0.439102675035.issue5743@psf.upfronthosting.co.za> Garrett Cooper added the comment: Ugh... nevermind. Bad case of PEBKAC. Sorry for the noise :(... ---------- status: open -> closed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 01:08:14 2009 From: report at bugs.python.org (Garrett Cooper) Date: Sun, 12 Apr 2009 23:08:14 +0000 Subject: [issue5744] multiprocessing.managers.BaseManager.connect example typos In-Reply-To: <1239577694.3.0.661337704355.issue5744@psf.upfronthosting.co.za> Message-ID: <1239577694.3.0.661337704355.issue5744@psf.upfronthosting.co.za> New submission from Garrett Cooper : The example under multiprocessing.managers.BaseManager.connect has 2 typos: >>> from multiprocessing.managers import BaseManager >>> m = BaseManager(address='127.0.0.1', authkey='abc))>>> m.connect() Here's a corrected example: >>> from multiprocessing.managers import BaseManager >>> m = BaseManager(address='127.0.0.1', authkey='abc') >>> m.connect() ---------- assignee: georg.brandl components: Documentation messages: 85924 nosy: georg.brandl, jnoller, yaneurabeya severity: normal status: open title: multiprocessing.managers.BaseManager.connect example typos versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 01:21:22 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 12 Apr 2009 23:21:22 +0000 Subject: [issue5744] multiprocessing.managers.BaseManager.connect example typos In-Reply-To: <1239577694.3.0.661337704355.issue5744@psf.upfronthosting.co.za> Message-ID: <1239578482.57.0.466509277363.issue5744@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r71544. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 01:41:27 2009 From: report at bugs.python.org (George Yoshida) Date: Sun, 12 Apr 2009 23:41:27 +0000 Subject: [issue5744] multiprocessing.managers.BaseManager.connect example typos In-Reply-To: <1239577694.3.0.661337704355.issue5744@psf.upfronthosting.co.za> Message-ID: <1239579687.82.0.876730488355.issue5744@psf.upfronthosting.co.za> George Yoshida added the comment: > The example ... has *2* typos I guess the reporter wants to point out - extra parenthesis(fixed in r71544) - closing quote is missing for authkey argument ---------- nosy: +quiver status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 01:44:26 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 12 Apr 2009 23:44:26 +0000 Subject: [issue5744] multiprocessing.managers.BaseManager.connect example typos In-Reply-To: <1239577694.3.0.661337704355.issue5744@psf.upfronthosting.co.za> Message-ID: <1239579866.42.0.83538377583.issue5744@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Ah. My apologies. I thought the second typo was that it rendered incorrectly as your example shows. Fixed in r71546. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 01:45:08 2009 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 12 Apr 2009 23:45:08 +0000 Subject: [issue5736] Add the iterator protocol to dbm modules In-Reply-To: <1239529659.3.0.960618338891.issue5736@psf.upfronthosting.co.za> Message-ID: <18914.32000.200195.170058@montanaro.dyndns.org> Skip Montanaro added the comment: Akira> Note that dbm and gdbm C API is a little different. gdbm_nextkey Akira> requires key for its argument, dbm_nextkey don't. So I had to Akira> use for gdbm an static variable that points to the current Akira> position. I don't think this is going to fly. A static variable is not thread-safe. What's worse, even in a non-threaded environment you might want to iterate over the gdbm file simultaneously from two different places. ---------- nosy: +skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 01:45:38 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 12 Apr 2009 23:45:38 +0000 Subject: [issue5744] multiprocessing.managers.BaseManager.connect example typos In-Reply-To: <1239577694.3.0.661337704355.issue5744@psf.upfronthosting.co.za> Message-ID: <1239579938.57.0.23248919714.issue5744@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 01:59:43 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 12 Apr 2009 23:59:43 +0000 Subject: [issue5703] inside *currentmodule* some links is disabled In-Reply-To: <1238970240.42.0.00430283210892.issue5703@psf.upfronthosting.co.za> Message-ID: <1239580783.69.0.955202290791.issue5703@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Thanks, I'll create the patch using this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 02:07:46 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 13 Apr 2009 00:07:46 +0000 Subject: [issue5703] inside *currentmodule* some links is disabled In-Reply-To: <1238970240.42.0.00430283210892.issue5703@psf.upfronthosting.co.za> Message-ID: <1239581266.07.0.680529605854.issue5703@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I noticed :meth:`~email.message.Message.add_header` renders "add_header" but maybe "Message.add_header" is better? (Maybe sphinx tracker is suitable for now....) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 02:19:23 2009 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 13 Apr 2009 00:19:23 +0000 Subject: [issue5736] Add the iterator protocol to dbm modules In-Reply-To: <18914.32000.200195.170058@montanaro.dyndns.org> Message-ID: <18914.34051.809968.854331@montanaro.dyndns.org> Skip Montanaro added the comment: skip> What's worse, even in a non-threaded environment you might want to skip> iterate over the gdbm file simultaneously from two different skip> places. Or iterate over two different gdbm files simultaneously. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 03:42:27 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 13 Apr 2009 01:42:27 +0000 Subject: [issue5745] email document update (more links) In-Reply-To: <1239586947.93.0.97954757869.issue5745@psf.upfronthosting.co.za> Message-ID: <1239586947.93.0.97954757869.issue5745@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : I added more links to email documantation. (I changed only :class: not :meth:) ---------- assignee: georg.brandl components: Documentation files: email_doc_link.patch keywords: patch messages: 85932 nosy: georg.brandl, ocean-city severity: normal status: open title: email document update (more links) versions: Python 2.7 Added file: http://bugs.python.org/file13680/email_doc_link.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 03:54:37 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 13 Apr 2009 01:54:37 +0000 Subject: [issue5745] email document update (more links) In-Reply-To: <1239586947.93.0.97954757869.issue5745@psf.upfronthosting.co.za> Message-ID: <1239587677.23.0.73379398923.issue5745@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file13681/email_doc_link_aligned.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 04:33:46 2009 From: report at bugs.python.org (Dan Schult) Date: Mon, 13 Apr 2009 02:33:46 +0000 Subject: [issue5730] setdefault speedup In-Reply-To: <49DF1236.5020304@v.loewis.de> Message-ID: <7EF9FC9C-BC98-4E34-8DE2-BF9240B0452D@colgate.edu> Dan Schult added the comment: On Apr 11, 2009, at 8:15 AM, Martin v. L?wis @psf.upfronthosting.co.za @psf.upfronthosting.co.za> wrote: > Martin v. L?wis added the comment: > >> By the way, defaultdict is NOT like setdefault--it is like get(). >> Missing entries do no get set. > > Why do you say that? > > __missing__(...) > __missing__(key) # Called by __getitem__ for missing key; > pseudo-code: > if self.default_factory is None: raise KeyError((key,)) > self[key] = value = self.default_factory() > return value > > In all cases of setdefault that I know of, replacing this with > a defaultdict would be appropriate. The only case where it wouldn't > work is if the default value depends on the key. The missing key reports the default object, but doesn't set that key or value object in the dict. So you cannot then call up that object and do something that depends on the key. So the default value may not depend on the key but still need to be different for each key due to later changes. For example, to represent a graph structure, it is helpful to use a dict-of-dicts. The first time a node is looked up you want to add it as a key in the graph dict with an empty "nbr dict" as the value. the "nbr dict" is keyed by neighbor to the edge weight/object. So the default object is always a fresh nbr dict... but what gets added to that nbr dict depends on which node it is. I can come up with examples for lists too... But as you pointed out before, using a list or dict in setdefault requires creating the object before the call anyway... I'm beginning to question whether setdefault should ever be used... Still comes back to--why have it there inefficiently. Besides I'm still interested in being able to do this sort of thing at least through the C-API... Raymond Hettinger added the comment: >> from my perspective creating an internal SetItem adds another >> function handling the data structure just as setdefault would > Incorrect comparison. Your in-lining manipulated the ep structure > directly (not a good thing). In contrast, adding an alternative > _PyDict_SetItemWithHash uses the insertdict() function, fully > isolating > itself of from the table implementation. The whole purpose of having > insertdict() and lookdict() is to isolate the data structure internals > from all externally visible functions. Good... I am understanding better what you mean by "handling the data structure". I agree that lookdict, insertdict and resizedict should be the three that change the data structure. But the way those 3 are currently written, you can't change an entry without looking it up. insertdict_clean almost does it, but it assumes there aren't any dummy entries. > The double call to a very simple user defined __hash__ adds .07 to > call > that takes on .05 with the double call to builtin object hash. So, we > could save half of the the .07 just by elimating the double call to > __hash__. With more complex hash functions the overall speedup is > huge > (essentially cutting the total work almost in half). This is a good example because it shows how the hash can matter. I think there are similar examples where the lookup is most of the time of dict access. I don't know enough about what causes collisions and how dicts are optimized to quickly come up with such an example. But such an example must exist or Tim Peters wouldn't have spent so much effort optimizing lookup.... besides his comments at the top of lookup suggest that we do exactly what I am suggesting to do. Get the entry from lookup and then "the caller can (if it wishes) add the pair to the returned PyDictEntry*. Presently there is no way to do this with C-API except to write my own data structure manipulation. Wouldn't it be better to encapsulate this in the C-API in a standard way instead of having everybody writing their own C-extension doing setdefault the right way? (ok..ok.. "everybody" here refers to probably one person (me)... but others have thought of it. I've even seen the double lookup as a justification for never using setdefault) I'll look for an example that has lots of collisions. Maybe that would help justify a lookup-less insertdict. Dan ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 05:35:55 2009 From: report at bugs.python.org (Garrett Cooper) Date: Mon, 13 Apr 2009 03:35:55 +0000 Subject: [issue5744] multiprocessing.managers.BaseManager.connect example typos In-Reply-To: <1239577694.3.0.661337704355.issue5744@psf.upfronthosting.co.za> Message-ID: <1239593755.63.0.37810952398.issue5744@psf.upfronthosting.co.za> Garrett Cooper added the comment: Thanks for noting that George Y. and thanks for fixing the documentation on SVN Benjamin :). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 06:04:00 2009 From: report at bugs.python.org (Lenard Lindstrom) Date: Mon, 13 Apr 2009 04:04:00 +0000 Subject: [issue3440] Starting any program as a subprocess fails when subprocess.Popen has env argument In-Reply-To: <1216933135.87.0.837899480676.issue3440@psf.upfronthosting.co.za> Message-ID: <1239595440.26.0.996928067055.issue3440@psf.upfronthosting.co.za> Lenard Lindstrom added the comment: notepad.exe forms a side-by-side assembly with COMCTL32.DLL. So SystemRoot must be included in the environment. The following example works with Python 2.5.2 on Windows XP. =============================================================== import struct, subprocess import os command = 'C:\\WINDOWS\\NOTEPAD.EXE' env = {'FOO': 'bar', 'SystemRoot': os.environ['SystemRoot']} p = subprocess.Popen(command, env=env) p.wait() err = struct.unpack('I', struct.pack('i', p.returncode))[0] print '%x (%d)'%(err, err) =============================================================== I would suggest Popen adds SystemRoot to env if it is not present. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 06:31:06 2009 From: report at bugs.python.org (Eric Blond) Date: Mon, 13 Apr 2009 04:31:06 +0000 Subject: [issue5746] socketserver problem upon disconnection (undefined member) In-Reply-To: <1239597064.27.0.0905916009568.issue5746@psf.upfronthosting.co.za> Message-ID: <1239597064.27.0.0905916009568.issue5746@psf.upfronthosting.co.za> New submission from Eric Blond : Here's the traceback I got: === >>> s.serve_forever() ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 54611) Traceback (most recent call last): File "C:\Python30\lib\socketserver.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "C:\Python30\lib\socketserver.py", line 307, in process_request self.finish_request(request, client_address) File "C:\Python30\lib\socketserver.py", line 320, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Python30\lib\socketserver.py", line 615, in __init__ self.finish() File "C:\Python30\lib\socketserver.py", line 655, in finish if not self.wfile.closed: AttributeError: 'RequestHandler' object has no attribute 'wfile' ---------------------------------------- === 's' is an instance of socketserver.TCPServer and the handler passed is an instance of socketserver.StreamRequestHandler. I believe this must be a simple typo, so I didn't feel that more details is needed at that point. Let me know if you have any question. ---------- components: Library (Lib) messages: 85936 nosy: eblond severity: normal status: open title: socketserver problem upon disconnection (undefined member) versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 09:11:14 2009 From: report at bugs.python.org (Georg Brandl) Date: Mon, 13 Apr 2009 07:11:14 +0000 Subject: [issue5703] inside *currentmodule* some links is disabled In-Reply-To: <1238970240.42.0.00430283210892.issue5703@psf.upfronthosting.co.za> Message-ID: <1239606674.86.0.486458839322.issue5703@psf.upfronthosting.co.za> Georg Brandl added the comment: If you want that level of control, it may be better to just write :meth:`Message.add_header() `. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Mon Apr 13 10:33:48 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Mon, 13 Apr 2009 08:33:48 +0000 Subject: [issue5730] setdefault speedup In-Reply-To: <7EF9FC9C-BC98-4E34-8DE2-BF9240B0452D@colgate.edu> Message-ID: <49E2F8E8.7050205@v.loewis.de> Martin v. L?wis added the comment: > The missing key reports the default object, but doesn't set that key > or value object in the dict. That's just not true. Re-read the line in the doc string where it puts the default value into the dict, under the key being accessed. > For example, to represent a graph structure, it is helpful to use a > dict-of-dicts. No problem: py> from collections import defaultdict py> weights=defaultdict(dict) py> weights['a']['b']=17 py> weights['a']['c']=5 py> weights['a'] {'c': 5, 'b': 17} See? It remembered the default value, and the value for the 'a' key got changed and can now be modified. The whole point of defaultdict was to replace setdefault, so that setdefault can eventually be eliminated, see http://mail.python.org/pipermail/python-dev/2006-February/061169.html http://mail.python.org/pipermail/python-dev/2006-February/061261.html Apparently, the plan for removing setdefault is now forgotten. Perhaps this would be a good time to revive it, with a proper deprecation procedure. If it is to be removed, I'm -1 for "fixing" anything about it. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 13 10:39:29 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 13 Apr 2009 08:39:29 +0000 Subject: [issue5706] setuptools doesn't honor standard compiler variables In-Reply-To: <1238992798.79.0.661202545175.issue5706@psf.upfronthosting.co.za> Message-ID: <1239611969.61.0.178713452524.issue5706@psf.upfronthosting.co.za> Tarek Ziad? added the comment: You can submit an entry at http://bugs.python.org/setuptools. Although, what you mean by "distutils does support the environment variables properly" ---------- components: +Distutils -Installation versions: -Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 13 10:42:37 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 13 Apr 2009 08:42:37 +0000 Subject: [issue5735] Segfault when loading not recompiled module In-Reply-To: <1239448122.29.0.383715698899.issue5735@psf.upfronthosting.co.za> Message-ID: <1239612157.78.0.642807246973.issue5735@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: tarek -> _______________________________________ Python tracker _______________________________________ From =?utf-8?q?M=C3=A1rcio_Faustino_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 13 13:43:04 2009 From: =?utf-8?q?M=C3=A1rcio_Faustino_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?M=C3=A1rcio_Faustino_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 13 Apr 2009 11:43:04 +0000 Subject: [issue5741] SafeConfigParser incorrectly detects lone percent signs In-Reply-To: <1239539710.2.0.0497586832683.issue5741@psf.upfronthosting.co.za> Message-ID: <1239622984.01.0.748515820604.issue5741@psf.upfronthosting.co.za> M?rcio Faustino added the comment: Shouldn't the "replace('%%', '')" take place before "_interpvar_re.sub"? For example, the value "%%(test)s" should be accepted as valid but it isn't because "_interpvar_re" has already changed it to "%". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 14:36:44 2009 From: report at bugs.python.org (Georg Brandl) Date: Mon, 13 Apr 2009 12:36:44 +0000 Subject: [issue5741] SafeConfigParser incorrectly detects lone percent signs In-Reply-To: <1239539710.2.0.0497586832683.issue5741@psf.upfronthosting.co.za> Message-ID: <1239626204.16.0.560403693741.issue5741@psf.upfronthosting.co.za> Georg Brandl added the comment: You're right, of course. Fixed in r71564. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 13 14:39:32 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 13 Apr 2009 12:39:32 +0000 Subject: [issue5607] Lib/distutils/test/test_util: test_get_platform bogus for OSX In-Reply-To: <1238431154.34.0.307596210829.issue5607@psf.upfronthosting.co.za> Message-ID: <1239626372.09.0.765414838929.issue5607@psf.upfronthosting.co.za> Tarek Ziad? added the comment: fixed in r71560 and r71565. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Mon Apr 13 14:56:09 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Mon, 13 Apr 2009 12:56:09 +0000 Subject: [issue5736] Add the iterator protocol to dbm modules In-Reply-To: <1239457673.6.0.50765651359.issue5736@psf.upfronthosting.co.za> Message-ID: <1239627369.47.0.304632480284.issue5736@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I agree with Skip that using a static variable is not appropriate. The proper solution probably would be to define a separate gdbm_iter object which always preserves the last key returned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 15:13:58 2009 From: report at bugs.python.org (Georg Brandl) Date: Mon, 13 Apr 2009 13:13:58 +0000 Subject: [issue5745] email document update (more links) In-Reply-To: <1239586947.93.0.97954757869.issue5745@psf.upfronthosting.co.za> Message-ID: <1239628438.96.0.74125283541.issue5745@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, committed in r71572. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 15:43:42 2009 From: report at bugs.python.org (Akira Kitada) Date: Mon, 13 Apr 2009 13:43:42 +0000 Subject: [issue5736] Add the iterator protocol to dbm modules In-Reply-To: <1239457673.6.0.50765651359.issue5736@psf.upfronthosting.co.za> Message-ID: <1239630222.27.0.363733168395.issue5736@psf.upfronthosting.co.za> Akira Kitada added the comment: Yes, using a static variable there is wrong and actually I'm now working on "dbm_iterobject" just as Martin suggested. dbm iterator should behave just like one in dict. I think I can use Objects/dictobject.c as a good example for this. Attached is minimal tests for dbm iterator. ---------- Added file: http://bugs.python.org/file13682/test_issue5736.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 15:58:27 2009 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 13 Apr 2009 13:58:27 +0000 Subject: [issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10 In-Reply-To: <1239226094.42.0.345959405343.issue5724@psf.upfronthosting.co.za> Message-ID: <1239631107.37.0.771470589464.issue5724@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: We'll omit this for 2.6.2. Mark, please feel free to apply it once 2.6.2 is released so that it makes it into 2.6.3. ---------- priority: release blocker -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 16:00:13 2009 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 13 Apr 2009 14:00:13 +0000 Subject: [issue5724] 2.6.2c1 fails to pass test_cmath on Solaris10 In-Reply-To: <1239226094.42.0.345959405343.issue5724@psf.upfronthosting.co.za> Message-ID: <1239631213.01.0.422291196404.issue5724@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Accepted for 2.6.3. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 17:11:27 2009 From: report at bugs.python.org (Victor Godoy Poluceno) Date: Mon, 13 Apr 2009 15:11:27 +0000 Subject: [issue5746] socketserver problem upon disconnection (undefined member) In-Reply-To: <1239597064.27.0.0905916009568.issue5746@psf.upfronthosting.co.za> Message-ID: <1239635487.91.0.354803782266.issue5746@psf.upfronthosting.co.za> Victor Godoy Poluceno added the comment: Can you provide a small example of this error? This problem seems only occurer when a subclass of socketserver.StreamRequestHandler provide a blank method "setup". In your log error: >> AttributeError: 'RequestHandler' object has no attribute 'wfile' The class 'RequestHandler' is a subclass of socketserver.StreamRequestHandler? ---------- nosy: +victorpoluceno _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 13 17:16:41 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 13 Apr 2009 15:16:41 +0000 Subject: [issue5747] knowing the parent command In-Reply-To: <1239635801.31.0.779200404785.issue5747@psf.upfronthosting.co.za> Message-ID: <1239635801.31.0.779200404785.issue5747@psf.upfronthosting.co.za> New submission from Tarek Ziad? : Right now there's no way in a command to know that it was launched as a subcommand from another command. For instance every install_* command knows explicitely that it is launched as a subcommand of 'install' and takes back its options in finalize_options() using set_undefined_options(). For commands that might be used as subcommands of several commands, we need to pass the name of the parent command to finalize_options() so we can call set_undefined_options() without knowing explicitely the name of the parent command. This will be done by adding an optional parameter called 'parent_command', to run_command(), then to ensure_finalized() and to finalized_options(). The first use case of this will be the check command, that will be used by "register" and "sdist". This change will be backward compatible with the existing commands and ths new parameter optional ---------- assignee: tarek components: Distutils messages: 85950 nosy: tarek priority: normal severity: normal status: open title: knowing the parent command type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 17:33:17 2009 From: report at bugs.python.org (Eric Blond) Date: Mon, 13 Apr 2009 15:33:17 +0000 Subject: [issue5746] socketserver problem upon disconnection (undefined member) In-Reply-To: <1239597064.27.0.0905916009568.issue5746@psf.upfronthosting.co.za> Message-ID: <1239636797.03.0.954617835771.issue5746@psf.upfronthosting.co.za> Eric Blond added the comment: That's it actually. I forgot to call base class' setup() method when I redefined it in my subclass. When I properly call StreamRequestHandler.setup() on my derived class' setup(), everything works fine. I'm not a socketserver specialist, but I would have expected StreamRequestHandler to derive from RequestHandler and not the other way round, although it makes little difference to me as a user's point of view. Thanks a lot for pointing my mistake! Cheers, -Eric ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 17:33:29 2009 From: report at bugs.python.org (Eric Blond) Date: Mon, 13 Apr 2009 15:33:29 +0000 Subject: [issue5746] socketserver problem upon disconnection (undefined member) In-Reply-To: <1239597064.27.0.0905916009568.issue5746@psf.upfronthosting.co.za> Message-ID: <1239636809.59.0.552180477137.issue5746@psf.upfronthosting.co.za> Changes by Eric Blond : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 22:01:22 2009 From: report at bugs.python.org (R. David Murray) Date: Mon, 13 Apr 2009 20:01:22 +0000 Subject: [issue3440] Starting any program as a subprocess fails when subprocess.Popen has env argument In-Reply-To: <1216933135.87.0.837899480676.issue3440@psf.upfronthosting.co.za> Message-ID: <1239652882.03.0.762727737346.issue3440@psf.upfronthosting.co.za> R. David Murray added the comment: As I said, if you replace the environment it is your responsibility to supply a working environment. I've attached a doc patch that adds a warning about this with the information that a valid SystemRoot is needed to run a side-by-side assembly (whatever that is :). If you think the doc patch is accurate I will commit it (unless Georg objects). ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file13683/issue3440-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 23:10:09 2009 From: report at bugs.python.org (Georg Brandl) Date: Mon, 13 Apr 2009 21:10:09 +0000 Subject: [issue3440] Starting any program as a subprocess fails when subprocess.Popen has env argument In-Reply-To: <1216933135.87.0.837899480676.issue3440@psf.upfronthosting.co.za> Message-ID: <1239657009.9.0.880271257066.issue3440@psf.upfronthosting.co.za> Georg Brandl added the comment: Looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 13 23:15:09 2009 From: report at bugs.python.org (Eric Smith) Date: Mon, 13 Apr 2009 21:15:09 +0000 Subject: [issue5748] Objects/bytesobject.c should include stringdefs.h, instead of defining its own macros In-Reply-To: <1239657309.78.0.97481273251.issue5748@psf.upfronthosting.co.za> Message-ID: <1239657309.78.0.97481273251.issue5748@psf.upfronthosting.co.za> New submission from Eric Smith : All of the macros it defines around line 565 should either already be in stringdefs.h, or they should be added there. The same issue exists in Objects/bytearrayobject.c. I haven't looked in 2.7, but I assume the same problem exists there. ---------- assignee: eric.smith components: Interpreter Core keywords: easy messages: 85954 nosy: eric.smith priority: normal severity: normal status: open title: Objects/bytesobject.c should include stringdefs.h, instead of defining its own macros type: behavior versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 01:09:12 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 13 Apr 2009 23:09:12 +0000 Subject: [issue5746] socketserver problem upon disconnection (undefined member) In-Reply-To: <1239597064.27.0.0905916009568.issue5746@psf.upfronthosting.co.za> Message-ID: <1239664152.47.0.327728388713.issue5746@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 03:00:59 2009 From: report at bugs.python.org (R David Murray) Date: Tue, 14 Apr 2009 01:00:59 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <200904101332.21982.jason.vas.dias@gmail.com> Message-ID: R David Murray added the comment: On Sat, 11 Apr 2009 at 09:29, jvdias wrote: > jvdias added the comment: > > Thanks for responding ! You are welcome. If you want something to happen, though, you'll have to get support from the community and submit a patch. > Can't Python provide a better print() implementation or a fflush() > implementation that will enable print()'s buffers to be flushed ? > Perhaps something like PERL's IO::Handle::autoflush() ? Is there some way in which sys.stdout.flush() is not equivalent to "an fflush implementation that will enable print()'s buffers to be flushed"? > Maybe I should raise another "fflush() support required" bug ? If it's a real issue, yes. But I don't think it is. --David ---------- nosy: +r.david.murray-old _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 03:01:19 2009 From: report at bugs.python.org (MechPaul) Date: Tue, 14 Apr 2009 01:01:19 +0000 Subject: [issue5749] Allow bin() to have an optional "Total Bits" argument. In-Reply-To: <1239670879.87.0.226370263961.issue5749@psf.upfronthosting.co.za> Message-ID: <1239670879.87.0.226370263961.issue5749@psf.upfronthosting.co.za> New submission from MechPaul : As it stands right now, bin() only shows the minimum number of bits to display the number, however I think having a "Total Bits" argument would be very, very useful for bin(). bin(value, [Total bits to display]) "Total bits to display" is an integer. Here's how it should work: >>> bin(0x7F) '0b1111111' >>> #Note, there are seven 1's there to represent the value 127 >>> bin(0x7F, 8) '0b01111111' >>> #Now there are eight bits displayed. >>> bin(0xFF, 16) '0b0000000011111111' >>> #This makes it a lot easier to read and compare binary numbers! ---------- components: Interpreter Core messages: 85956 nosy: MechPaul severity: normal status: open title: Allow bin() to have an optional "Total Bits" argument. type: feature request versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 03:08:06 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 14 Apr 2009 01:08:06 +0000 Subject: [issue5725] process SysV-Semaphore support In-Reply-To: <1239254455.57.0.547868960031.issue5725@psf.upfronthosting.co.za> Message-ID: <1239671286.7.0.765076767729.issue5725@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: -r.david.murray-old _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 03:28:22 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 14 Apr 2009 01:28:22 +0000 Subject: [issue5749] Allow bin() to have an optional "Total Bits" argument. In-Reply-To: <1239670879.87.0.226370263961.issue5749@psf.upfronthosting.co.za> Message-ID: <1239672502.39.0.248926943668.issue5749@psf.upfronthosting.co.za> R. David Murray added the comment: A better (more flexible) way already exists (as of 2.6) to accomplish your goal: >>> "0b{0:08b}".format(127) '0b01111111' ---------- nosy: +r.david.murray resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 04:21:40 2009 From: report at bugs.python.org (Victor Godoy Poluceno) Date: Tue, 14 Apr 2009 02:21:40 +0000 Subject: [issue5715] listen socket close in SocketServer.ForkingMixIn.process_request() In-Reply-To: <1239064250.04.0.401358738839.issue5715@psf.upfronthosting.co.za> Message-ID: <1239675700.1.0.96374867104.issue5715@psf.upfronthosting.co.za> Changes by Victor Godoy Poluceno : ---------- nosy: +victorpoluceno _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 04:51:16 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 14 Apr 2009 02:51:16 +0000 Subject: [issue5742] inspect.findsource() should look only for sources In-Reply-To: <1239560953.4.0.0140518593947.issue5742@psf.upfronthosting.co.za> Message-ID: <1239677476.36.0.578697461563.issue5742@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: -> normal stage: -> test needed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 04:51:30 2009 From: report at bugs.python.org (Dan Schult) Date: Tue, 14 Apr 2009 02:51:30 +0000 Subject: [issue5730] setdefault speedup In-Reply-To: <49E2F8E8.7050205@v.loewis.de> Message-ID: <4F1C87A8-4E40-4991-8FC3-E2E1D0E6C3D6@colgate.edu> Dan Schult added the comment: Thank you... I stand corrected.... That's actually very helpful! Of course using defdict makes the default assignment take two hashes, two lookups, an attribute/function lookup (__missing__) and the extra function call, plus doesn't allow arguments to the object factory... but it means that there is a hook into the dict API that allows us to create something when GetItem/subscript gives a KeyError... I understand much more what I should be doing and where to look for it. Thanks very much! I still would prefer that the C-API allow PyDict_SetItem to be called without a hash or lookup. Maybe a method called PyDict_SetEntry(). But I haven't really looked at it, don't have a patch and am not sure if it is worth it. I am willing to spend time doing looking into that kind of thing if you think that might be helpful. Otherwise I will put it on my list of fun-projects-for-hazy-summer-weekends and get to it when I get to it. Dan ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 05:26:30 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 14 Apr 2009 03:26:30 +0000 Subject: [issue5749] Allow bin() to have an optional "Total Bits" argument. In-Reply-To: <1239670879.87.0.226370263961.issue5749@psf.upfronthosting.co.za> Message-ID: <1239679589.97.0.289926730835.issue5749@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with closing this one. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 08:43:43 2009 From: report at bugs.python.org (utilitarian) Date: Tue, 14 Apr 2009 06:43:43 +0000 Subject: [issue5750] weird seg fault In-Reply-To: <1239691423.14.0.930263157901.issue5750@psf.upfronthosting.co.za> Message-ID: <1239691423.14.0.930263157901.issue5750@psf.upfronthosting.co.za> New submission from utilitarian : In python 2.5.2 on ubuntu Ibex. If your run the command python round_robin_seg.py smallest_tomog. Using the files provided. There is a segfault. It happens in the core interpreter. It happened when I added line 35 to the python code. Sorry I do not have time at the moment to pin it down better. ---------- components: Interpreter Core files: python_crash.tar.gz messages: 85960 nosy: utilitarian severity: normal status: open title: weird seg fault versions: Python 2.5 Added file: http://bugs.python.org/file13684/python_crash.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 08:44:48 2009 From: report at bugs.python.org (Peter Lonjers) Date: Tue, 14 Apr 2009 06:44:48 +0000 Subject: [issue5750] weird seg fault In-Reply-To: <1239691423.14.0.930263157901.issue5750@psf.upfronthosting.co.za> Message-ID: <1239691488.84.0.886066720855.issue5750@psf.upfronthosting.co.za> Changes by Peter Lonjers : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 09:00:27 2009 From: report at bugs.python.org (Peter Lonjers) Date: Tue, 14 Apr 2009 07:00:27 +0000 Subject: [issue5750] weird seg fault In-Reply-To: <1239691423.14.0.930263157901.issue5750@psf.upfronthosting.co.za> Message-ID: <1239692427.39.0.335703051238.issue5750@psf.upfronthosting.co.za> Peter Lonjers added the comment: Hmm I just remembered I was using psyco with this code. With out it. There is a recursion depth exception not a segfault. Changing the bug to be in Extension modules. If that is the right place. ---------- components: +Extension Modules -Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 11:26:15 2009 From: report at bugs.python.org (Nicolas Goutte) Date: Tue, 14 Apr 2009 09:26:15 +0000 Subject: [issue5751] Typo in documentation of print function parameters In-Reply-To: <1239701175.13.0.88945528483.issue5751@psf.upfronthosting.co.za> Message-ID: <1239701175.13.0.88945528483.issue5751@psf.upfronthosting.co.za> New submission from Nicolas Goutte : In http://docs.python.org/library/functions.html#print the print function is documented to have a parameter named end with a default 'n'. However the default should be '\n' as documented in Python 3 ( http://docs.python.org/3.0/library/functions.html#print ) ---------- assignee: georg.brandl components: Documentation messages: 85962 nosy: georg.brandl, nicolasg severity: normal status: open title: Typo in documentation of print function parameters versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 12:22:37 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 14 Apr 2009 10:22:37 +0000 Subject: [issue5750] weird seg fault In-Reply-To: <1239691423.14.0.930263157901.issue5750@psf.upfronthosting.co.za> Message-ID: <1239704557.1.0.734268397268.issue5750@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Closing as invalid, for two reasons: - Psyco is not a supported extension module. - This problem is already listed in Psyco's Known Bugs: http://psyco.sourceforge.net/psycoguide/bugs.html ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 13:13:08 2009 From: report at bugs.python.org (Tomalak) Date: Tue, 14 Apr 2009 11:13:08 +0000 Subject: [issue5752] xml.dom.minidom does not handle newline characters in attribute values In-Reply-To: <1239707588.77.0.33795755364.issue5752@psf.upfronthosting.co.za> Message-ID: <1239707588.77.0.33795755364.issue5752@psf.upfronthosting.co.za> New submission from Tomalak : Current behavior upon toxml() is: Upon reading the document again, the new line is normalized and collapsed into a space (according to the XML spec, section 3.3.3), which means that it is lost. Better behavior would be something like this (within attribute values only): ---------- components: XML messages: 85964 nosy: Tomalak severity: normal status: open title: xml.dom.minidom does not handle newline characters in attribute values versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 13:13:34 2009 From: report at bugs.python.org (Tomalak) Date: Tue, 14 Apr 2009 11:13:34 +0000 Subject: [issue5752] xml.dom.minidom does not handle newline characters in attribute values In-Reply-To: <1239707588.77.0.33795755364.issue5752@psf.upfronthosting.co.za> Message-ID: <1239707614.52.0.297086288281.issue5752@psf.upfronthosting.co.za> Changes by Tomalak : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 13:39:39 2009 From: report at bugs.python.org (Jan Lieskovsky) Date: Tue, 14 Apr 2009 11:39:39 +0000 Subject: [issue5753] CVE-2008-5983 python: untrusted python modules search path In-Reply-To: <1239709179.65.0.173847743531.issue5753@psf.upfronthosting.co.za> Message-ID: <1239709179.65.0.173847743531.issue5753@psf.upfronthosting.co.za> New submission from Jan Lieskovsky : Common Vulnerabilities and Exposures assigned an identifier CVE-2008-5983 (and related CVE ids) to the following vulnerability: Untrusted search path vulnerability in the PySys_SetArgv API function in Python 2.6 and earlier, and possibly later versions, prepends an empty string to sys.path when the argv[0] argument does not contain a path separator, which might allow local users to execute arbitrary code via a Trojan horse Python file in the current working directory. References: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983 https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2008-5983 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5984 https://bugzilla.redhat.com/show_bug.cgi?id=481551 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5985 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5986 https://bugzilla.redhat.com/show_bug.cgi?id=481550 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5987 https://bugzilla.redhat.com/show_bug.cgi?id=481553 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0314 http://bugzilla.gnome.org/show_bug.cgi?id=569214 https://bugzilla.redhat.com/show_bug.cgi?id=481556 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0315 https://bugzilla.redhat.com/show_bug.cgi?id=481560 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0316 https://bugzilla.redhat.com/show_bug.cgi?id=481565 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0317 https://bugzilla.redhat.com/show_bug.cgi?id=481570 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0318 https://bugzilla.redhat.com/show_bug.cgi?id=481572 ---------- components: Interpreter Core files: python-CVE-2009-5983.patch keywords: patch messages: 85965 nosy: iankko severity: normal status: open title: CVE-2008-5983 python: untrusted python modules search path type: security versions: Python 3.1 Added file: http://bugs.python.org/file13685/python-CVE-2009-5983.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 13:47:32 2009 From: report at bugs.python.org (Jan Lieskovsky) Date: Tue, 14 Apr 2009 11:47:32 +0000 Subject: [issue5753] CVE-2008-5983 python: untrusted python modules search path In-Reply-To: <1239709179.65.0.173847743531.issue5753@psf.upfronthosting.co.za> Message-ID: <1239709652.53.0.858098316987.issue5753@psf.upfronthosting.co.za> Jan Lieskovsky added the comment: To sum up the behavior, the following table displays whether modules are read from the current working directory for various ways how the python scripts can be launched (unfixed/fixed version): unfixed fixed run as ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ yes no python test.py yes no python ./test.py yes no python /tmp/396/test.py yes no /bin/env python test.py yes yes test.py yes yes ./test.py yes yes /tmp/396/test.py yes yes /usr/bin/python test.py yes yes /usr/bin/python ./test.py yes yes /usr/bin/python /tmp/396/test.py no no test-in-different-dir.py no no ./bin/test-in-different-dir.py no no python ./bin/test-in-different-dir.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 13:54:20 2009 From: report at bugs.python.org (Jan Lieskovsky) Date: Tue, 14 Apr 2009 11:54:20 +0000 Subject: [issue5753] CVE-2008-5983 python: untrusted python modules search path In-Reply-To: <1239709179.65.0.173847743531.issue5753@psf.upfronthosting.co.za> Message-ID: <1239710060.57.0.160203480847.issue5753@psf.upfronthosting.co.za> Jan Lieskovsky added the comment: As no longer work of "python ./foo.py" after patch utilization may cause, the update won't be acceptable, could you guys review the above patch and potentially provide an another one? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 14:02:58 2009 From: report at bugs.python.org (Jan Lieskovsky) Date: Tue, 14 Apr 2009 12:02:58 +0000 Subject: [issue5753] CVE-2008-5983 python: untrusted python modules search path In-Reply-To: <1239709179.65.0.173847743531.issue5753@psf.upfronthosting.co.za> Message-ID: <1239710578.32.0.934358356836.issue5753@psf.upfronthosting.co.za> Jan Lieskovsky added the comment: Just drop into /tmp and run (you will need the zenity package installed): python3.1 ./test.py or gedit # unfixed gedit in that directory. ---------- Added file: http://bugs.python.org/file13686/py_umspath_test.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 14:12:37 2009 From: report at bugs.python.org (Thomas Heller) Date: Tue, 14 Apr 2009 12:12:37 +0000 Subject: [issue1006238] cross compile patch Message-ID: <1239711157.89.0.489576255367.issue1006238@psf.upfronthosting.co.za> Changes by Thomas Heller : ---------- nosy: +theller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 14:22:35 2009 From: report at bugs.python.org (Petr Splichal) Date: Tue, 14 Apr 2009 12:22:35 +0000 Subject: [issue5753] CVE-2008-5983 python: untrusted python modules search path In-Reply-To: <1239709179.65.0.173847743531.issue5753@psf.upfronthosting.co.za> Message-ID: <1239711755.22.0.639369333212.issue5753@psf.upfronthosting.co.za> Changes by Petr Splichal : ---------- nosy: +psss _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 15:54:40 2009 From: report at bugs.python.org (Petr Splichal) Date: Tue, 14 Apr 2009 13:54:40 +0000 Subject: [issue2588] PyOS_vsnprintf() underflow leads to memory corruption In-Reply-To: <1207670110.11.0.605807538943.issue2588@psf.upfronthosting.co.za> Message-ID: <1239717280.18.0.634178879998.issue2588@psf.upfronthosting.co.za> Petr Splichal added the comment: Justin, is there any reproducer available for this issue? Thanks! ---------- nosy: +psss _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 16:06:30 2009 From: report at bugs.python.org (Petr Splichal) Date: Tue, 14 Apr 2009 14:06:30 +0000 Subject: [issue2587] PyString_FromStringAndSize() to be considered unsafe In-Reply-To: <1207669747.73.0.910333357226.issue2587@psf.upfronthosting.co.za> Message-ID: <1239717990.04.0.320769455045.issue2587@psf.upfronthosting.co.za> Petr Splichal added the comment: Justin, is there any reproducer available for this issue? Thanks! ---------- nosy: +psss _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 19:03:25 2009 From: report at bugs.python.org (Jorge Herskovic) Date: Tue, 14 Apr 2009 17:03:25 +0000 Subject: [issue5754] Shelve module writeback parameter does not act as advertised In-Reply-To: <1239728605.41.0.419145925815.issue5754@psf.upfronthosting.co.za> Message-ID: <1239728605.41.0.419145925815.issue5754@psf.upfronthosting.co.za> New submission from Jorge Herskovic : The shelve module documentation states that "by default, mutations to persistent-dictionary mutable entries are not automatically written back. If the optional writeback parameter is set to True, all entries accessed are cached in memory, and written back at close time..." however the implementation's __setitem__ is the following: def __setitem__(self, key, value): if self.writeback: self.cache[key] = value f = StringIO() p = Pickler(f, self._protocol) p.dump(value) self.dict[key] = f.getvalue() which maintains the cache correctly but writes back to the disk on every operation, violating the writeback documentation. Changing it to def __setitem__(self, key, value): if self.writeback: self.cache[key] = value else: f = StringIO() p = Pickler(f, self._protocol) p.dump(value) self.dict[key] = f.getvalue() seems to match the documentation's intent. (First report, sorry for any formatting/style issues!) ---------- components: Extension Modules messages: 85971 nosy: jherskovic severity: normal status: open title: Shelve module writeback parameter does not act as advertised type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 19:22:51 2009 From: report at bugs.python.org (Zooko O'Whielacronx) Date: Tue, 14 Apr 2009 17:22:51 +0000 Subject: [issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++" In-Reply-To: <1239729771.84.0.97828652099.issue5755@psf.upfronthosting.co.za> Message-ID: <1239729771.84.0.97828652099.issue5755@psf.upfronthosting.co.za> New submission from Zooko O'Whielacronx : A user of the Tahoe-LAFS project submitted a bug report to us, saying: """ I get lots of "cc1plus: warning: command line option "-Wstrict- prototypes" is valid for Ada/C/ObjC but not for C++" when compiling """ A little googling shows that this gets reported frequently to other Python projects that have C++ code: http://trac.sagemath.org/sage_trac/ticket/425 http://www.mail-archive.com/matplotlib- users at lists.sourceforge.net/msg03947.html Those other projects seem to think that this is distutils's problem, but I don't see evidence that any of them opened a ticket for distutils yet. ---------- assignee: tarek components: Distutils messages: 85972 nosy: tarek, zooko severity: normal status: open title: "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 19:46:21 2009 From: report at bugs.python.org (Nicolas Dumazet) Date: Tue, 14 Apr 2009 17:46:21 +0000 Subject: [issue5154] OSX broken poll testing doesn't work In-Reply-To: <1233786742.9.0.12404457396.issue5154@psf.upfronthosting.co.za> Message-ID: <1239731181.12.0.280713096916.issue5154@psf.upfronthosting.co.za> Changes by Nicolas Dumazet : ---------- nosy: +nicdumz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 22:24:20 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 14 Apr 2009 20:24:20 +0000 Subject: [issue5756] idle pydoc et al removed from 3.1 without versioned replacements In-Reply-To: <1239740660.49.0.649614984791.issue5756@psf.upfronthosting.co.za> Message-ID: <1239740660.49.0.649614984791.issue5756@psf.upfronthosting.co.za> New submission from Ned Deily : RELEASE BLOCKER r71400 and r71401 changed py3k setup.py to comment out the installation of the scripts for pydoc, idle, 2to5, and smtpd.py. This was in response to issue1590 noting that python3 should not overwrite python2 versions of the scripts. However, unless I'm missing something, this now means that *no* versions of these scripts are ever installed for python3; that's not a solution. (Note, this breaks Mac installer builds and probably breaks downstream unix packages as well.) As hinted at in issue1590, the most consistent option would be to install each of the scripts with a version number as is done with python itself. Whatever solution is chosen, some additional work will likely be needed in the Mac Makefile to do the right thing in the framework bin directory and in the Mac BuildScript/build-installer.py for the /usr/local/bin links. No idea about the effects on other platform builds. This also seems to be a change worthy of a NEWS item and doc changes. ---------- components: Build messages: 85973 nosy: nad severity: normal status: open title: idle pydoc et al removed from 3.1 without versioned replacements type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 22:26:43 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 14 Apr 2009 20:26:43 +0000 Subject: [issue5756] idle pydoc et al removed from 3.1 without versioned replacements In-Reply-To: <1239740660.49.0.649614984791.issue5756@psf.upfronthosting.co.za> Message-ID: <1239740803.99.0.290072036514.issue5756@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +benjamin.peterson, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 22:28:57 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 14 Apr 2009 20:28:57 +0000 Subject: [issue1590] "make altinstall" installs pydoc, idle, smtpd.py In-Reply-To: <1197388115.32.0.880215268876.issue1590@psf.upfronthosting.co.za> Message-ID: <1239740937.62.0.696066173077.issue1590@psf.upfronthosting.co.za> Ned Deily added the comment: r71400 breaks installer builds. See issue5756. ---------- nosy: +nad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 22:44:19 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 14 Apr 2009 20:44:19 +0000 Subject: [issue5735] Segfault when loading not recompiled module In-Reply-To: <1239448122.29.0.383715698899.issue5735@psf.upfronthosting.co.za> Message-ID: <1239741859.05.0.0208852169191.issue5735@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Normally, modules compiled with incompatible settings should generate a link-time error (like: Undefined symbol PyModule_Create). This used to work with 2.x, but a typo in a macro broke this for 3.x. Patch attached. ---------- keywords: +needs review, patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file13687/module_create.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 22:45:58 2009 From: report at bugs.python.org (David Ripton) Date: Tue, 14 Apr 2009 20:45:58 +0000 Subject: [issue5756] idle pydoc et al removed from 3.1 without versioned replacements In-Reply-To: <1239740660.49.0.649614984791.issue5756@psf.upfronthosting.co.za> Message-ID: <1239741958.95.0.163133681316.issue5756@psf.upfronthosting.co.za> David Ripton added the comment: issue1590 was only supposed to fix "make altinstall", which is a secondary install target intended specifically to not break the primary Python on a system. I agree with Ned that if it changed the behavior of "make install" then the change was broken. ---------- nosy: +dripton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 22:56:43 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 14 Apr 2009 20:56:43 +0000 Subject: [issue5754] Shelve module writeback parameter does not act as advertised In-Reply-To: <1239728605.41.0.419145925815.issue5754@psf.upfronthosting.co.za> Message-ID: <1239742603.12.0.495212854125.issue5754@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> aleax nosy: +aleax _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 14 22:56:50 2009 From: report at bugs.python.org (Piet van Oostrum) Date: Tue, 14 Apr 2009 20:56:50 +0000 Subject: [issue5757] Documentation error for Condition.notify() In-Reply-To: <1239742610.61.0.843225535898.issue5757@psf.upfronthosting.co.za> Message-ID: <1239742610.61.0.843225535898.issue5757@psf.upfronthosting.co.za> New submission from Piet van Oostrum : The documentation for Condition.notify() in module threading (Library Reference) contains an error: The second sentence (Wait until notified or until a timeout occurs.) shouldn't be there. Apparently it was copied and pasted from wait(). ---------- assignee: georg.brandl components: Documentation messages: 85977 nosy: georg.brandl, pietvo severity: normal status: open title: Documentation error for Condition.notify() versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 01:48:02 2009 From: report at bugs.python.org (Michael Newman) Date: Tue, 14 Apr 2009 23:48:02 +0000 Subject: [issue5758] fileinput.hook_compressed returning bytes from gz file In-Reply-To: <1239752882.45.0.853698903963.issue5758@psf.upfronthosting.co.za> Message-ID: <1239752882.45.0.853698903963.issue5758@psf.upfronthosting.co.za> New submission from Michael Newman : The attached ZIP file contains "test.bat" which runs "test.py" with Python 2.6 and Python 3.0. Python 2.6 behaves as expected (see "py26.out"), since it returns strings from both "mike.txt" and "mike.txt.gz". However, the same test with Python 3.0 returns bytes from "mike.txt.gz", as shown in "py30.out": Output: Hello from Mike. Output: This is the second line. Output: Why did the robot cross the road? Output: b'Hello from Mike.' Output: b'This is the second line.' Output: b'Why did the robot cross the road?' For reference, I tested this on Python versions: Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on win32 Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit (Intel)] on win32 ---------- components: Library (Lib) files: example.zip messages: 85978 nosy: mnewman severity: normal status: open title: fileinput.hook_compressed returning bytes from gz file type: behavior versions: Python 3.0 Added file: http://bugs.python.org/file13688/example.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 05:41:02 2009 From: report at bugs.python.org (Alexandr Zamaraev) Date: Wed, 15 Apr 2009 03:41:02 +0000 Subject: [issue5759] Do not call __float__ to classec derived from str In-Reply-To: <1239766862.72.0.608424365256.issue5759@psf.upfronthosting.co.za> Message-ID: <1239766862.72.0.608424365256.issue5759@psf.upfronthosting.co.za> New submission from Alexandr Zamaraev : Test case: [code] class S: def __init__(self, v): self.data = v def __int__(self): print("S.INT called") return int(str(self.data)) def __float__(self): print("S.FLOAT called") return float(str(self.data)) class T(str): def __int__(self): print("T.INT called") return int(str(self)) def __float__(self): print("T.FLOAT called") return float(str(self)) class U(unicode): def __int__(self): print("U.INT called") return int(unicode(self)) def __float__(self): print("U.FLOAT called") return float(unicode(self)) i = S("123") print(type(int(i))) print(type(float(i))) i = T("123") print(type(int(i))) print(type(float(i))) # <<< CALLS __float__ NOTHING i = U("123") print(type(int(i))) print(type(float(i))) [/code] Output: [code] S.INT called S.FLOAT called T.INT called U.INT called U.FLOAT called [/code] ---------- components: None messages: 85979 nosy: shura_zam severity: normal status: open title: Do not call __float__ to classec derived from str versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 06:32:37 2009 From: report at bugs.python.org (Leonid Vasilev) Date: Wed, 15 Apr 2009 04:32:37 +0000 Subject: [issue5735] Segfault when loading not recompiled module In-Reply-To: <1239448122.29.0.383715698899.issue5735@psf.upfronthosting.co.za> Message-ID: <1239769957.43.0.34150051897.issue5735@psf.upfronthosting.co.za> Leonid Vasilev added the comment: Thanks for patch, it works now: Python compiled with --with-pydebug throws an ImportError when trying to import modules compiled without --with-pydebug, as it should: ImportError: /usr/local/lib/python3.0/site-packages/ext23.so: undefined symbol: PyModule_Create2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 08:19:31 2009 From: report at bugs.python.org (Jeremy Banks) Date: Wed, 15 Apr 2009 06:19:31 +0000 Subject: [issue4291] Allow Division of datetime.timedelta Objects In-Reply-To: <1226275075.64.0.889084103082.issue4291@psf.upfronthosting.co.za> Message-ID: <1239776371.81.0.0439055292326.issue4291@psf.upfronthosting.co.za> Jeremy Banks added the comment: Redundant with #2706 and others. ---------- nosy: -belopolsky, haypo, marketdickinson status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 08:32:12 2009 From: report at bugs.python.org (Chris Rebert) Date: Wed, 15 Apr 2009 06:32:12 +0000 Subject: [issue5760] __getitem__ error message hard to understand In-Reply-To: <1239777131.98.0.31222273519.issue5760@psf.upfronthosting.co.za> Message-ID: <1239777131.98.0.31222273519.issue5760@psf.upfronthosting.co.za> New submission from Chris Rebert : Prompted by http://mail.python.org/pipermail/python-ideas/2009-April/004048.html The current error message issued when trying to use the get item ([]) operator on an object that does not define __getitem__ can be hard to understand: >>> class A(object): pass ... >>> A()['a'] Traceback (most recent call last): File "", line 1, in TypeError: 'A' object is unsubscriptable Problems observed: - "unsubscriptable" is easily misread in haste as "unscriptable", which can be quite confusing, especially to newbies - "subscripting" is not frequently used to describe the [] operator, making the message more difficult to decipher (again, esp. for newbies) - the underlying lack of a __getitem__ method is not mentioned, thus not making it obvious how to remedy the error Suggestion: Use exception chaining and rephrase the error message to get something like: AttributeError: class 'A' has no attribute '__getitem__' The above exception was the direct cause of the following exception: TypeError: 'A' object does not support the 'get item' operator Similar changes should be made to __setitem__ & __delitem__. ---------- components: Interpreter Core messages: 85983 nosy: cvrebert severity: normal status: open title: __getitem__ error message hard to understand type: behavior versions: Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 11:04:13 2009 From: report at bugs.python.org (Alessio G. B.) Date: Wed, 15 Apr 2009 09:04:13 +0000 Subject: [issue1353344] python.desktop Message-ID: <1239786253.74.0.98275687612.issue1353344@psf.upfronthosting.co.za> Alessio G. B. added the comment: I have added the Italian translation. ---------- nosy: +agb Added file: http://bugs.python.org/file13689/python.desktop _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 12:02:58 2009 From: report at bugs.python.org (Andreas Schawo) Date: Wed, 15 Apr 2009 10:02:58 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1239789778.27.0.556652412055.issue5463@psf.upfronthosting.co.za> Andreas Schawo added the comment: Hi, could you have a look at cleanup_float_coerce_patch.diff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 12:12:06 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 15 Apr 2009 10:12:06 +0000 Subject: [issue5737] add Solaris errnos In-Reply-To: <1239469549.92.0.788554665966.issue5737@psf.upfronthosting.co.za> Message-ID: <1239790326.51.0.894963161923.issue5737@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- keywords: +easy priority: -> normal stage: -> needs patch versions: +Python 2.7, Python 3.1 -Python 2.4, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 12:13:28 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 15 Apr 2009 10:13:28 +0000 Subject: [issue5108] Invalid UTF-8 ("%s") length in PyUnicode_FromFormatV() In-Reply-To: <1233314818.25.0.50797871273.issue5108@psf.upfronthosting.co.za> Message-ID: <1239790408.55.0.589769929986.issue5108@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- priority: -> critical stage: -> patch review type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 12:14:47 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 15 Apr 2009 10:14:47 +0000 Subject: [issue5726] ld_so_aix does exit successfully even in case of failure In-Reply-To: <1239270884.66.0.724599515484.issue5726@psf.upfronthosting.co.za> Message-ID: <1239790487.82.0.969286018272.issue5726@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch looks good to me. ---------- nosy: +pitrou priority: -> normal resolution: -> accepted stage: -> commit review versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 12:18:46 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 15 Apr 2009 10:18:46 +0000 Subject: [issue5720] ctime: I don't think that word means what you think it means. In-Reply-To: <1239141469.77.0.706973197517.issue5720@psf.upfronthosting.co.za> Message-ID: <1239790726.34.0.196347784512.issue5720@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sounds like a good idea, perhaps you could launch a discussion on python-dev? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 12:23:45 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 15 Apr 2009 10:23:45 +0000 Subject: [issue5099] subprocess.POpen.__del__() AttributeError (os module == None!) In-Reply-To: <1233244808.27.0.922840300181.issue5099@psf.upfronthosting.co.za> Message-ID: <1239791025.23.0.453007352231.issue5099@psf.upfronthosting.co.za> Antoine Pitrou added the comment: There should be a try/finally in test_issue5099 to ensure that os.remove(fname) always gets called. Otherwise, looks good. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 12:28:17 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 15 Apr 2009 10:28:17 +0000 Subject: [issue5330] profile and cProfile do not report C functions called with keyword arguments In-Reply-To: <1235135420.93.0.617344393794.issue5330@psf.upfronthosting.co.za> Message-ID: <1239791297.63.0.401038861419.issue5330@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> patch review versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 12:45:47 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 15 Apr 2009 10:45:47 +0000 Subject: [issue5761] add file name to py3k IO objects repr() In-Reply-To: <1239792347.2.0.639213233478.issue5761@psf.upfronthosting.co.za> Message-ID: <1239792347.2.0.639213233478.issue5761@psf.upfronthosting.co.za> New submission from Antoine Pitrou : >>> f = open("py3k/__svn__/LICENSE") >>> f >>> f.buffer <_io.BufferedReader object at 0x7f4b67569f68> >>> f.buffer.raw io.FileIO(3, 'rb') >>> f.name 'py3k/__svn__/LICENSE' It would probably be nice if f.name were reused for f's repr(). ---------- components: Library (Lib) messages: 85989 nosy: benjamin.peterson, pitrou priority: normal severity: normal stage: test needed status: open title: add file name to py3k IO objects repr() type: feature request versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 14:34:34 2009 From: report at bugs.python.org (Husen daudi) Date: Wed, 15 Apr 2009 12:34:34 +0000 Subject: [issue5762] AttributeError: 'NoneType' object has no attribute 'replace' In-Reply-To: <1239798874.6.0.325655580097.issue5762@psf.upfronthosting.co.za> Message-ID: <1239798874.6.0.325655580097.issue5762@psf.upfronthosting.co.za> New submission from Husen daudi : [2009-04-15 17:53:10,198] ERROR:web-services:[19]: _write_data(writer, attrs[a_name].value) [2009-04-15 17:53:10,198] ERROR:web-services:[20]: File "/usr/lib/python2.5/site-packages/oldxml/_xmlplus/dom/minidom.py", line 305, in _write_data [2009-04-15 17:53:10,199] ERROR:web-services:[21]: data = data.replace("&", "&").replace("<", "<") [2009-04-15 17:53:10,199] ERROR:web-services:[22]: AttributeError: 'NoneType' object has no attribute 'replace' _write_data dunction should be something like this def _write_data(writer, data): "Writes datachars to writer." if data: data = data.replace("&", "&").replace("<", "<") data = data.replace("\"", """).replace(">", ">") writer.write(data) ---------- components: XML messages: 85990 nosy: hda severity: normal status: open title: AttributeError: 'NoneType' object has no attribute 'replace' type: crash versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 16:27:33 2009 From: report at bugs.python.org (Robert Xiao) Date: Wed, 15 Apr 2009 14:27:33 +0000 Subject: [issue5762] AttributeError: 'NoneType' object has no attribute 'replace' In-Reply-To: <1239798874.6.0.325655580097.issue5762@psf.upfronthosting.co.za> Message-ID: <1239805653.8.0.804676641012.issue5762@psf.upfronthosting.co.za> Robert Xiao added the comment: Have you tried this with xml.dom.minidom? ---------- nosy: +nneonneo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 17:10:47 2009 From: report at bugs.python.org (vid podpecan) Date: Wed, 15 Apr 2009 15:10:47 +0000 Subject: [issue5763] scope resolving error In-Reply-To: <1239808247.23.0.84220378754.issue5763@psf.upfronthosting.co.za> Message-ID: <1239808247.23.0.84220378754.issue5763@psf.upfronthosting.co.za> New submission from vid podpecan : Consider the following two functions: def outer(): a = 1 def inner(): print a inner() #end outer() def outer_BUG(): a = 1 def inner(): print a a = 2 inner() #end outer_BUG() The first function outer() works as expected (it prints 1), but the second function ends with an UnboundLocalError, which says that the "print a" statement inside inner() function references a variable before assignment. Somehow, the interpreter gets to this conclusion by looking at the next statement (a = 2) and forgets the already present variable a from outer function. This was observed with python 2.5.4 and older 2.5.2. Other releases were not inspected. Best regards, Vid ---------- messages: 85992 nosy: vpodpecan severity: normal status: open title: scope resolving error type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 17:26:13 2009 From: report at bugs.python.org (R. David Murray) Date: Wed, 15 Apr 2009 15:26:13 +0000 Subject: [issue5759] __float__ not called by 'float' on classes derived from str In-Reply-To: <1239766862.72.0.608424365256.issue5759@psf.upfronthosting.co.za> Message-ID: <1239809173.14.0.97549929389.issue5759@psf.upfronthosting.co.za> R. David Murray added the comment: I have confirmed this in trunk and py3k, unit tests attached. ---------- components: +Interpreter Core -None keywords: +patch nosy: +r.david.murray priority: -> normal stage: -> needs patch title: Do not call __float__ to classes derived from str -> __float__ not called by 'float' on classes derived from str type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.5 Added file: http://bugs.python.org/file13690/issue5759-trunk-test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 17:26:30 2009 From: report at bugs.python.org (R. David Murray) Date: Wed, 15 Apr 2009 15:26:30 +0000 Subject: [issue5759] __float__ not called by 'float' on classes derived from str In-Reply-To: <1239766862.72.0.608424365256.issue5759@psf.upfronthosting.co.za> Message-ID: <1239809190.7.0.582096643907.issue5759@psf.upfronthosting.co.za> Changes by R. David Murray : Added file: http://bugs.python.org/file13691/issue5759-py3k-test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 17:34:35 2009 From: report at bugs.python.org (Leonard Ritter) Date: Wed, 15 Apr 2009 15:34:35 +0000 Subject: [issue4954] native build of python win32 using msys under wine. In-Reply-To: <1232054464.28.0.565807306717.issue4954@psf.upfronthosting.co.za> Message-ID: <1239809675.54.0.837738015507.issue4954@psf.upfronthosting.co.za> Leonard Ritter added the comment: Hello everyone, I'm seconding the wish to be able to build Python with MSYS on Win32, and I can give several technical reasons: It is my understanding that in order to build an extension for Python on Win32, one requires to use the same compiler as the one Python has been built with. Therefore, the choice of compiler affects not only Win32 developers working on the interpreter itself, but also developing and porting C/C++ based extensions. As of now, Microsoft has released its Visual C++ compiler in various versions, some free of cost (Express), some expensive (Studio). Express versions change every year, while Studio versions change every two years. Express versions supersede each other, so once a new version is available, the older version is virtually impossible to get. Python binary releases for Win32 use the Visual Studio 2005 compiler, which is not freely available, but must be bought. Right now, it's impossible to build an extension using distutils without hacking the VC builder a bit. VCExpress uses a slightly different registry layout for various settings, which causes the builder to fail. It takes considerable effort to keep Python/Win32 setup tools compatible for VC, and all this is done to support the native compiler sufficiently, a goal that appears to me more and more as an aesthetic choice rather than a practical one. A developer wishing to deploy Win32 binaries for his extensions is currently forced to go through above hurdles or eventually buy a Microsoft product to make the pain go away. Cross-building extensions for Python on Unix using Wine is impossible because no supported version of either VS or VC++ works. I call this a terrible situation. Cygwin is the second alternative. Building Python using Cygwin makes Python and all its extensions dependent on cygwin.dll, plus it's also, as far as I gather, imitating a Unix environment for runtimes, rather than a native Win32 one, which may cripple an applications abilities to adapt to its target platform. >From my perspective, MSYS does deliver. Resulting binaries depend only on available libraries coming with the OS. MSYS is practically available to everybody. MSYS also supports cross compiling, so Python binaries could even be built without Wine. On Windows, Eclipse CDT supports MSYS as a native backend. I would actually very much prefer if the default distribution of Python for Win32 were to use MSYS, but I understand that developers working on the Win32 platform prefer to use their native tools. It's also unnecessary, as you can gather from the following: I mainly develop games and multimedia applications on the Linux platform, for convenience reasons. Using MSYS, I could easily deploy a minimal custom-built version of Python with required extensions in one package, without any dependency on simulated unix enviroments. I could cross-build these apps on Linux, and test them for Win32 within Wine. If they work in Wine, they will definitely work on Windows. I would need neither a VC/VS nor a Windows license to support it. I call that a wonderful situation. LKCL: although you are clearly a mad scientist, please do continue your work. Do not get frustrated by ignorant responses and keep calm. You do pioneering, disruptive work, and such work will always be misunderstood and criticized because it requires a throughout understanding of future possibilities. Nevertheless, I see the feature you are trying to implement as trivial and self-explaining, something that should have been part of Python for a long time. People like me never took the time to file a ticket or make a comment though. We are busy bastards, I apologize. ---------- nosy: +lritter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 17:44:45 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 15 Apr 2009 15:44:45 +0000 Subject: [issue5763] scope resolving error In-Reply-To: <1239808247.23.0.84220378754.issue5763@psf.upfronthosting.co.za> Message-ID: <1239810285.9.0.740893152304.issue5763@psf.upfronthosting.co.za> Mark Dickinson added the comment: This is not a bug, just a common gotcha. The rules are described at: http://docs.python.org/reference/executionmodel.html#naming Here's the relevant excerpt: """If a name binding operation occurs anywhere within a code block, all uses of the name within the block are treated as references to the current block. This can lead to errors when a name is used within a block before it is bound. This rule is subtle. Python lacks declarations and allows name binding operations to occur anywhere within a code block. The local variables of a code block can be determined by scanning the entire text of the block for name binding operations.""" ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 17:45:41 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 15 Apr 2009 15:45:41 +0000 Subject: [issue5763] scope resolving error In-Reply-To: <1239808247.23.0.84220378754.issue5763@psf.upfronthosting.co.za> Message-ID: <1239810341.87.0.594283488053.issue5763@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing as invalid. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 17:57:07 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 15 Apr 2009 15:57:07 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1239811027.02.0.706190019778.issue5463@psf.upfronthosting.co.za> Mark Dickinson added the comment: The _struct.c part of the patch looks good. For the tests, there should be some tests to check that attempting to pack a float with an integer format gives either TypeError or struct.error. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 17:57:15 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 15 Apr 2009 15:57:15 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1239811035.15.0.680669852594.issue5463@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 17:58:28 2009 From: report at bugs.python.org (Ding Xuan) Date: Wed, 15 Apr 2009 15:58:28 +0000 Subject: [issue5764] 2.6.2 Python Manuals CHM file seems broken In-Reply-To: <1239811108.5.0.558563747483.issue5764@psf.upfronthosting.co.za> Message-ID: <1239811108.5.0.558563747483.issue5764@psf.upfronthosting.co.za> New submission from Ding Xuan : e.g. "The Python Tutorial" menu cannot be unfolded, so as "Using Python", etc. ---------- assignee: georg.brandl components: Documentation messages: 85998 nosy: dx617, georg.brandl severity: normal status: open title: 2.6.2 Python Manuals CHM file seems broken versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 22:41:46 2009 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 15 Apr 2009 20:41:46 +0000 Subject: [issue3754] minimal cross-compilation support for configure In-Reply-To: <1220305759.82.0.468834426074.issue3754@psf.upfronthosting.co.za> Message-ID: <1239828106.83.0.155162292438.issue3754@psf.upfronthosting.co.za> Changes by Roumen Petrov : Added file: http://bugs.python.org/file13692/python-trunk-20090415-CROSS.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 22:41:54 2009 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 15 Apr 2009 20:41:54 +0000 Subject: [issue3754] minimal cross-compilation support for configure In-Reply-To: <1220305759.82.0.468834426074.issue3754@psf.upfronthosting.co.za> Message-ID: <1239828114.21.0.753635043577.issue3754@psf.upfronthosting.co.za> Changes by Roumen Petrov : Removed file: http://bugs.python.org/file11664/python-trunk-CROSS.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 22:42:10 2009 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 15 Apr 2009 20:42:10 +0000 Subject: [issue3754] minimal cross-compilation support for configure In-Reply-To: <1220305759.82.0.468834426074.issue3754@psf.upfronthosting.co.za> Message-ID: <1239828130.79.0.375595207892.issue3754@psf.upfronthosting.co.za> Changes by Roumen Petrov : Removed file: http://bugs.python.org/file12268/python-trunk-CROSS.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 22:43:14 2009 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 15 Apr 2009 20:43:14 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1239828194.24.0.208245835884.issue3871@psf.upfronthosting.co.za> Changes by Roumen Petrov : Added file: http://bugs.python.org/file13693/python-trunk-20090415-MINGW.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 23:00:39 2009 From: report at bugs.python.org (Timothy Farrell) Date: Wed, 15 Apr 2009 21:00:39 +0000 Subject: [issue4953] cgi module cannot handle POST with multipart/form-data in 3.0 In-Reply-To: <1232010166.79.0.972664060868.issue4953@psf.upfronthosting.co.za> Message-ID: <1239829239.7.0.324720053213.issue4953@psf.upfronthosting.co.za> Changes by Timothy Farrell : ---------- nosy: +tercero12 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 23:02:18 2009 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 15 Apr 2009 21:02:18 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1239829338.3.0.807366908728.issue3871@psf.upfronthosting.co.za> Changes by Roumen Petrov : Removed file: http://bugs.python.org/file13693/python-trunk-20090415-MINGW.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 23:02:55 2009 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 15 Apr 2009 21:02:55 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1239829375.74.0.0153811918548.issue3871@psf.upfronthosting.co.za> Changes by Roumen Petrov : Added file: http://bugs.python.org/file13694/python-trunk-20090416-MINGW.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 23:05:08 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 15 Apr 2009 21:05:08 +0000 Subject: [issue5676] shutils test fails on ZFS (on FUSE, on Linux) In-Reply-To: <1238719617.07.0.390323030603.issue5676@psf.upfronthosting.co.za> Message-ID: <1239829508.2.0.109098534777.issue5676@psf.upfronthosting.co.za> Benjamin Peterson added the comment: 1. You should always compare functions with "is". 2. You should add a comment explaining why os.listdir is special cased. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 23:15:41 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 15 Apr 2009 21:15:41 +0000 Subject: [issue5761] add file name to py3k IO objects repr() In-Reply-To: <1239792347.2.0.639213233478.issue5761@psf.upfronthosting.co.za> Message-ID: <1239830141.31.0.381545158175.issue5761@psf.upfronthosting.co.za> Benjamin Peterson added the comment: What should we do about filenames of bytes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 23:25:19 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 15 Apr 2009 21:25:19 +0000 Subject: [issue1521491] file.seek() influences write() when opened with a+ mode Message-ID: <1239830719.55.0.19746382712.issue1521491@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I can't reproduce it with python2.6 on Vista. The newer C runtime (msvcr90.dll) probably corrected this. ---------- nosy: +amaury.forgeotdarc resolution: -> out of date status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 15 23:27:17 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 15 Apr 2009 21:27:17 +0000 Subject: [issue5759] __float__ not called by 'float' on classes derived from str In-Reply-To: <1239766862.72.0.608424365256.issue5759@psf.upfronthosting.co.za> Message-ID: <1239830837.99.0.360133672312.issue5759@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for the tests. Fixed in r71627. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 00:37:41 2009 From: report at bugs.python.org (R. David Murray) Date: Wed, 15 Apr 2009 22:37:41 +0000 Subject: [issue3440] Starting any program as a subprocess fails when subprocess.Popen has env argument In-Reply-To: <1216933135.87.0.837899480676.issue3440@psf.upfronthosting.co.za> Message-ID: <1239835061.65.0.3533999631.issue3440@psf.upfronthosting.co.za> R. David Murray added the comment: Doc patch applied in r71631. ---------- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 00:59:42 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 15 Apr 2009 22:59:42 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1239836382.32.0.888721229034.issue2636@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 01:13:42 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 15 Apr 2009 23:13:42 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1239837222.98.0.411907555377.issue2636@psf.upfronthosting.co.za> Gregory P. Smith added the comment: fyi - I can't compile issue2636-patch-1.diff when applied to trunk (2.7) using gcc 4.0.3. many errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 01:19:47 2009 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 15 Apr 2009 23:19:47 +0000 Subject: [issue5728] Support telling TestResult objects a test run has finished In-Reply-To: <1239279324.74.0.826216289254.issue5728@psf.upfronthosting.co.za> Message-ID: <1239837587.98.0.602378196215.issue5728@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: The patch looks fine to me, except that it's missing documentation updates. The feature and names are fine too. ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 01:37:37 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Wed, 15 Apr 2009 23:37:37 +0000 Subject: [issue5765] stack overflow evaluating eval("()" * 30000) In-Reply-To: <1239838657.22.0.326859227165.issue5765@psf.upfronthosting.co.za> Message-ID: <1239838657.22.0.326859227165.issue5765@psf.upfronthosting.co.za> New submission from Gabriel Genellina : Originally reported by Juanjo Conti at PyAr: http://blog.gmane.org/gmane.org.user-groups.python.argentina/ day=20090415 Evaluating this expression causes a stack overflow, and the Python interpreter exits abnormally: eval("()" * 30000) 3.0.1, 2.6, 2.5 and current 2.x trunk all fail on Windows; the original reporter was likely using Linux. Some versions may require a larger constant instead of 30000. 2.4 isn't affected; it raises a "TypeError: 'tuple' object is not callable" as expected, even for extremely long sequences. Alberto Bertogli said: inside eval, symtable_visit_expr() (Python/ symtable.c) is called recursively (thru the VISIT/VISIT_SEQ macros), eventually taking all stack space. ---------- components: Interpreter Core messages: 86006 nosy: gagenellina severity: normal status: open title: stack overflow evaluating eval("()" * 30000) type: crash versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 01:43:13 2009 From: report at bugs.python.org (Robert Collins) Date: Wed, 15 Apr 2009 23:43:13 +0000 Subject: [issue5728] Support telling TestResult objects a test run has finished In-Reply-To: <1239837587.98.0.602378196215.issue5728@psf.upfronthosting.co.za> Message-ID: <1239838967.2892.615.camel@lifeless-64> Robert Collins added the comment: On Wed, 2009-04-15 at 23:19 +0000, Barry A. Warsaw wrote: > Barry A. Warsaw added the comment: > > The patch looks fine to me, except that it's missing documentation > updates. The feature and names are fine too. Where do the docs go? -Rob ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 01:51:23 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 15 Apr 2009 23:51:23 +0000 Subject: [issue5765] stack overflow evaluating eval("()" * 30000) In-Reply-To: <1239838657.22.0.326859227165.issue5765@psf.upfronthosting.co.za> Message-ID: <1239839483.35.0.89805378234.issue5765@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is a pathological case. I suppose we have to add a recursion counter to the compiler struct. ---------- nosy: +benjamin.peterson priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 02:12:20 2009 From: report at bugs.python.org (Bryan Blackburn) Date: Thu, 16 Apr 2009 00:12:20 +0000 Subject: [issue5766] Mac/scripts/BuildApplet.py reset of sys.executable during install can cause it to use wrong modules In-Reply-To: <1239840739.74.0.413438515887.issue5766@psf.upfronthosting.co.za> Message-ID: <1239840739.74.0.413438515887.issue5766@psf.upfronthosting.co.za> New submission from Bryan Blackburn : With Python 2.6.1 currently installed and attempting to install 2.6.2 into a DESTDIR location, and having a different configuration for the new one (2.6.1 built with default Unicode settings, 2.6.2 with UCS4), BuildApplet.py fails because of symbol not found. Full output (building with MacPorts, hence the sometimes-funky paths) attached as a text file. ---------- components: Installation, Macintosh files: python262_error.txt messages: 86009 nosy: blb severity: normal status: open title: Mac/scripts/BuildApplet.py reset of sys.executable during install can cause it to use wrong modules type: compile error versions: Python 2.6 Added file: http://bugs.python.org/file13695/python262_error.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 02:19:59 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Thu, 16 Apr 2009 00:19:59 +0000 Subject: [issue5767] xmlrpclib loads invalid documents In-Reply-To: <1239841199.24.0.504542013197.issue5767@psf.upfronthosting.co.za> Message-ID: <1239841199.24.0.504542013197.issue5767@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : Prior versions of xmlrpclib.loads would raise an exception when passed malformed documents: exarkun at bigdog24:~/_trial_temp$ python2.4 -c 'from xmlrpclib import loads; loads("\x00\n\n \n \n \n \n\n")' Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.4/xmlrpclib.py", line 1079, in loads p.feed(data) File "/usr/lib/python2.4/xmlrpclib.py", line 527, in feed self._parser.Parse(data, 0) xml.parsers.expat.ExpatError: not well-formed (invalid token): line 2, column 0 However, as of the most recent Python 2.5 and Python 2.6 point releases, this is no longer the case: exarkun at bigdog24:~/_trial_temp$ python2.5 -c 'from xmlrpclib import loads; loads("\x00\n\n \n \n \n \n\n")' exarkun at bigdog24:~/_trial_temp$ python2.6 -c 'from xmlrpclib import loads; loads("\x00\n\n \n \n \n \n\n")' exarkun at bigdog24:~/_trial_temp$ Previous versions of Python 2.5 and Python 2.6 did not exhibit this misbehavior. ---------- components: Library (Lib) messages: 86010 nosy: exarkun severity: normal status: open title: xmlrpclib loads invalid documents type: behavior versions: Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 02:28:23 2009 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 16 Apr 2009 00:28:23 +0000 Subject: [issue5728] Support telling TestResult objects a test run has finished In-Reply-To: <1239838967.2892.615.camel@lifeless-64> Message-ID: <0272E709-B94A-4A66-9E6F-E30D78FB81BD@python.org> Barry A. Warsaw added the comment: On Apr 15, 2009, at 7:43 PM, Robert Collins wrote: > Robert Collins added the comment: > > On Wed, 2009-04-15 at 23:19 +0000, Barry A. Warsaw wrote: >> Barry A. Warsaw added the comment: >> >> The patch looks fine to me, except that it's missing documentation >> updates. The feature and names are fine too. > > Where do the docs go? Doc/library/unittest.rst ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 03:45:45 2009 From: report at bugs.python.org (Victor Godoy Poluceno) Date: Thu, 16 Apr 2009 01:45:45 +0000 Subject: [issue5748] Objects/bytesobject.c should include stringdefs.h, instead of defining its own macros In-Reply-To: <1239657309.78.0.97481273251.issue5748@psf.upfronthosting.co.za> Message-ID: <1239846345.05.0.453122657907.issue5748@psf.upfronthosting.co.za> Changes by Victor Godoy Poluceno : ---------- nosy: +victorpoluceno _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 05:19:01 2009 From: report at bugs.python.org (Collin Winter) Date: Thu, 16 Apr 2009 03:19:01 +0000 Subject: [issue5665] Add more pickling tests In-Reply-To: <1238647549.17.0.666638819326.issue5665@psf.upfronthosting.co.za> Message-ID: <1239851941.72.0.223041767397.issue5665@psf.upfronthosting.co.za> Collin Winter added the comment: Committed as r71408 (trunk) and r71638 (py3k). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 06:59:54 2009 From: report at bugs.python.org (Husen daudi) Date: Thu, 16 Apr 2009 04:59:54 +0000 Subject: [issue5762] AttributeError: 'NoneType' object has no attribute 'replace' In-Reply-To: <1239798874.6.0.325655580097.issue5762@psf.upfronthosting.co.za> Message-ID: <1239857993.92.0.0512830982643.issue5762@psf.upfronthosting.co.za> Husen daudi added the comment: Yes I am using xml.dom.minidom doc.toprettyxml(indent="\t").encode('utf-8') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 07:37:35 2009 From: report at bugs.python.org (Jess Austin) Date: Thu, 16 Apr 2009 05:37:35 +0000 Subject: [issue5434] datetime.monthdelta In-Reply-To: <1236402290.49.0.02662803662.issue5434@psf.upfronthosting.co.za> Message-ID: <1239860254.23.0.275309692696.issue5434@psf.upfronthosting.co.za> Changes by Jess Austin : Added file: http://bugs.python.org/file13696/monthdelta2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 07:38:22 2009 From: report at bugs.python.org (Jess Austin) Date: Thu, 16 Apr 2009 05:38:22 +0000 Subject: [issue5434] datetime.monthdelta In-Reply-To: <1236402290.49.0.02662803662.issue5434@psf.upfronthosting.co.za> Message-ID: <1239860302.32.0.0655849730976.issue5434@psf.upfronthosting.co.za> Changes by Jess Austin : Removed file: http://bugs.python.org/file13309/monthdelta.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 08:37:42 2009 From: report at bugs.python.org (Husen daudi) Date: Thu, 16 Apr 2009 06:37:42 +0000 Subject: [issue5762] AttributeError: 'NoneType' object has no attribute 'replace' In-Reply-To: <1239798874.6.0.325655580097.issue5762@psf.upfronthosting.co.za> Message-ID: <1239863859.29.0.0182953404672.issue5762@psf.upfronthosting.co.za> Husen daudi added the comment: Here is the full traceback... [2009-04-16 12:00:03,487] ERROR:web-services:[01]: Exception in call: Traceback (most recent call last): [2009-04-16 12:00:03,487] ERROR:web-services:[02]: File "/home/hda/tiny/bzrtrunk/latest_released/server/bin/wizard/__init__.py", line 74, in execute_cr [2009-04-16 12:00:03,487] ERROR:web-services:[03]: action_res = action(self, cr, uid, data, context) [2009-04-16 12:00:03,488] ERROR:web-services:[04]: File "/home/hda/tiny/bzrtrunk/latest_released/addons/base_module_record/wizard/base_module_save.py", line 113, in _create_module [2009-04-16 12:00:03,488] ERROR:web-services:[05]: res_xml = mod.generate_xml(cr, uid) [2009-04-16 12:00:03,488] ERROR:web-services:[06]: File "/home/hda/tiny/bzrtrunk/latest_released/addons/base_module_record/base_module_record.py", line 328, in generate_xml [2009-04-16 12:00:03,488] ERROR:web-services:[07]: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: [2009-04-16 12:00:03,488] ERROR:web-services:[08]: File "/usr/lib/python2.5/site-packages/oldxml/_xmlplus/dom/minidom.py", line 47, in toxml [2009-04-16 12:00:03,488] ERROR:web-services:[09]: return self.toprettyxml("", "", encoding) [2009-04-16 12:00:03,489] ERROR:web-services:[10]: File "/usr/lib/python2.5/site-packages/oldxml/_xmlplus/dom/minidom.py", line 59, in toprettyxml [2009-04-16 12:00:03,489] ERROR:web-services:[11]: self.writexml(writer, "", indent, newl, encoding) [2009-04-16 12:00:03,489] ERROR:web-services:[12]: File "/usr/lib/python2.5/site-packages/oldxml/_xmlplus/dom/minidom.py", line 1746, in writexml [2009-04-16 12:00:03,489] ERROR:web-services:[13]: node.writexml(writer, indent, addindent, newl) [2009-04-16 12:00:03,489] ERROR:web-services:[14]: File "/usr/lib/python2.5/site-packages/oldxml/_xmlplus/dom/minidom.py", line 821, in writexml [2009-04-16 12:00:03,490] ERROR:web-services:[15]: node.writexml(writer,indent+addindent,addindent,newl) [2009-04-16 12:00:03,490] ERROR:web-services:[16]: File "/usr/lib/python2.5/site-packages/oldxml/_xmlplus/dom/minidom.py", line 821, in writexml [2009-04-16 12:00:03,490] ERROR:web-services:[17]: node.writexml(writer,indent+addindent,addindent,newl) [2009-04-16 12:00:03,490] ERROR:web-services:[18]: File "/usr/lib/python2.5/site-packages/oldxml/_xmlplus/dom/minidom.py", line 816, in writexml [2009-04-16 12:00:03,491] ERROR:web-services:[19]: _write_data(writer, attrs[a_name].value) [2009-04-16 12:00:03,491] ERROR:web-services:[20]: File "/usr/lib/python2.5/site-packages/oldxml/_xmlplus/dom/minidom.py", line 304, in _write_data [2009-04-16 12:00:03,491] ERROR:web-services:[21]: data = data.replace("&", "&").replace("<", "<") [2009-04-16 12:00:03,491] ERROR:web-services:[22]: AttributeError: 'NoneType' object has no attribute 'replace' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 08:46:38 2009 From: report at bugs.python.org (Naoki INADA) Date: Thu, 16 Apr 2009 06:46:38 +0000 Subject: [issue5768] logging don't encode Unicode message correctly. In-Reply-To: <1239864394.45.0.809519102245.issue5768@psf.upfronthosting.co.za> Message-ID: <1239864394.45.0.809519102245.issue5768@psf.upfronthosting.co.za> New submission from Naoki INADA : >>> logging.error(u'?') ERROR:root:?? >>> sys.stderr.encoding 'cp932' This bug is introduced by following commit. http://svn.python.org/view/python/branches/release26- maint/Lib/logging/__init__.py?r1=68830&r2=69448 ---------- components: Library (Lib) files: logging_init.diff keywords: patch messages: 86015 nosy: naoki severity: normal status: open title: logging don't encode Unicode message correctly. type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file13697/logging_init.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 08:49:02 2009 From: report at bugs.python.org (Ned Deily) Date: Thu, 16 Apr 2009 06:49:02 +0000 Subject: [issue5769] OS X Installer: new make of documentation installs at wrong location In-Reply-To: <1239864540.13.0.520124833397.issue5769@psf.upfronthosting.co.za> Message-ID: <1239864540.13.0.520124833397.issue5769@psf.upfronthosting.co.za> New submission from Ned Deily : r70727 and related merges changed the OS X build-installer script to build documentation from scratch using sphinx rather than the previous error-prone downloading. However, it appears the documentation is ending up at a different location in the framework, i.e. there is one extra directory now "python-docs-html": old: file:///Library/Frameworks/Python.framework/Versions/2.6/Resources/Engli sh.lproj/Documentation/index.html new: file:///Library/Frameworks/Python.framework/Versions/2.6/Resources/Engli sh.lproj/Documentation/python-docs-html/index.html Besides breaking users' bookmarks, it also causes IDLE to not find the on-disk documentation and forces doc web page loads from python.org. ---------- components: Build, Macintosh messages: 86016 nosy: nad, ronaldoussoren severity: normal status: open title: OS X Installer: new make of documentation installs at wrong location versions: Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 08:55:42 2009 From: report at bugs.python.org (Naoki INADA) Date: Thu, 16 Apr 2009 06:55:42 +0000 Subject: [issue5768] logging don't encode Unicode message correctly. In-Reply-To: <1239864394.45.0.809519102245.issue5768@psf.upfronthosting.co.za> Message-ID: <1239864941.59.0.737074377406.issue5768@psf.upfronthosting.co.za> Changes by Naoki INADA : Removed file: http://bugs.python.org/file13697/logging_init.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 08:58:10 2009 From: report at bugs.python.org (Naoki INADA) Date: Thu, 16 Apr 2009 06:58:10 +0000 Subject: [issue5768] logging don't encode Unicode message correctly. In-Reply-To: <1239864394.45.0.809519102245.issue5768@psf.upfronthosting.co.za> Message-ID: <1239865090.45.0.107425773426.issue5768@psf.upfronthosting.co.za> Changes by Naoki INADA : Added file: http://bugs.python.org/file13698/logging_init.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 11:36:32 2009 From: report at bugs.python.org (Larry Hastings) Date: Thu, 16 Apr 2009 09:36:32 +0000 Subject: [issue5676] shutils test fails on ZFS (on FUSE, on Linux) In-Reply-To: <1238719617.07.0.390323030603.issue5676@psf.upfronthosting.co.za> Message-ID: <1239874591.72.0.997971704324.issue5676@psf.upfronthosting.co.za> Larry Hastings added the comment: Done and done. I also changed cleanup_test_droppings() in Lib/test/regrtest.py; it now chmods the, uh, droppings before it attempts their removal. ---------- Added file: http://bugs.python.org/file13699/lch.test_shutil.r71641.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 11:47:33 2009 From: report at bugs.python.org (Garrett Cooper) Date: Thu, 16 Apr 2009 09:47:33 +0000 Subject: [issue5770] SA bugs with unittest.py In-Reply-To: <1239875252.02.0.167158761739.issue5770@psf.upfronthosting.co.za> Message-ID: <1239875252.02.0.167158761739.issue5770@psf.upfronthosting.co.za> New submission from Garrett Cooper : A handful of valid bugs were reported with pylint when I was backporting unittest.py r71263 to 2.4/2.5 from HEAD. The attached diff fixes them. ---------- components: Extension Modules, Tests files: unittest-sa_fix-r71263.diff keywords: patch messages: 86018 nosy: yaneurabeya severity: normal status: open title: SA bugs with unittest.py type: compile error versions: Python 2.7 Added file: http://bugs.python.org/file13700/unittest-sa_fix-r71263.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 11:53:14 2009 From: report at bugs.python.org (Garrett Cooper) Date: Thu, 16 Apr 2009 09:53:14 +0000 Subject: [issue5771] SA bugs with unittest.py@r71263 In-Reply-To: <1239875594.79.0.0374770932255.issue5771@psf.upfronthosting.co.za> Message-ID: <1239875594.79.0.0374770932255.issue5771@psf.upfronthosting.co.za> New submission from Garrett Cooper : A handful of valid bugs were reported with pylint when I was backporting unittest.py r71263 to 2.4/2.5 from HEAD for . The attached diff fixes them. ---------- components: Extension Modules, Tests files: unittest-sa_fix-r71263.diff keywords: patch messages: 86019 nosy: benjamin.peterson, gregory.p.smith, michael.foord, yaneurabeya severity: normal status: open title: SA bugs with unittest.py at r71263 type: compile error versions: Python 2.7 Added file: http://bugs.python.org/file13701/unittest-sa_fix-r71263.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 12:05:49 2009 From: report at bugs.python.org (Garrett Cooper) Date: Thu, 16 Apr 2009 10:05:49 +0000 Subject: [issue5771] SA bugs with unittest.py@r71263 In-Reply-To: <1239875594.79.0.0374770932255.issue5771@psf.upfronthosting.co.za> Message-ID: <1239876349.41.0.0152538629797.issue5771@psf.upfronthosting.co.za> Garrett Cooper added the comment: Ugh... The `@staticmethod fix' was invalid. ---------- Added file: http://bugs.python.org/file13702/unittest-sa_fix-r71263.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 12:05:59 2009 From: report at bugs.python.org (Garrett Cooper) Date: Thu, 16 Apr 2009 10:05:59 +0000 Subject: [issue5771] SA bugs with unittest.py@r71263 In-Reply-To: <1239875594.79.0.0374770932255.issue5771@psf.upfronthosting.co.za> Message-ID: <1239876359.84.0.165619244803.issue5771@psf.upfronthosting.co.za> Changes by Garrett Cooper : Removed file: http://bugs.python.org/file13701/unittest-sa_fix-r71263.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 12:57:21 2009 From: report at bugs.python.org (Eric Smith) Date: Thu, 16 Apr 2009 10:57:21 +0000 Subject: [issue5772] For float.__format__, don't add a trailing ".0" if we're using no type code and we have an exponent In-Reply-To: <1239879441.22.0.242976004703.issue5772@psf.upfronthosting.co.za> Message-ID: <1239879441.22.0.242976004703.issue5772@psf.upfronthosting.co.za> New submission from Eric Smith : The point of the empty type code is to make sure a number looks like a float (so as to avoid formatting 2.0 as "2"). But if we have an exponent, the result already looks like a float, so there's no need to modify the number further. ---------- assignee: eric.smith components: Interpreter Core keywords: easy messages: 86021 nosy: eric.smith, marketdickinson priority: normal severity: normal status: open title: For float.__format__, don't add a trailing ".0" if we're using no type code and we have an exponent type: behavior versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 13:09:21 2009 From: report at bugs.python.org (Eric Smith) Date: Thu, 16 Apr 2009 11:09:21 +0000 Subject: [issue5772] For float.__format__, don't add a trailing ".0" if we're using no type code and we have an exponent In-Reply-To: <1239879441.22.0.242976004703.issue5772@psf.upfronthosting.co.za> Message-ID: <1239880161.95.0.953945670481.issue5772@psf.upfronthosting.co.za> Eric Smith added the comment: For a more detailed discussion, scroll to the bottom of http://mail.python.org/pipermail/python-dev/2009-April/088417.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 13:48:39 2009 From: report at bugs.python.org (Larry Hastings) Date: Thu, 16 Apr 2009 11:48:39 +0000 Subject: [issue5630] Create alternatieve CObject API that is safe and clean In-Reply-To: <1238526469.89.0.691687509266.issue5630@psf.upfronthosting.co.za> Message-ID: <1239882519.17.0.893594241562.issue5630@psf.upfronthosting.co.za> Larry Hastings added the comment: I've updated the patch: * Capsule now has a custom repr that includes whatever name is set. * I've updated the documentation to talk about Capsules and not CObjects; the documentation discusses naming your capsules. * PyCapsule_Import now takes a "no_block" parameter; if true, PyCapsule_Import will import the module using PyImport_ImportModuleNoBlock, and if the import fails it will return failure but *not* raise an exception. * I checked all the exceptions to ensure they were of reasonable types. This is as far as I can take the patch without some input from the community. I hope the fate of this patch can be decided before the 3.1 feature freeze. ---------- Added file: http://bugs.python.org/file13703/lch.capsule.r71641.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 14:11:19 2009 From: report at bugs.python.org (Marcin Cieslik) Date: Thu, 16 Apr 2009 12:11:19 +0000 Subject: [issue5313] multiprocessing.process using os.close(sys.stdin.fileno) instead of sys.stdin.close() In-Reply-To: <1235020872.08.0.0158488308351.issue5313@psf.upfronthosting.co.za> Message-ID: <1239883879.36.0.553001184918.issue5313@psf.upfronthosting.co.za> Marcin Cieslik added the comment: Hello, I believe I am the edge-case. I've written a minimalist python Tkinter-shell around Tkinter.Text and code.InteractiveConsole by hi-jacking stdin, stdout and stderr. It "hangs" when using multiprocessing pool. to reproduce run papy_gui.py and type: >>> from math import sqrt >>> from multiprocessing import Pool >>> p = Pool() >>> print p >>> p.map(sqrt, [1,2,3]) <> ---------- nosy: +i000 Added file: http://bugs.python.org/file13704/papy_gui.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 14:32:00 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 16 Apr 2009 12:32:00 +0000 Subject: [issue5768] logging don't encode Unicode message correctly. In-Reply-To: <1239864394.45.0.809519102245.issue5768@psf.upfronthosting.co.za> Message-ID: <1239885120.67.0.462939651133.issue5768@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I think that in r69448, the test does not match the code: codecs.getwriter('cp1251') has no attribute 'encoding', and no function in test_logging ever pass a stream with an explicit encoding. Also, the test in emit() should be reversed, otherwise msg.encode() is called only when msg is a 8bit string. And in this case, a unicode string should be passed to the stream. See attached patch. The codecs.getwriter should probably grow an 'encoding' attribute automatically, but this is another issue. ---------- assignee: -> vsajip nosy: +amaury.forgeotdarc, vsajip Added file: http://bugs.python.org/file13705/logging_encoding.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 14:39:09 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 16 Apr 2009 12:39:09 +0000 Subject: [issue5773] Crash on shutdown after os.fdopen(2) in debug builds In-Reply-To: <1239885549.06.0.444041706295.issue5773@psf.upfronthosting.co.za> Message-ID: <1239885549.06.0.444041706295.issue5773@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : With a 2.6 or 2.7 debug build: python_d -c "import os; os.fdopen(2)" Displays the famous Debug Assertion Failure: ... Expression: (_osfile(fh) & FOPEN) ... The error occurs when closing pyhon, in call_ll_exitfuncs() there is a call to fflush(stderr) ---------- assignee: krisvale components: Windows messages: 86026 nosy: amaury.forgeotdarc, krisvale severity: normal status: open title: Crash on shutdown after os.fdopen(2) in debug builds versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 14:56:41 2009 From: report at bugs.python.org (Larry Hastings) Date: Thu, 16 Apr 2009 12:56:41 +0000 Subject: [issue5630] Create alternatieve CObject API that is safe and clean In-Reply-To: <1238526469.89.0.691687509266.issue5630@psf.upfronthosting.co.za> Message-ID: <1239886601.08.0.223126085545.issue5630@psf.upfronthosting.co.za> Larry Hastings added the comment: Whoopsie-daisy, I forgot to touch up a whole lot of places to match the new API. Attached is an updated patch; here's what changed: * The documentation is now much better; there is a capsule.rst, and cobject.rst has a deprecation warning. * Added a deprecation warning in a comment to Include/cobject.h. * Added the PyCapsule APIs to refcounts.dat and the .def files for OS/2 builds. * Changed a commented mention of "CObject" to "Capsule" in Lib/test/test_sys.py. ---------- Added file: http://bugs.python.org/file13706/lch.capsule.r71641.diff.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 15:05:41 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 16 Apr 2009 13:05:41 +0000 Subject: [issue5657] bad repr of itertools.count object with negative value on OS X 10.4 with 10.5 build In-Reply-To: <1238614228.92.0.740866649828.issue5657@psf.upfronthosting.co.za> Message-ID: <1239887141.04.0.0703092097688.issue5657@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I intend to fix this next weekend, therefore assigning the issue to myself. ---------- assignee: loewis -> ronaldoussoren priority: -> release blocker stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 15:08:38 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 16 Apr 2009 13:08:38 +0000 Subject: [issue5772] For float.__format__, don't add a trailing ".0" if we're using no type code and we have an exponent In-Reply-To: <1239879441.22.0.242976004703.issue5772@psf.upfronthosting.co.za> Message-ID: <1239887318.53.0.176954675032.issue5772@psf.upfronthosting.co.za> Mark Dickinson added the comment: Just for the public record, I think that getting rid of the '.0' is the right thing to do here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 15:34:10 2009 From: report at bugs.python.org (Vlastimil Brom) Date: Thu, 16 Apr 2009 13:34:10 +0000 Subject: [issue5274] sys.exc_info()[1] - different handling from str() and unicode() - py 2.6 In-Reply-To: <1234734636.9.0.12200425592.issue5274@psf.upfronthosting.co.za> Message-ID: <1239888850.57.0.631865019491.issue5274@psf.upfronthosting.co.za> Vlastimil Brom added the comment: I just want to confirm, that the reported issue is the same in python 2.6.2, is it really the intended behaviour in python 2.6 (as opposed to 2.5)? vbr ---------- components: +Unicode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 16:58:27 2009 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 16 Apr 2009 14:58:27 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1239893907.53.0.969790356031.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: Try issue2636-patch-2.diff. ---------- Added file: http://bugs.python.org/file13707/issue2636-patch-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 17:40:36 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Thu, 16 Apr 2009 15:40:36 +0000 Subject: [issue5767] xmlrpclib loads invalid documents In-Reply-To: <1239841199.24.0.504542013197.issue5767@psf.upfronthosting.co.za> Message-ID: <1239896436.41.0.649618195091.issue5767@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: This actually appears to be an issue with the sgmlop-based parser, not the expat-based parser. After removing sgmlop, the exception-raising behavior is restored. Perhaps this bug should be closed as invalid, then. Only, I wonder if this is the right bug tracker to use for sgmlop, or if it has one somewhere else? ---------- nosy: +effbot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 17:51:26 2009 From: report at bugs.python.org (Fredrik Lundh) Date: Thu, 16 Apr 2009 15:51:26 +0000 Subject: [issue5767] xmlrpclib loads invalid documents In-Reply-To: <1239841199.24.0.504542013197.issue5767@psf.upfronthosting.co.za> Message-ID: <1239897086.63.0.00372958152942.issue5767@psf.upfronthosting.co.za> Fredrik Lundh added the comment: sgmlop doesn't do much validation; to quote the homepage: "[sgmlop] is tolerant, and happily accepts XML-like data that are not well-formed. If you need strictness, use another parser." But given that Python ships with cElementTree these days, and cElementTree's XMLParser (based on expat) is faster than both sgmlop and pyexpat, maybe it's time to remove sgmlop support from xmlrpclib... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 18:18:46 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 16 Apr 2009 16:18:46 +0000 Subject: [issue5773] Crash on shutdown after os.fdopen(2) in debug builds In-Reply-To: <1239885549.06.0.444041706295.issue5773@psf.upfronthosting.co.za> Message-ID: <1239898726.43.0.00452120623767.issue5773@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Sure. But we tried hard to remove all these assertion failures, so that python never shows a popup dialog. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 18:56:15 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 16 Apr 2009 16:56:15 +0000 Subject: [issue5767] xmlrpclib loads invalid documents In-Reply-To: <1239841199.24.0.504542013197.issue5767@psf.upfronthosting.co.za> Message-ID: <1239900975.84.0.0841346321298.issue5767@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > maybe it's time to remove sgmlop support from xmlrpclib... +1 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 19:46:34 2009 From: report at bugs.python.org (Andreas Schawo) Date: Thu, 16 Apr 2009 17:46:34 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1239903994.29.0.587034549428.issue5463@psf.upfronthosting.co.za> Andreas Schawo added the comment: Hi Mark, currently there will be no struct.error neither TypeErorr because PyLong_AsLong floors a given float (see my msg84620). The Question is: should I test for long explicitly and raise an error if a different type is given? In this case a test is needed, I give in. I'm not sure what's the right style here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 20:36:30 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 16 Apr 2009 18:36:30 +0000 Subject: [issue5770] SA bugs with unittest.py In-Reply-To: <1239875252.02.0.167158761739.issue5770@psf.upfronthosting.co.za> Message-ID: <1239906990.8.0.832762685735.issue5770@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> duplicate status: open -> closed superseder: -> SA bugs with unittest.py at r71263 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 21:00:12 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 16 Apr 2009 19:00:12 +0000 Subject: [issue5771] SA bugs with unittest.py@r71263 In-Reply-To: <1239875594.79.0.0374770932255.issue5771@psf.upfronthosting.co.za> Message-ID: <1239908412.38.0.871521375785.issue5771@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 21:06:13 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Thu, 16 Apr 2009 19:06:13 +0000 Subject: [issue5774] _winreg.OpenKey() is documented with keyword arguments, but doesn't take them In-Reply-To: <1239908773.0.0.157202779439.issue5774@psf.upfronthosting.co.za> Message-ID: <1239908773.0.0.157202779439.issue5774@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : I noticed this in 2.6, but I imagine it affects 2.7, and 3.x as well. The documentation for _winreg.OpenKey reads in part: _winreg.OpenKey(key, sub_key[, res=0][, sam=KEY_READ]) However: >>> import _winreg >>> _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, 'Software', sam=_winreg.KEY_ALL_ACCESS) Traceback (most recent call last): File "", line 1, in TypeError: OpenKey() takes no keyword arguments Probably the OpenKey implementation should be updated to use PyArg_ParseTupleAndKeywords instead of PyArg_ParseTuple? ---------- components: Library (Lib) messages: 86038 nosy: stutzbach severity: normal status: open title: _winreg.OpenKey() is documented with keyword arguments, but doesn't take them versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 21:17:40 2009 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 16 Apr 2009 19:17:40 +0000 Subject: [issue5768] logging don't encode Unicode message correctly. In-Reply-To: <1239864394.45.0.809519102245.issue5768@psf.upfronthosting.co.za> Message-ID: <1239909460.08.0.0743850372293.issue5768@psf.upfronthosting.co.za> Vinay Sajip added the comment: Fix checked into trunk and release26-maint. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 22:40:58 2009 From: report at bugs.python.org (Eric Smith) Date: Thu, 16 Apr 2009 20:40:58 +0000 Subject: [issue5515] 'n' formatting for int and float handles leading zero padding poorly In-Reply-To: <1237422838.11.0.502789865949.issue5515@psf.upfronthosting.co.za> Message-ID: <1239914458.3.0.155365394186.issue5515@psf.upfronthosting.co.za> Eric Smith added the comment: Fixed in trunk (will be 3.1) in r71665. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 22:41:05 2009 From: report at bugs.python.org (Eric Smith) Date: Thu, 16 Apr 2009 20:41:05 +0000 Subject: [issue5515] 'n' formatting for int and float handles leading zero padding poorly In-Reply-To: <1237422838.11.0.502789865949.issue5515@psf.upfronthosting.co.za> Message-ID: <1239914465.43.0.0999638883043.issue5515@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 22:41:28 2009 From: report at bugs.python.org (Eric Smith) Date: Thu, 16 Apr 2009 20:41:28 +0000 Subject: [issue5515] 'n' formatting for int and float handles leading zero padding poorly In-Reply-To: <1237422838.11.0.502789865949.issue5515@psf.upfronthosting.co.za> Message-ID: <1239914488.19.0.127058486036.issue5515@psf.upfronthosting.co.za> Eric Smith added the comment: Fixed in py3k (will be 3.1) in r71665. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 22:52:48 2009 From: report at bugs.python.org (Eric Smith) Date: Thu, 16 Apr 2009 20:52:48 +0000 Subject: [issue5772] For float.__format__, don't add a trailing ".0" if we're using no type code and we have an exponent In-Reply-To: <1239879441.22.0.242976004703.issue5772@psf.upfronthosting.co.za> Message-ID: <1239915168.88.0.879895670098.issue5772@psf.upfronthosting.co.za> Eric Smith added the comment: Fixed in py3k (which will become 3.1) in r71665. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 22:56:14 2009 From: report at bugs.python.org (Eric Smith) Date: Thu, 16 Apr 2009 20:56:14 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1239915374.06.0.619622231061.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: Terry, are you still interested in documenting this (please say yes!)? I'm hoping it can be done by the beta release. Thanks. Eric. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 23:16:25 2009 From: report at bugs.python.org (Brian) Date: Thu, 16 Apr 2009 21:16:25 +0000 Subject: [issue4660] multiprocessing.JoinableQueue task_done() issue In-Reply-To: <1229273282.85.0.657676661464.issue4660@psf.upfronthosting.co.za> Message-ID: <1239916585.48.0.421219416102.issue4660@psf.upfronthosting.co.za> Brian added the comment: Jesse, I am afraid my last post may have confused the issue. As I mentioned in my first post, the problem arises when JoinableQueue.put is preempted between its two lines. Perhaps the easiest way to illustrate this is to exacerbate it by modifying JoinableQueue.put to force a preemption at this inopportune time. import time def put(self, item, block=True, timeout=None): Queue.put(self, item, block, timeout) time.sleep(1) self._unfinished_tasks.release() Almost any example will now fail. from multiprocessing import JoinableQueue, Process def printer(in_queue): while True: print in_queue.get() in_queue.task_done() if __name__ == '__main__': jqueue = JoinableQueue() a = Process(target = printer, args=(jqueue,)).start() jqueue.put("blah") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 23:23:15 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 16 Apr 2009 21:23:15 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1239916995.73.0.268405151588.issue5237@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes, added to 'do in next few days' list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 23:27:05 2009 From: report at bugs.python.org (Eric Smith) Date: Thu, 16 Apr 2009 21:27:05 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1239916995.73.0.268405151588.issue5237@psf.upfronthosting.co.za> Message-ID: <49E7A305.4020605@trueblade.com> Eric Smith added the comment: Terry J. Reedy wrote: > Terry J. Reedy added the comment: > > Yes, added to 'do in next few days' list. Thanks so much. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 23:33:44 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 16 Apr 2009 21:33:44 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1239917624.87.0.228734925885.issue3873@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- priority: -> normal stage: -> patch review versions: +Python 3.1 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 23:34:42 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 16 Apr 2009 21:34:42 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1239917682.57.0.505035801656.issue3873@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, the patch won't work with unseekable files, which is probably bad. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 16 23:52:39 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 16 Apr 2009 21:52:39 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1239918759.55.0.086597935097.issue1580@psf.upfronthosting.co.za> Mark Dickinson added the comment: The py3k-short-float-repr branch has been merged to py3k in two parts: r71663 is mostly concerned with the inclusion of David Gay's code into the core, and the necessary floating-point fixups to allow Gay's code to be used (SSE2 detection, x87 control word manipulation, etc.) r71665 contains Eric's *mammoth* rewrite and upgrade of the all the float formatting code to use the new _Py_dg_dtoa and _Py_dg_strtod functions. Note: the new code doesn't give short float repr on *all* platforms, though it's close. The sticking point is that Gay's code needs 53-bit rounding precision, and the x87 FPU uses 64-bit rounding precision by default (though some operating systems---e.g., FreeBSD, Windows---change that default). For the record, here's the strategy that I used: feedback (esp. from experts) would be appreciated. - If the float format is not IEEE 754, don't use Gay's code. - Otherwise, if we're not on x86, we're probably fine. (Historically, there are other FPUs that have similar problems---e.g., the Motorola 68881/2 FPUs---but I think they're all too old to be worth worrying about by now.) - x86-64 in 64-bit mode is also fine: there, SSE2 is the default. x86-64 in 32-bit mode (e.g., 32-bit Linux on Core 2 Duo) has the same problems as plain x86. (OS X is fine: its gcc has SSE2 enabled by default even for 32-bit mode.) - Windows/x86 appears to set rounding precision to 53-bits by default, so we're okay there too. So: - On gcc/x86, detect the availability of SSE2 (by examining the result of the cpuid instruction) and add the appropriate flags (-msse2 -mfpmath=sse2) to BASECFLAGS if SSE2 is available. - On gcc/x86, if SSE2 is *not* available, so that we're using the x87 FPU, use inline assembler to set the rounding precision (and rounding mode) before calling Gay's code, and restore the FPU state directly afterwards. Use of inline assembler is pretty horrible, but it seems to be *more* portable than any of the alternatives. The official C99 way is to use fegetenv/fesetenv to get and set the floating-point environment, but the fenv_t type used to store the environment can (and will) vary from platform to platform. - There's an autoconf test for double-rounding. If there's no evidence of double rounding then it's likely to be safe to use Gay's code: double rounding is an almost unavoidable symptom of 64-bit precision on x87. So on non-Windows x86 platforms that *aren't* using gcc and *do* exhibit double rounding (implying that they're not using SSE2, and that the OS doesn't change the FPU rounding precision to 53 bits), we're out of luck. In this case the old long float repr is used. The most prominent platform that I can think of that's affected by this would be something like Solaris/x86 with Sun's own compiler, or more generally any Unix/x86 combination where the compiler isn't gcc. Those platforms need to be dealt with on a case-by-case basis, by figuring out for each such platform how to detect and use SSE2, and how to get and set the x87 control word if SSE2 instructions aren't available. Note that if any of the above heuristics is wrong and we end up using Gay's code inappropriately, then there will be *loud* failure: we'll know about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 00:07:51 2009 From: report at bugs.python.org (Eric Smith) Date: Thu, 16 Apr 2009 22:07:51 +0000 Subject: [issue5775] marshal.c needs to be checked for out of memory errors In-Reply-To: <1239919671.05.0.969461869754.issue5775@psf.upfronthosting.co.za> Message-ID: <1239919671.05.0.969461869754.issue5775@psf.upfronthosting.co.za> New submission from Eric Smith : With the changes in r71665, w_object() in marshal.c needs to be checked for out of memory errors when converting floats to strings. I'm not convinced the existing error checking was correct, but I haven't spent a lot of time looking at it. The fact that w_object() is recursive makes the problem that much tougher. I'll get to this before the next 3.1 release. ---------- assignee: eric.smith components: Interpreter Core messages: 86049 nosy: eric.smith priority: release blocker severity: normal status: open title: marshal.c needs to be checked for out of memory errors type: resource usage versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 01:29:22 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 16 Apr 2009 23:29:22 +0000 Subject: [issue4482] 10e667.__format__('+') should return 'inf' In-Reply-To: <1228153945.74.0.126553636811.issue4482@psf.upfronthosting.co.za> Message-ID: <1239924562.96.0.772839637701.issue4482@psf.upfronthosting.co.za> Mark Dickinson added the comment: A somewhat related comment about formatting of infs and nans: I think that a formatted nan should never include a sign, even when it's explicitly asked for. For example: "%+e" % float('nan') should give "nan" rather than "+nan" or "-nan". (In contrast, infinities should, and currently do, get the requested sign.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 01:39:11 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 16 Apr 2009 23:39:11 +0000 Subject: [issue4482] 10e667.__format__('+') should return 'inf' In-Reply-To: <1228153945.74.0.126553636811.issue4482@psf.upfronthosting.co.za> Message-ID: <1239925151.46.0.713765238066.issue4482@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here are my proposed tests for this---they're for percent formatting rather than format() formatting. They conflict slightly with Daniel's tests, in that I think format(float('inf'), '+') should produce '+inf' rather than plain 'inf'. ---------- Added file: http://bugs.python.org/file13708/issue4482_tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 02:16:15 2009 From: report at bugs.python.org (Robert Collins) Date: Fri, 17 Apr 2009 00:16:15 +0000 Subject: [issue5728] Support telling TestResult objects a test run has finished In-Reply-To: <1239279324.74.0.826216289254.issue5728@psf.upfronthosting.co.za> Message-ID: <1239927375.29.0.000913749849365.issue5728@psf.upfronthosting.co.za> Robert Collins added the comment: Updates - docs, and fixes a couple of stubbed out upcalls in the logging result put in while bootsrapping. ---------- Added file: http://bugs.python.org/file13709/start-stop-TestRun.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 04:45:59 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 17 Apr 2009 02:45:59 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1239936359.54.0.830985898776.issue2531@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Mark, any thoughts? I would like to apply this patch for ordering comparisons other than __eq__ and __ne__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 04:57:47 2009 From: report at bugs.python.org (Tennessee Leeuwenburg) Date: Fri, 17 Apr 2009 02:57:47 +0000 Subject: [issue3119] pickle.py is limited by python's call stack In-Reply-To: <1213589185.62.0.660916672679.issue3119@psf.upfronthosting.co.za> Message-ID: <1239937067.2.0.458148878879.issue3119@psf.upfronthosting.co.za> Changes by Tennessee Leeuwenburg : ---------- keywords: +needs review -patch stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 07:59:25 2009 From: report at bugs.python.org (Bryan Blackburn) Date: Fri, 17 Apr 2009 05:59:25 +0000 Subject: [issue5766] Mac/scripts/BuildApplet.py reset of sys.executable during install can cause it to use wrong modules In-Reply-To: <1239840739.74.0.413438515887.issue5766@psf.upfronthosting.co.za> Message-ID: <1239947965.44.0.119189273598.issue5766@psf.upfronthosting.co.za> Bryan Blackburn added the comment: FYI, I'm able to avoid this by using "PYTHONHOME=$(DESTDIR)$(prefix)" before $(RUNSHARED) when running BuildApplet.py and $(BUNDLEBULDER) in Mac/Makefile.in, Mac/IDLE/Makefile.in, and Mac/PythonLauncher/Makefile.in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 08:26:31 2009 From: report at bugs.python.org (Joshua Kinard) Date: Fri, 17 Apr 2009 06:26:31 +0000 Subject: [issue4305] ctypes fails to build on mipsel-linux-gnu (detects mips instead of mipsel) In-Reply-To: <1226484001.23.0.749041410677.issue4305@psf.upfronthosting.co.za> Message-ID: <1239949591.87.0.160792374108.issue4305@psf.upfronthosting.co.za> Joshua Kinard added the comment: Is there any movement on this perchance? Just bumped into this on my MIPS platform and discovered this bug. ---------- nosy: +kumba _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 09:49:50 2009 From: report at bugs.python.org (Yasushi Iwata) Date: Fri, 17 Apr 2009 07:49:50 +0000 Subject: [issue5776] RPM build error with python-2.6.spec In-Reply-To: <1239954590.57.0.776112423275.issue5776@psf.upfronthosting.co.za> Message-ID: <1239954590.57.0.776112423275.issue5776@psf.upfronthosting.co.za> New submission from Yasushi Iwata : I found some typo and mistakes in python-2.6.spec. ---------- components: Demos and Tools files: python-2.6.spec.patch keywords: patch messages: 86056 nosy: yasusii severity: normal status: open title: RPM build error with python-2.6.spec versions: Python 2.6 Added file: http://bugs.python.org/file13710/python-2.6.spec.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 10:29:57 2009 From: report at bugs.python.org (Andreas Otto) Date: Fri, 17 Apr 2009 08:29:57 +0000 Subject: [issue5777] unable to search in python V3 documentation In-Reply-To: <1239956997.02.0.510545849385.issue5777@psf.upfronthosting.co.za> Message-ID: <1239956997.02.0.510545849385.issue5777@psf.upfronthosting.co.za> New submission from Andreas Otto : Hi, if I search for "sys.argv" I get Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories. but its available at: http://docs.python.org/3.0/library/sys.html ---------- assignee: georg.brandl components: Documentation messages: 86057 nosy: aotto1968, georg.brandl severity: normal status: open title: unable to search in python V3 documentation type: resource usage versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 10:37:09 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 17 Apr 2009 08:37:09 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1239936359.54.0.830985898776.issue2531@psf.upfronthosting.co.za> Message-ID: <5c6f2a5d0904170137r7f6d2434s5ffec960e752b5f3@mail.gmail.com> Mark Dickinson added the comment: On Fri, Apr 17, 2009 at 3:45 AM, Raymond Hettinger wrote: > Mark, any thoughts? ?I would like to apply this patch for ordering > comparisons other than __eq__ and __ne__. Hi Raymond, Sorry for not responding to this sooner. I'll post something to the issue tracker. In brief, this seems an improvement over the earlier proposal, just because there are no problems with hashes or container confusion. I'm still -0 on it, though---it just seems like too much magic: confusion will happen much more rarely, but it'll be that much more difficult to explain when it does occur. IOW I wouldn't do this if it were just up to me, but not going to object if there's support from you and others. Mark ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 10:54:33 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 17 Apr 2009 08:54:33 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1239958473.98.0.0675373634386.issue2531@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm not seeing the downside. This gives better answers than it does now but doesn't commit us to anything else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 11:00:09 2009 From: report at bugs.python.org (Toshihiro Kamiya) Date: Fri, 17 Apr 2009 09:00:09 +0000 Subject: [issue5778] sys.version format differs between MSC and GCC In-Reply-To: <1239958808.78.0.447380255755.issue5778@psf.upfronthosting.co.za> Message-ID: <1239958808.78.0.447380255755.issue5778@psf.upfronthosting.co.za> New submission from Toshihiro Kamiya : The value of sys.version includes a new-line char in GCC build. '2.5.2 (r252:60911, Oct 5 2008, 19:24:49) \n[GCC 4.3.2]' MSC build doesn't. '2.6.2 (r262:71605, Apr 14 2009, 22:46:50) [MSC v.1500 64 bit (AMD64)]' This seems a kind of pitfall for the developers who use this variable. ---------- components: Build messages: 86060 nosy: t-kamiya severity: normal status: open title: sys.version format differs between MSC and GCC versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 11:08:51 2009 From: report at bugs.python.org (Georg Brandl) Date: Fri, 17 Apr 2009 09:08:51 +0000 Subject: [issue5778] sys.version format differs between MSC and GCC In-Reply-To: <1239958808.78.0.447380255755.issue5778@psf.upfronthosting.co.za> Message-ID: <1239959331.39.0.678687431104.issue5778@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> loewis nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 11:22:52 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 17 Apr 2009 09:22:52 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1239960172.01.0.228079459206.issue2531@psf.upfronthosting.co.za> Mark Dickinson added the comment: The downside is the potential confusion arising from using one method (comparison of actual numerical value) for <, <=, >, >=, and a different method (decimals and floats are never equal) for == and !=. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 11:35:10 2009 From: report at bugs.python.org (Matteo Bertini) Date: Fri, 17 Apr 2009 09:35:10 +0000 Subject: [issue5779] _elementtree import can fail silently In-Reply-To: <1239960910.01.0.399059984648.issue5779@psf.upfronthosting.co.za> Message-ID: <1239960910.01.0.399059984648.issue5779@psf.upfronthosting.co.za> New submission from Matteo Bertini : (the patch is old, I forwarded it to Fredrik but I forgot to open the bug) Playing with PyInstaller I have found that the final part of _elementtree.c: Index: Modules/_elementtree.c =================================================================== --- Modules/_elementtree.c (revisione 59540) +++ Modules/_elementtree.c (copia locale) @@ -2780,7 +2780,10 @@ ); - PyRun_String(bootstrap, Py_file_input, g, NULL); + if (PyRun_String(bootstrap, Py_file_input, g, NULL) == NULL) { + m = PyErr_Occurred(); + return; + } elementpath_obj = PyDict_GetItemString(g, "ElementPath"); executes a bit of python code without checking the return value. That can lead to weird things playing with import hooks, for example an assert like this can fail: Index: Lib/test/test_elemettree.py =================================================================== --- Lib/test/test_elemettree.py (revisione 0) +++ Lib/test/test_elemettree.py (revisione 0) @@ -0,0 +1,21 @@ +#! /usr/bin/env python + +def importHook(*args, **kwargs): + if 'xml.etree' in args: + raise ImportError + else: + return __real__import__(*args, **kwargs) + +import os +import __builtin__ +__real__import__ = __builtin__.__import__ +__builtin__.__import__ = importHook + +try: + import xml.etree.cElementTree as cET +except ImportError: + pass +else: + out = os.popen("python -c 'import xml.etree.cElementTree as cET; print dir(cET)'").read().strip() + assert str(dir(cET)) == out, (str(dir(cET)), out) + Quite a novice with python internals, so comments are welcome. Matteo Bertini ---------- components: XML messages: 86062 nosy: naufraghi severity: normal status: open title: _elementtree import can fail silently _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 11:38:52 2009 From: report at bugs.python.org (Thomas Heller) Date: Fri, 17 Apr 2009 09:38:52 +0000 Subject: [issue4305] ctypes fails to build on mipsel-linux-gnu (detects mips instead of mipsel) In-Reply-To: <1239949591.87.0.160792374108.issue4305@psf.upfronthosting.co.za> Message-ID: <49E84E25.2050103@ctypes.org> Thomas Heller added the comment: Joshua Kinard schrieb: > Joshua Kinard added the comment: > > Is there any movement on this perchance? Just bumped into this on my > MIPS platform and discovered this bug. There is no MIPS buildbot at the moment, and I'm unclear which one of the patches solves the issue. ---------- title: ctypes fails to build on mipsel-linux-gnu (detects mips instead of mipsel) -> ctypes fails to build on mipsel-linux-gnu (detects mips instead of mipsel) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 11:40:10 2009 From: report at bugs.python.org (Matteo Bertini) Date: Fri, 17 Apr 2009 09:40:10 +0000 Subject: [issue5779] _elementtree import can fail silently In-Reply-To: <1239960910.01.0.399059984648.issue5779@psf.upfronthosting.co.za> Message-ID: <1239961210.58.0.203382272672.issue5779@psf.upfronthosting.co.za> Matteo Bertini added the comment: Ups, I duplicated myself... issue3475 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 12:32:54 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 17 Apr 2009 10:32:54 +0000 Subject: [issue5780] test_float fails for 'legacy' float repr style In-Reply-To: <1239964374.11.0.815428814709.issue5780@psf.upfronthosting.co.za> Message-ID: <1239964374.11.0.815428814709.issue5780@psf.upfronthosting.co.za> New submission from Mark Dickinson : After: CC="gcc -DPY_NO_SHORT_FLOAT_REPR" ./configure && make test_format_testfile in test_float fails with: test.support.TestFailed: Traceback (most recent call last): File "Lib/test/test_float.py", line 341, in test_format_testfile self.assertEqual(fmt % float(arg), rhs) AssertionError: '100000000000.0' != '1e+11' The problem is that for str(float), the new formatting code switches to exponential notation at 1e11, not 1e12; the legacy code does not. A similar issue exists for repr: repr(1e16) should now produce '1e+16'. ---------- assignee: marketdickinson components: Interpreter Core messages: 86066 nosy: eric.smith, marketdickinson priority: normal severity: normal stage: patch review status: open title: test_float fails for 'legacy' float repr style type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 12:34:09 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 17 Apr 2009 10:34:09 +0000 Subject: [issue5780] test_float fails for 'legacy' float repr style In-Reply-To: <1239964374.11.0.815428814709.issue5780@psf.upfronthosting.co.za> Message-ID: <1239964449.26.0.123100842952.issue5780@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch. Eric, do you have time to check this over for general sanity? ---------- keywords: +patch Added file: http://bugs.python.org/file13711/issue5780.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 13:15:34 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 17 Apr 2009 11:15:34 +0000 Subject: [issue5780] test_float fails for 'legacy' float repr style In-Reply-To: <1239964374.11.0.815428814709.issue5780@psf.upfronthosting.co.za> Message-ID: <1239966934.99.0.139000693947.issue5780@psf.upfronthosting.co.za> Mark Dickinson added the comment: On second thoughts, I think that repr shouldn't change: 'legacy' repr format should mean that it *is* exactly the same as before, including the switch at 1e17 instead of 1e16. Otherwise there will be 3 possibilities for repr output: 'short' repr, 'legacy' repr and pre-3.1 repr will all be different. Here's a new patch, which leaves repr alone and fixes up the Misc/NEWS entries accordingly. ---------- Added file: http://bugs.python.org/file13712/issue5780.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 13:15:41 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 17 Apr 2009 11:15:41 +0000 Subject: [issue5780] test_float fails for 'legacy' float repr style In-Reply-To: <1239964374.11.0.815428814709.issue5780@psf.upfronthosting.co.za> Message-ID: <1239966941.09.0.536701780726.issue5780@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file13711/issue5780.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 13:19:22 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 17 Apr 2009 11:19:22 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1239967162.07.0.0991417908028.issue1580@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing this. There are a few known problems remaining, but they've all got their own issue numbers: see issue 5780, issue 4482. ---------- resolution: -> accepted stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 13:43:31 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 17 Apr 2009 11:43:31 +0000 Subject: [issue5780] test_float fails for 'legacy' float repr style In-Reply-To: <1239964374.11.0.815428814709.issue5780@psf.upfronthosting.co.za> Message-ID: <1239968611.28.0.1061170636.issue5780@psf.upfronthosting.co.za> Eric Smith added the comment: I agree that there should be 2 behaviors, not 3. This patch looks okay to me, and tests pass both with and without defining PY_NO_SHORT_FLOAT_REPR. One nit: You don't need to use Py_CHARMASK when using the ISDIGIT macro locally defined in pystrtod.c. On the other hand, that macro (ISDIGIT) should completely go away. I think it's there because this file is trying to be locale-unaware, but isdigit from ctype.h is defined as being locale-unaware (at least on all platforms I have access to and a search on the net; my copy of C89 is at home and I can't triple-check just yet). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 14:09:51 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 17 Apr 2009 12:09:51 +0000 Subject: [issue5780] test_float fails for 'legacy' float repr style In-Reply-To: <1239964374.11.0.815428814709.issue5780@psf.upfronthosting.co.za> Message-ID: <1239970191.08.0.682269949463.issue5780@psf.upfronthosting.co.za> Eric Smith added the comment: Also, remove_trailing_zeros should go inside the #ifdef so it's not included if Gay's code is being used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 14:56:49 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 17 Apr 2009 12:56:49 +0000 Subject: [issue5780] test_float fails for 'legacy' float repr style In-Reply-To: <1239964374.11.0.815428814709.issue5780@psf.upfronthosting.co.za> Message-ID: <1239973009.7.0.493216977435.issue5780@psf.upfronthosting.co.za> Mark Dickinson added the comment: I seem to recall that despite the C standards, there are platforms around where isdigit and isxdigit are still locale aware. This bit me when I implemented float.fromhex: see r65964. And my man page for isdigit says: COMPATIBILITY The 4.4BSD extension of accepting arguments outside of the range of the unsigned char type in locales with large character sets is considered obsolete and may not be supported in future releases. The iswdigit() function should be used instead. So I'm tempted to go the other way and say that all uses of isdigit should be replaced by ISDIGIT. I'll fix the Py_CHARMASK and move remove_trailing_zeros inside the ifdef. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 15:16:18 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 17 Apr 2009 13:16:18 +0000 Subject: [issue5781] Legacy float repr is used unnecessarily on some platforms In-Reply-To: <1239974178.12.0.90656789268.issue5781@psf.upfronthosting.co.za> Message-ID: <1239974178.12.0.90656789268.issue5781@psf.upfronthosting.co.za> New submission from Mark Dickinson : The current defines in pyport.h mean that we don't use Gay's code for short float repr if there's evidence of double rounding. However, there's one situation where double rounding occurs and we can still use Gay's code: namely, when the configure script has worked out how to get and set the x87 control word. The pyport.h code should be fixed so that we use Gay's code in that situation. ---------- assignee: marketdickinson components: Interpreter Core keywords: easy messages: 86073 nosy: eric.smith, marketdickinson priority: normal severity: normal stage: needs patch status: open title: Legacy float repr is used unnecessarily on some platforms type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 15:18:02 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 17 Apr 2009 13:18:02 +0000 Subject: [issue5780] test_float fails for 'legacy' float repr style In-Reply-To: <1239964374.11.0.815428814709.issue5780@psf.upfronthosting.co.za> Message-ID: <1239974282.75.0.754136928142.issue5780@psf.upfronthosting.co.za> Eric Smith added the comment: I definitely think that if you go with isdigit, you need the macro. I've been bitten by this in 3.0. My actual suggestion is to go with isdigit and the macro everywhere in this file and all files. But for just this checkin, ISDIGIT is probably best. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 16:38:03 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 17 Apr 2009 14:38:03 +0000 Subject: [issue5782] ',' formatting with empty format type '' (PEP 378) In-Reply-To: <1239979083.96.0.980921047478.issue5782@psf.upfronthosting.co.za> Message-ID: <1239979083.96.0.980921047478.issue5782@psf.upfronthosting.co.za> New submission from Eric Smith : PEP 378 says that the ',' format option applies to types 'd', 'e', 'f', 'g', 'E', 'G', '%' and 'F'. I think this should also be extended to include the empty type ''. This only makes a difference for floats. For ints, '' is the same as 'd', but for floats '' is distinct. In 3.1 we get this behavior: >>> format(1.2, '010.2') '00000001.2' >>> format(1.2, '010,.2') Traceback (most recent call last): File "", line 1, in ValueError: Cannot specify ',' with ''. I think the second example should be valid. ---------- assignee: eric.smith components: Interpreter Core keywords: easy messages: 86075 nosy: eric.smith, marketdickinson, rhettinger priority: normal severity: normal status: open title: ',' formatting with empty format type '' (PEP 378) type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 17:29:43 2009 From: report at bugs.python.org (Vah Rashim) Date: Fri, 17 Apr 2009 15:29:43 +0000 Subject: [issue708320] DistributionMetaData error ? Message-ID: <1239982183.59.0.0727933870056.issue708320@psf.upfronthosting.co.za> Vah Rashim added the comment: I'm running py2exe on python 2.6 and have this error, too. I'm look through distutils/dist.py and read following: self.metadata = DistributionMetadata() method_basenames = dir(self.metadata) + \ ['fullname', 'contact', 'contact_email'] for basename in method_basenames: method_name = "get_" + basename setattr(self, method_name, getattr(self.metadata, method_name)) I'm printing dir(self.metadata) and get this lines: ['__doc__', '__init__', '__module__', 'author', 'author_email', 'description', 'get_author', 'get_author_email', 'get_co ntact', 'get_contact_email', 'get_description', 'get_fullname', 'get_keywords', 'get_licence', 'get_long_description', ' get_maintainer', 'get_maintainer_email', 'get_name', 'get_platforms', 'get_url', 'get_version', 'keywords', 'licence', ' long_description', 'maintainer', 'maintainer_email', 'name', 'platforms', 'url', 'version', 'write_pkg_info'] code in dist.py trying add all methods from metadata to self, even 'magic' and getters. I think, that's wrong, because no method like get___doc, get_get_contact and other. I'm solve this problem by adding regexp for checking is this method allow for adding to self. this is my (ugly, i think) code: for basename in method_basenames: if re.match(r'(__|get_|write_)\w+', basename) is None: #MY FIXES! method_name = "get_" + basename setattr(self, method_name, getattr(self.metadata, method_name)) With this change, all py2exe works work correctly (and i don't try distutils in other cases). P.S. i don't know, is this python or py2exe problem: maybe py2exe replcae nature python distutils module. ---------- nosy: +varash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 18:19:29 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Fri, 17 Apr 2009 16:19:29 +0000 Subject: [issue4482] 10e667.__format__('+') should return 'inf' In-Reply-To: <1228153945.74.0.126553636811.issue4482@psf.upfronthosting.co.za> Message-ID: <1239985169.85.0.191283961745.issue4482@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: I used 'inf' instead of "+inf' because the original bug report states that the docs say it should be 'inf'. Now that I actually look at the docs, I don't agree with the original report's interpretation and agree that '+inf' is better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 18:36:57 2009 From: report at bugs.python.org (Victor Godoy Poluceno) Date: Fri, 17 Apr 2009 16:36:57 +0000 Subject: [issue3754] minimal cross-compilation support for configure In-Reply-To: <1220305759.82.0.468834426074.issue3754@psf.upfronthosting.co.za> Message-ID: <1239986217.2.0.725321554624.issue3754@psf.upfronthosting.co.za> Changes by Victor Godoy Poluceno : ---------- nosy: +victorpoluceno _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 19:22:55 2009 From: report at bugs.python.org (Thomas Heller) Date: Fri, 17 Apr 2009 17:22:55 +0000 Subject: [issue3102] ctypes defines global symbols In-Reply-To: <1213343694.16.0.290726791228.issue3102@psf.upfronthosting.co.za> Message-ID: <1239988975.4.0.283744756519.issue3102@psf.upfronthosting.co.za> Thomas Heller added the comment: Here is a quite large patch (300 lines) against svn trunk that renames a lot of symbols. The list of symbols, listed by 'nm -g --defined-only _ctypes.so' is as follows: theller at tubu32:~/devel/trunk$ find . -name _ctypes.so | xargs nm -g --defined-only 00011d07 T My_PyUnicode_AsWideChar 00011c6e T My_PyUnicode_FromWideChar 000136e2 T PyCArgObject_new 000236e0 D PyCArg_Type 000225a0 D PyCArrayType_Type 0000f86a T PyCArrayType_from_ctype 00022e40 D PyCArray_Type 0000b0b0 T PyCData_AtAddress 0000ae6f T PyCData_FromBaseObj 00022980 D PyCData_Type 0000b274 T PyCData_get 0000b82d T PyCData_set 000181bf T PyCField_FromDesc 00023ae0 D PyCField_Type 000227e0 D PyCFuncPtrType_Type 00022b60 D PyCFuncPtr_Type 00022440 D PyCPointerType_Type 00023220 D PyCPointer_Type 00022700 D PyCSimpleType_Type 00023920 D PyCStgDict_Type 0001627a T PyCStgDict_clone 00022200 D PyCStructType_Type 00017223 T PyCStructUnionType_update_stgdict 00023300 D PyCThunk_Type 00004fe4 T PyDict_GetItemProxy 00004dd1 T PyDict_SetItemProxy 00023e18 B PyExc_ArgError 0001660e T PyObject_stgdict 0001658c T PyType_stgdict 00023de8 A __bss_start 0001221b T _ctypes_add_traceback 00012f75 T _ctypes_alloc_callback 0001d737 T _ctypes_alloc_closure 0000506e T _ctypes_alloc_format_string 0001469d T _ctypes_callproc 00023dec B _ctypes_conversion_encoding 00023df0 B _ctypes_conversion_errors 000143f5 T _ctypes_extend_error 0001d70a T _ctypes_free_closure 00013318 T _ctypes_get_errobj 00013f41 T _ctypes_get_ffi_type 0001d5be T _ctypes_get_fielddesc 000237c0 D _ctypes_module_methods 00023e14 B _ctypes_ptrtype_cache 0000b204 T _ctypes_simple_instance 00023de8 A _edata 00023e1c A _end 0001e264 T _fini 00003f48 T _init 0001dbda T ffi_call 0001e080 T ffi_call_SYSV 0001d9fc T ffi_prep_args 0001d883 T ffi_prep_cif 0001db62 T ffi_prep_cif_machdep 0001d9ba T ffi_prep_closure 0001de09 T ffi_prep_closure_loc 0001dea0 T ffi_prep_raw_closure_loc 0001df8b T ffi_raw_call 00023a64 D ffi_type_double 00023a58 D ffi_type_float 00023a70 D ffi_type_longdouble 00023a7c D ffi_type_pointer 00023a1c D ffi_type_sint16 00023a34 D ffi_type_sint32 00023a4c D ffi_type_sint64 00023a04 D ffi_type_sint8 00023a10 D ffi_type_uint16 00023a28 D ffi_type_uint32 00023a40 D ffi_type_uint64 000239f8 D ffi_type_uint8 000239ec D ffi_type_void 000115ec T init_ctypes theller at tubu32:~/devel/trunk$ doko, loewis, what do you think? ---------- keywords: +patch Added file: http://bugs.python.org/file13713/rename.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 20:27:47 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 17 Apr 2009 18:27:47 +0000 Subject: [issue5782] ',' formatting with empty format type '' (PEP 378) In-Reply-To: <1239979083.96.0.980921047478.issue5782@psf.upfronthosting.co.za> Message-ID: <1239992867.31.0.741012986674.issue5782@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 20:33:16 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 17 Apr 2009 18:33:16 +0000 Subject: [issue5782] ',' formatting with empty format type '' (PEP 378) In-Reply-To: <1239979083.96.0.980921047478.issue5782@psf.upfronthosting.co.za> Message-ID: <1239993196.17.0.915079550243.issue5782@psf.upfronthosting.co.za> Mark Dickinson added the comment: Sounds good to me, too. It looks as though the Decimal type already does this: Python 3.1a2+ (py3k:71669:71684M, Apr 17 2009, 19:23:53) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from decimal import Decimal >>> format(Decimal('1.2'), '010.2') '00000001.2' >>> format(Decimal('1.2'), '010,.2') '0,000,001.2' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 20:35:48 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 17 Apr 2009 18:35:48 +0000 Subject: [issue5782] ',' formatting with empty format type '' (PEP 378) In-Reply-To: <1239979083.96.0.980921047478.issue5782@psf.upfronthosting.co.za> Message-ID: <1239993348.77.0.362448898241.issue5782@psf.upfronthosting.co.za> Eric Smith added the comment: I updated the PEP in r71686. I'll fix the code and add a test after I backport the entire thing to 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 21:11:55 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 17 Apr 2009 19:11:55 +0000 Subject: [issue5783] IDLE cannot find windows chm file In-Reply-To: <1239995515.37.0.798086990952.issue5783@psf.upfronthosting.co.za> Message-ID: <1239995515.37.0.798086990952.issue5783@psf.upfronthosting.co.za> New submission from Raymond Hettinger : The Doc/Python262.chm file needs to be named Doc/Python26.chm so that IDLE can find it. The current release cannot find the chm file at all so it falls back to the on-line docs at http://www.python.org/doc/current . ---------- assignee: benjamin.peterson components: Build messages: 86082 nosy: benjamin.peterson, rhettinger priority: critical severity: normal status: open title: IDLE cannot find windows chm file versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 21:13:16 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 17 Apr 2009 19:13:16 +0000 Subject: [issue5783] IDLE cannot find windows chm file In-Reply-To: <1239995515.37.0.798086990952.issue5783@psf.upfronthosting.co.za> Message-ID: <1239995596.64.0.0793157041603.issue5783@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This also applies to Python31a2.chm --> Python31.chm ---------- versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Fri Apr 17 21:37:54 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Fri, 17 Apr 2009 19:37:54 +0000 Subject: [issue5783] IDLE cannot find windows chm file In-Reply-To: <1239995515.37.0.798086990952.issue5783@psf.upfronthosting.co.za> Message-ID: <1239997074.56.0.865741830648.issue5783@psf.upfronthosting.co.za> Martin v. L?wis added the comment: It's actually vice versa - IDLE should open the file under its correct name. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Fri Apr 17 21:59:47 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Fri, 17 Apr 2009 19:59:47 +0000 Subject: [issue5764] 2.6.2 Python Manuals CHM file seems broken In-Reply-To: <1239811108.5.0.558563747483.issue5764@psf.upfronthosting.co.za> Message-ID: <1239998387.19.0.253934670765.issue5764@psf.upfronthosting.co.za> Martin v. L?wis added the comment: On http://www.python.org/download/releases/2.6.2/ we now provide a fixed version of the CHM file. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 22:09:42 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 17 Apr 2009 20:09:42 +0000 Subject: [issue5783] IDLE cannot find windows chm file In-Reply-To: <1239995515.37.0.798086990952.issue5783@psf.upfronthosting.co.za> Message-ID: <1239998982.25.0.971531366511.issue5783@psf.upfronthosting.co.za> Raymond Hettinger added the comment: What changed here? ISTM that IDLE was always looking for the same name and that the new part is that the build procedure has been been changed (the step where the "make htmlhelp" output file is moved to ./Doc and renamed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 22:10:40 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 17 Apr 2009 20:10:40 +0000 Subject: [issue5764] 2.6.2 Python Manuals CHM file seems broken In-Reply-To: <1239811108.5.0.558563747483.issue5764@psf.upfronthosting.co.za> Message-ID: <1239999040.75.0.784409736588.issue5764@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Are you also going to update the original MSI file so that people get a correct installation straight-away? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 22:13:56 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 17 Apr 2009 20:13:56 +0000 Subject: [issue1869] Builtin round function is sometimes inaccurate for floats In-Reply-To: <1200704666.74.0.121276369369.issue1869@psf.upfronthosting.co.za> Message-ID: <1239999236.15.0.258925925383.issue1869@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch that improves float rounding in a number of respects: (1) (when available) it uses the recently added correctly-rounded str <- > float conversions in Python/dtoa.c. This means that: - round(x, n) finally does what the docs say it does: rounds x to the closest multiple of 10**-n (and then returns the closest float to the result). - for n > 0, the digits of round(x, n) will always agree with those of "%.f" % x. One *really* nice feature is that since e.g. round(x, 2) will always be the closest float to a multiple of 0.01, thanks to the recent repr changes it'll always be output with at most two places following the decimal point, and so will appear to be properly rounded... Other changes. round(x, n) now: (2) deals correctly with large values of n (3) deals correctly with infinities and nans for x (4) deals correctly with overflow (e.g. round(1.5e308, -308)) (5) doesn't have the weird exception for n = -2**31+1, which was treated as a single-parameter round. Still needs tests. I'm working on them. ---------- stage: -> test needed Added file: http://bugs.python.org/file13714/issue1869.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 22:15:18 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 17 Apr 2009 20:15:18 +0000 Subject: [issue1869] Builtin round function is sometimes inaccurate for floats In-Reply-To: <1200704666.74.0.121276369369.issue1869@psf.upfronthosting.co.za> Message-ID: <1239999318.11.0.11903719965.issue1869@psf.upfronthosting.co.za> Mark Dickinson added the comment: Note that the correctly rounded string<->decimal code only exists in 3.1, so it won't be possible to backport all this good stuff to 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 22:59:05 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 17 Apr 2009 20:59:05 +0000 Subject: [issue5734] BufferedRWPair broken In-Reply-To: <1239446469.87.0.208856663223.issue5734@psf.upfronthosting.co.za> Message-ID: <1240001945.8.0.738265697409.issue5734@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've uploaded the patch for code review here: http://codereview.appspot.com/40126 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 23:11:18 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 17 Apr 2009 21:11:18 +0000 Subject: [issue5734] Fix BufferedRWPair In-Reply-To: <1239446469.87.0.208856663223.issue5734@psf.upfronthosting.co.za> Message-ID: <001636920611f6ea9e0467c69ecd@google.com> Antoine Pitrou added the comment: Reviewers: report_bugs.python.org, Message: Here are some comments. In general, I think the changes to _pyio.py are unwarranted (even though I dislike the naming of _checkReadable and _checkWritable). http://codereview.appspot.com/40126/diff/1/2 File Lib/_pyio.py (left): http://codereview.appspot.com/40126/diff/1/2#oldcode370 Line 370: def _checkReadable(self, msg=None): Not sure why you're removing it. Currently it's used in Lib/socket.py. http://codereview.appspot.com/40126/diff/1/2#oldcode384 Line 384: def _checkWritable(self, msg=None): Same question as for _checkReadable(). http://codereview.appspot.com/40126/diff/1/3 File Lib/test/test_io.py (right): http://codereview.appspot.com/40126/diff/1/3#newcode1121 Line 1121: self.assertTrue(pair.readable) This is probably `pair.readable()` and not `pair.readable`. http://codereview.appspot.com/40126/diff/1/3#newcode1125 Line 1125: self.assertTrue(pair.writable) Same comment as for readable above. http://codereview.appspot.com/40126/diff/1/3#newcode1126 Line 1126: There should probably be a test for seekable() as well. http://codereview.appspot.com/40126/diff/1/4 File Modules/_io/bufferedio.c (right): http://codereview.appspot.com/40126/diff/1/4#newcode1876 Line 1876: Py_DECREF(self->reader); You must use Py_CLEAR so that there is no double free when calling BufferedRWPair_dealloc(). Please review this at http://codereview.appspot.com/40126 Affected files: M Lib/_pyio.py M Lib/test/test_io.py M Modules/_io/bufferedio.c ---------- title: BufferedRWPair broken -> Fix BufferedRWPair _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 23:19:09 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 17 Apr 2009 21:19:09 +0000 Subject: [issue5773] Crash on shutdown after os.fdopen(2) in debug builds In-Reply-To: <1239885549.06.0.444041706295.issue5773@psf.upfronthosting.co.za> Message-ID: <1240003149.35.0.796871240535.issue5773@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I thought there was a _PyVerify_Fd() just for that, why couldn't it be used here too? (not that I think sparkling _PyVerify_Fd() everywhere in our code base is reasonable and maintainable, but I didn't make that choice :-)) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 23:51:59 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 17 Apr 2009 21:51:59 +0000 Subject: [issue1869] Builtin round function is sometimes inaccurate for floats In-Reply-To: <1200704666.74.0.121276369369.issue1869@psf.upfronthosting.co.za> Message-ID: <1240005119.47.0.581485171701.issue1869@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch, with tests. ---------- stage: test needed -> patch review Added file: http://bugs.python.org/file13715/issue1869_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 17 23:52:18 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 17 Apr 2009 21:52:18 +0000 Subject: [issue1869] Builtin round function is sometimes inaccurate for floats In-Reply-To: <1200704666.74.0.121276369369.issue1869@psf.upfronthosting.co.za> Message-ID: <1240005138.9.0.251538170435.issue1869@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 00:10:21 2009 From: report at bugs.python.org (paul rubin) Date: Fri, 17 Apr 2009 22:10:21 +0000 Subject: [issue5784] raw deflate format and zlib module In-Reply-To: <1240006221.86.0.263428051867.issue5784@psf.upfronthosting.co.za> Message-ID: <1240006221.86.0.263428051867.issue5784@psf.upfronthosting.co.za> New submission from paul rubin : The zlib module doesn't support raw deflate format, so it doesn't completely interoperate with php's "gzdeflate" function and fails to decompress some strings that web browsers can decompress. A workaround is to use a special zlib feature and pass the value -15 as the "wbits" arg: plaintext = zlib.deflate(compressed_text, wbits=-15) I don't know if it's appropriate to mess with the code, but at minimum I urge that the workaround be mentioned in the docs. We had a tremendous distruption where I work because of a malicious raw-deflated PHP script that we couldn't decompress with Python for analysis. We had to resort to decompressing in a PHP container that (through my slipping up) it proceeded to escape from. Help us Python-Kenobi, save us from PHP ;-) ---------- messages: 86094 nosy: phr severity: normal status: open title: raw deflate format and zlib module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 00:10:48 2009 From: report at bugs.python.org (paul rubin) Date: Fri, 17 Apr 2009 22:10:48 +0000 Subject: [issue5784] raw deflate format and zlib module In-Reply-To: <1240006221.86.0.263428051867.issue5784@psf.upfronthosting.co.za> Message-ID: <1240006248.43.0.959749290398.issue5784@psf.upfronthosting.co.za> Changes by paul rubin : ---------- components: +Library (Lib) type: -> feature request versions: +Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 00:29:00 2009 From: report at bugs.python.org (paul rubin) Date: Fri, 17 Apr 2009 22:29:00 +0000 Subject: [issue5784] raw deflate format and zlib module In-Reply-To: <1240006221.86.0.263428051867.issue5784@psf.upfronthosting.co.za> Message-ID: <1240007340.32.0.666665296239.issue5784@psf.upfronthosting.co.za> paul rubin added the comment: I should have mentioned, the docs do say "When wbits is negative, the standard gzip header is suppressed; this is an undocumented feature of the zlib library, used for compatibility with unzip?s compression file format" but this wasn't enough at the time to figure out the issue. I suggest adding something like "and the 'raw deflate' format supported by PHP and some web browsers. I better see if I can research the exact situation a bit further, for the sake of documenting it accurately, if others here think it's a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 00:42:46 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 17 Apr 2009 22:42:46 +0000 Subject: [issue5780] test_float fails for 'legacy' float repr style In-Reply-To: <1239964374.11.0.815428814709.issue5780@psf.upfronthosting.co.za> Message-ID: <1240008166.8.0.471030024974.issue5780@psf.upfronthosting.co.za> Mark Dickinson added the comment: Committed, with the fixups Eric pointed out, in r71692. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Apr 18 01:14:13 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Fri, 17 Apr 2009 23:14:13 +0000 Subject: [issue5778] sys.version format differs between MSC and GCC In-Reply-To: <1239958808.78.0.447380255755.issue5778@psf.upfronthosting.co.za> Message-ID: <1240010053.54.0.325033768349.issue5778@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- type: -> feature request _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Apr 18 01:14:23 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Fri, 17 Apr 2009 23:14:23 +0000 Subject: [issue5778] sys.version format differs between MSC and GCC In-Reply-To: <1239958808.78.0.447380255755.issue5778@psf.upfronthosting.co.za> Message-ID: <1240010063.34.3.42613585851e-05.issue5778@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- priority: -> low _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Apr 18 01:14:52 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Fri, 17 Apr 2009 23:14:52 +0000 Subject: [issue5778] sys.version format differs between MSC and GCC In-Reply-To: <1239958808.78.0.447380255755.issue5778@psf.upfronthosting.co.za> Message-ID: <1240010092.18.0.294204601723.issue5778@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- assignee: loewis -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 01:31:01 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 17 Apr 2009 23:31:01 +0000 Subject: [issue5783] IDLE cannot find windows chm file In-Reply-To: <1239995515.37.0.798086990952.issue5783@psf.upfronthosting.co.za> Message-ID: <1240011061.25.0.605857683371.issue5783@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It looks like IDLE has been the same since 2004: http://svn.python.org/view/python/trunk/Lib/idlelib/EditorWindow.py?view=diff&r1=36600&r2=36601 The "correct" filename is what has changed. The release process needs to have a step that validates that the CHM file works from IDLE. FWIW, I think the version naming convention is unnecessary and makes the IDLE linkage too fragile. It would be better to just always call the file Python.chm. By way of comparison, the regular html docs do not get custom names -- they are just index.html in a doc directory. ---------- priority: critical -> release blocker versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 01:37:37 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 17 Apr 2009 23:37:37 +0000 Subject: [issue5783] IDLE cannot find windows chm file In-Reply-To: <1239995515.37.0.798086990952.issue5783@psf.upfronthosting.co.za> Message-ID: <1240011457.95.0.809327405412.issue5783@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Just checked Python2.5.4 and its CHM file is Python25.chm. So everything is fine with that release. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Apr 18 01:47:02 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Fri, 17 Apr 2009 23:47:02 +0000 Subject: [issue3102] ctypes defines global symbols In-Reply-To: <1213343694.16.0.290726791228.issue3102@psf.upfronthosting.co.za> Message-ID: <1240012022.71.0.612818451999.issue3102@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Looks fine to me, except that I wouldn't call things "My*" (but I do understand that this unrelated to this issue). ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Apr 18 01:50:34 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Fri, 17 Apr 2009 23:50:34 +0000 Subject: [issue5783] IDLE cannot find windows chm file In-Reply-To: <1239998982.25.0.971531366511.issue5783@psf.upfronthosting.co.za> Message-ID: <49E915C4.2090203@v.loewis.de> Martin v. L?wis added the comment: > What changed here? We switched to sphinx, and the makefiles put the full version into the output files. > ISTM that IDLE was always looking for the same name > and that the new part is that the build procedure has been been changed > (the step where the "make htmlhelp" output file is moved to ./Doc and > renamed). No, the "make htmlhelp" output is already called python262.chm. So no renaming occurs. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Apr 18 01:50:49 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Fri, 17 Apr 2009 23:50:49 +0000 Subject: [issue5764] 2.6.2 Python Manuals CHM file seems broken In-Reply-To: <1239999040.75.0.784409736588.issue5764@psf.upfronthosting.co.za> Message-ID: <49E915D7.5010101@v.loewis.de> Martin v. L?wis added the comment: > Are you also going to update the original MSI file so that people get a > correct installation straight-away? No. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Apr 18 02:01:20 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Sat, 18 Apr 2009 00:01:20 +0000 Subject: [issue5783] IDLE cannot find windows chm file In-Reply-To: <1240011061.25.0.605857683371.issue5783@psf.upfronthosting.co.za> Message-ID: <49E9184A.6070107@v.loewis.de> Martin v. L?wis added the comment: > The release process needs to have a step that validates that the CHM > file works from IDLE. I personally can't perform such testing steps, perhaps unless somebody maintains a list of such steps for me. Instead, I think such problems must be detected during beta testing. The fact that it hasn't been detected so far, even though it existed since 2.6.0, indicates that the problem can't be that serious. > FWIW, I think the version naming convention is unnecessary and makes the > IDLE linkage too fragile. It would be better to just always call the > file Python.chm. By way of comparison, the regular html docs do not get > custom names That's not true: they are called e.g. python-2.6.2-docs-html.tar.bz2 (see http://docs.python.org/download.html) I believe that the rationale for calling the CHM file that way is the same as for putting a version number into any other output. FWIW, the renaming had caused some troubles in the past, but most of it is over. Renaming it back will cause more troubles for sure. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Apr 18 02:01:50 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Sat, 18 Apr 2009 00:01:50 +0000 Subject: [issue5783] IDLE cannot find windows chm file In-Reply-To: <1240011457.95.0.809327405412.issue5783@psf.upfronthosting.co.za> Message-ID: <49E9186C.7060904@v.loewis.de> Martin v. L?wis added the comment: > Just checked Python2.5.4 and its CHM file is Python25.chm. So > everything is fine with that release. True. The renaming happened with the switch to sphinx. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 02:12:17 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 18 Apr 2009 00:12:17 +0000 Subject: [issue5779] _elementtree import can fail silently In-Reply-To: <1239960910.01.0.399059984648.issue5779@psf.upfronthosting.co.za> Message-ID: <1240013537.01.0.655042197163.issue5779@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 08:55:14 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 18 Apr 2009 06:55:14 +0000 Subject: [issue5739] Language reference is ambiguous regarding next() method lookup In-Reply-To: <1239497907.46.0.481458734082.issue5739@psf.upfronthosting.co.za> Message-ID: <1240037713.71.0.748912537165.issue5739@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I was surprised when this came up with another issue. Why does CPython behave that way? Accident or justified decision? ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 09:29:12 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 18 Apr 2009 07:29:12 +0000 Subject: [issue5760] __getitem__ error message hard to understand In-Reply-To: <1239777131.98.0.31222273519.issue5760@psf.upfronthosting.co.za> Message-ID: <1240039752.65.0.67234605717.issue5760@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As I said on the python-ideas discussion, which definitely did *not* come to consensus, I disagree with this suggestion. To repeat and expand on what I said there: 1. 'unsubscriptable' could instead be changed to 'not subscriptable'. 2. 'subscription' *is* the way Python describes the use of []. """A subscription selects an item of a sequence (string, tuple or list) or mapping (dictionary) object: subscription ::= primary "[" expression_list "]" """ 'array subscript' (from C, for example) is a standard term used for decades in computer languages. It is appropriate since a[i] is one standard single-text-line replacement for ai when one cannot actually 'type' a subscript. It *is* a way of representing a subscript, just as i**j is an in-line way of representing a superscript exponent, which we still call an exponent in spite of it not being 'raised'. Both constitute visible markup that is part of the compromise in representing 2D typography with a 1D stream of characters. Using '/' for division (and fractions) is another. 3. Python error message generally do not and I think should not mention the special method implementation that underlies surface level errors. In this particular case, the remedy to mistakenly trying to subscript something is to not do that. I think mentioning __getitem__ would be a distraction. One generally *cannot* just go around adding it. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 09:40:43 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 18 Apr 2009 07:40:43 +0000 Subject: [issue5777] unable to search in python V3 documentation In-Reply-To: <1239956997.02.0.510545849385.issue5777@psf.upfronthosting.co.za> Message-ID: <1240040443.79.0.308425580357.issue5777@psf.upfronthosting.co.za> Terry J. Reedy added the comment: You should have searched for "sys argv" since "sys.argv" is not 'a word'. However, that would not have worked since multiple word searching seems to be broken, at least sometimes. In particular, searching for 'argv' gives several hits, including the one you wanted, as does searching for 'sys', but 'sys argv' does not. I tried another example using two words from a particular doc and got a similar failure. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 09:41:16 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 18 Apr 2009 07:41:16 +0000 Subject: [issue5734] Fix BufferedRWPair In-Reply-To: <1239446469.87.0.208856663223.issue5734@psf.upfronthosting.co.za> Message-ID: <1240040476.01.0.04984080481.issue5734@psf.upfronthosting.co.za> Changes by Brian Quinlan : Added file: http://bugs.python.org/file13716/rwpair2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 09:41:34 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 18 Apr 2009 07:41:34 +0000 Subject: [issue5734] Fix BufferedRWPair In-Reply-To: <1239446469.87.0.208856663223.issue5734@psf.upfronthosting.co.za> Message-ID: <001485f54658f46b8f0467cf6cf8@google.com> Brian Quinlan added the comment: http://codereview.appspot.com/40126/diff/1/2 File Lib/_pyio.py (left): http://codereview.appspot.com/40126/diff/1/2#oldcode370 Line 370: def _checkReadable(self, msg=None): On 2009/04/17 21:11:15, Antoine Pitrou wrote: > Not sure why you're removing it. Currently it's used in Lib/socket.py. I didn't see the other usages. I removed it because it was only used twice in this file and one of the usages involved an instance other than self i.e. calling an internal method on another instance. Ditto for _checkWriteable Now restored. http://codereview.appspot.com/40126/diff/1/3 File Lib/test/test_io.py (right): http://codereview.appspot.com/40126/diff/1/3#newcode1121 Line 1121: self.assertTrue(pair.readable) On 2009/04/17 21:11:15, Antoine Pitrou wrote: > This is probably `pair.readable()` and not `pair.readable`. Done. http://codereview.appspot.com/40126/diff/1/3#newcode1125 Line 1125: self.assertTrue(pair.writable) On 2009/04/17 21:11:15, Antoine Pitrou wrote: > Same comment as for readable above. Done. http://codereview.appspot.com/40126/diff/1/3#newcode1126 Line 1126: On 2009/04/17 21:11:15, Antoine Pitrou wrote: > There should probably be a test for seekable() as well. Now you are getting greedy. Done. http://codereview.appspot.com/40126/diff/1/4 File Modules/_io/bufferedio.c (right): http://codereview.appspot.com/40126/diff/1/4#newcode1876 Line 1876: Py_DECREF(self->reader); On 2009/04/17 21:11:15, Antoine Pitrou wrote: > You must use Py_CLEAR so that there is no double free when calling > BufferedRWPair_dealloc(). Done. http://codereview.appspot.com/40126 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 09:54:18 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 18 Apr 2009 07:54:18 +0000 Subject: [issue5777] unable to search in python V3 documentation In-Reply-To: <1239956997.02.0.510545849385.issue5777@psf.upfronthosting.co.za> Message-ID: <1240041258.89.0.997328053666.issue5777@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the report, searching for dotted identifiers is implemented now in the trunk version of Sphinx. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 10:27:38 2009 From: report at bugs.python.org (Thomas Heller) Date: Sat, 18 Apr 2009 08:27:38 +0000 Subject: [issue3102] ctypes defines global symbols In-Reply-To: <1213343694.16.0.290726791228.issue3102@psf.upfronthosting.co.za> Message-ID: <1240043258.17.0.984700642569.issue3102@psf.upfronthosting.co.za> Thomas Heller added the comment: Correction: The patch has 3000 lines, not 300. And I think that the 'My_Unicode_...' functions can be removed because they are not used anywhere. I have to check this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 10:31:51 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 18 Apr 2009 08:31:51 +0000 Subject: [issue5760] __getitem__ error message hard to understand In-Reply-To: <1239777131.98.0.31222273519.issue5760@psf.upfronthosting.co.za> Message-ID: <1240043511.08.0.26475838974.issue5760@psf.upfronthosting.co.za> Georg Brandl added the comment: I concur. I changed "unsubscriptable" to "not subscriptable" in r71696. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 10:56:10 2009 From: report at bugs.python.org (Trundle) Date: Sat, 18 Apr 2009 08:56:10 +0000 Subject: [issue5322] Python 2.6 object.__new__ argument calling autodetection faulty In-Reply-To: <1235075665.37.0.301694124748.issue5322@psf.upfronthosting.co.za> Message-ID: <1240044970.75.0.0446969050396.issue5322@psf.upfronthosting.co.za> Trundle added the comment: The problem is that `type_setattro()` sets the new "__new__" attribute in the type's dict (through `PyObject_GenericSetAttr()`), but the corresponding slot will never be updated if the new "__new__" is a PyCFunction. The affected code in `update_one_slot()` was added by Guido van Rossum in r28090, so maybe he would like to comment on that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 12:18:20 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 Apr 2009 10:18:20 +0000 Subject: [issue5781] Legacy float repr is used unnecessarily on some platforms In-Reply-To: <1239974178.12.0.90656789268.issue5781@psf.upfronthosting.co.za> Message-ID: <1240049900.26.0.340042991784.issue5781@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in r71698. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 13:33:20 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 18 Apr 2009 11:33:20 +0000 Subject: [issue5739] Language reference is ambiguous regarding next() method lookup In-Reply-To: <1239497907.46.0.481458734082.issue5739@psf.upfronthosting.co.za> Message-ID: <1240054400.43.0.145310579418.issue5739@psf.upfronthosting.co.za> Nick Coghlan added the comment: Guido didn't actually say whether or not this was originally just an implementation accident or a deliberate design choice - he just indicated that this was a case where caching the bound method should be disallowed because it could change the semantics of existing programs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 13:51:19 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 Apr 2009 11:51:19 +0000 Subject: [issue1869] Builtin round function is sometimes inaccurate for floats In-Reply-To: <1200704666.74.0.121276369369.issue1869@psf.upfronthosting.co.za> Message-ID: <1240055479.28.0.726226434527.issue1869@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in py3k in r71701. Some of this fix can be backported to 2.7. ---------- versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 14:06:39 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 Apr 2009 12:06:39 +0000 Subject: [issue1869] Builtin round function is sometimes inaccurate for floats In-Reply-To: <1200704666.74.0.121276369369.issue1869@psf.upfronthosting.co.za> Message-ID: <1240056399.6.0.0234531459858.issue1869@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing this. I think 2.7 is fine as it is. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 14:22:56 2009 From: report at bugs.python.org (Lorenz Quack) Date: Sat, 18 Apr 2009 12:22:56 +0000 Subject: [issue1944] Documentation for PyUnicode_AsString (et al.) missing. In-Reply-To: <1201415203.65.0.272410099804.issue1944@psf.upfronthosting.co.za> Message-ID: <1240057376.53.0.789456571211.issue1944@psf.upfronthosting.co.za> Lorenz Quack added the comment: In addition to the above mentioned functions I found these to be undocumented: PyUnicode_DecodeUTF7 PyUnicode_DecodeUTF7Stateful PyUnicode_EncodeDecimal PyUnicode_EncodeUTF7 PyUnicode_FromFormat PyUnicode_FromString PyUnicode_FromStringAndSize PyUnicode_GetMax PyUnicode_Partition PyUnicode_RPartition PyUnicode_RSplit >From the original list the following functions seem to have been removed: PyUnicode_InternImmortal PyUnicode_DecodeFSDefault PyUnicode_DecodeFSDefaultAndSize I try to put together a patch for some of these during the weekend. ---------- nosy: +donlorenzo versions: +Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 14:27:25 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 Apr 2009 12:27:25 +0000 Subject: [issue1869] Builtin round function is sometimes inaccurate for floats In-Reply-To: <1200704666.74.0.121276369369.issue1869@psf.upfronthosting.co.za> Message-ID: <1240057645.41.0.0914364676248.issue1869@psf.upfronthosting.co.za> Mark Dickinson added the comment: I take that back. The 2.7 round still has some problems. Here's one example: >>> x = 5e15 + 1 # exactly representable as an IEEE 754 double >>> x 5000000000000001.0 >>> round(x) 5000000000000002.0 Another nit: >>> round(-0.0, 0) # should retain the sign of zero 0.0 Reopening. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From =?utf-8?q?St=C3=A9phane_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sat Apr 18 15:53:48 2009 From: =?utf-8?q?St=C3=A9phane_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?St=C3=A9phane_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sat, 18 Apr 2009 13:53:48 +0000 Subject: [issue5785] Condition.wait() does not respect its timeout In-Reply-To: <1240062828.56.0.381280263985.issue5785@psf.upfronthosting.co.za> Message-ID: <1240062828.56.0.381280263985.issue5785@psf.upfronthosting.co.za> New submission from St?phane : I have an issue with the wait() method of Condition which doesn't seem to respect the timeout it is given: I couldn't create a simple example to reproduce the bug, because if I try to do something small and simple everything works as expected, but in the actual code it doesn't work, so here's the link to the code: http://github.com/Kjir/amsn2/blob/ bda6829d0c7d50a1cbf1188cdfa3789c4b7967c5/amsn2/gui/front_ends/curses/ contact_list.py The most interesting function is the last one, where there is a wait with timeout of 1 second. If I have a look at the logs, after the initial download of the list there is nothing happening, while I'd expect to see a "check" cycle every second or so. If there is a notification arriving, the whole thing fires up and updates the contact list as expected, but the timeout itself doesn't work. I don't know if there could be a problem with other modules, for instance gobject, but if there is then you should update the documentation to point out such incompatibilities. If you could help me to create a simpler program to test this issue I would happy to provide you a test case, but I am out of ideas right now on how to narrow down the issue. If you want to download the code and test it, here are the instructions: git clone git://github.com/Kjir/amsn2.git cd amsn2 git checkout -b curses_cl origin/curs_cl python amsn2.py -f curses 2>> run.log Log in with an msn account, tail -f run.log in another terminal to watch the logs If you want to se what happens on a notify, one of your contacts should change status. And here are a very brief explanation on how the code is called, if you need it: the whole code is divided in basically three areas, core, protocol and gui. I am working on the gui side and the methods contactListUpdated, groupUpdated and contactUpdated are called by the core through a gobject signal. My python version is 2.5.2 on gentoo amd64, use flags: berkdb gdbm ipv6 ncurses readline ssl threads tk xml -build -doc -elibc_uclibc -examples -sqlite -ucs2 -wininst If you need anything else, just ask! Oh and here's the link to the posts on comp.lang.python: http://groups.google.com/group/comp.lang.python/browse_thread/ thread/7fc388c30304bf22# ---------- components: Library (Lib) messages: 86118 nosy: Kjir severity: normal status: open title: Condition.wait() does not respect its timeout type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 17:06:25 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 Apr 2009 15:06:25 +0000 Subject: [issue1869] Builtin round function is sometimes inaccurate for floats In-Reply-To: <1200704666.74.0.121276369369.issue1869@psf.upfronthosting.co.za> Message-ID: <1240067185.58.0.326784189075.issue1869@psf.upfronthosting.co.za> Mark Dickinson added the comment: The two problems mentioned above have now been fixed in r71715. There are (at least) two remaining problems with the round function in 2.x that I'm not going to fix, because the added complication doesn't seem worth it. (1) round(x, n) doesn't give correct results with large values of n; but small values (e.g., abs(n) <= 50) should be fine unless x is huge. (2) round(x, n) still occasionally rounds the wrong way in borderline cases, even for small n. Closing (again!) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 17:10:56 2009 From: report at bugs.python.org (Robin Bryce) Date: Sat, 18 Apr 2009 15:10:56 +0000 Subject: [issue1538691] Patch cElementTree to export CurrentLineNumber Message-ID: <1240067456.91.0.477273338385.issue1538691@psf.upfronthosting.co.za> Robin Bryce added the comment: > In the upstream 1.0.6, the ParseError exception has a position attribute > that contains a (line, column) tuple. That's fine for errors in the xml domain. Its not enough if I'm reporting errors in the application domain - where I wont have a handy exception to interrogate. What's the problem with just exposing the api and requiring users who need it to use the streaming parser ? Personally, I would have cached these details as a properties of the _ElementInterface implementation for precisely this use case. ---------- nosy: +robinbryce status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 17:18:47 2009 From: report at bugs.python.org (Lorenz Quack) Date: Sat, 18 Apr 2009 15:18:47 +0000 Subject: [issue1944] Documentation for PyUnicode_AsString (et al.) missing. In-Reply-To: <1201415203.65.0.272410099804.issue1944@psf.upfronthosting.co.za> Message-ID: <1240067927.64.0.856406288343.issue1944@psf.upfronthosting.co.za> Lorenz Quack added the comment: Ok, here is my shot at a patch for at least some of the undocumented functions. Namely the following functions are being documented in the patch: PyUnicode_FromFormat PyUnicode_FromFormatV PyUnicode_FromString PyUnicode_FromStringAndSize PyUnicode_Partition PyUnicode_RPartition PyUnicode_RSplit Please thoroughly review this patch since I didn't really digg into the source to find out what the functions do but rather just copied old PyString documentation or derived it from the docs for the Python API. ---------- keywords: +patch Added file: http://bugs.python.org/file13717/unicode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 18:00:28 2009 From: report at bugs.python.org (seesee) Date: Sat, 18 Apr 2009 16:00:28 +0000 Subject: [issue5786] len(reversed([1,2,3])) does not work anymore in 2.6.2 In-Reply-To: <1240070428.04.0.628652917462.issue5786@psf.upfronthosting.co.za> Message-ID: <1240070428.04.0.628652917462.issue5786@psf.upfronthosting.co.za> New submission from seesee : It seems python 2.6.2 (at least under Windows, I have not tested other platforms) does break the len function on the reversed iterator: 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. >>> len(reversed([1,2,3])) 3 Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> len(reversed([1,2,3])) Traceback (most recent call last): File "", line 1, in TypeError: object of type 'listreverseiterator' has no len() I don't think it was meant to work but it did in Python 2.6.1 (and 2.5 as shown above). I guess it has something to do with Issue #3689 and guess __len__ was simply removed. Problem really is that Python 2.6.2 breaks backwards compatibility. ---------- components: Windows messages: 86122 nosy: seesee severity: normal status: open title: len(reversed([1,2,3])) does not work anymore in 2.6.2 versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 18:36:56 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 Apr 2009 16:36:56 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1240072616.71.0.484390625739.issue2531@psf.upfronthosting.co.za> Mark Dickinson added the comment: Unassigning myself. Does anyone beside Raymond and me have strong opinions about how/whether this problem should be fixed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 18:37:04 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 Apr 2009 16:37:04 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1240072624.66.0.691945060333.issue2531@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: marketdickinson -> _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sat Apr 18 19:19:25 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Sat, 18 Apr 2009 17:19:25 +0000 Subject: [issue5786] len(reversed([1,2,3])) does not work anymore in 2.6.2 In-Reply-To: <1240070428.04.0.628652917462.issue5786@psf.upfronthosting.co.za> Message-ID: <1240075165.79.0.683454293372.issue5786@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- components: -Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 19:27:43 2009 From: report at bugs.python.org (STINNER Victor) Date: Sat, 18 Apr 2009 17:27:43 +0000 Subject: [issue5410] msvcrt bytes cleanup In-Reply-To: <1236081375.11.0.544682804494.issue5410@psf.upfronthosting.co.za> Message-ID: <1240075663.61.0.856118955137.issue5410@psf.upfronthosting.co.za> STINNER Victor added the comment: > I cannot see any remarks about masking behavior. :-( I asked on a french Windows developer channel. The answer is that the Windows terminal uses "ANSI" charset even if it's possible to use unicode. So it's a bug in Microsoft msvcrt library (directly in the terminal implementation), not in Python. Anyway I think that my patch (msvcrt_wchar.patch) makes the situation better ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 19:29:45 2009 From: report at bugs.python.org (STINNER Victor) Date: Sat, 18 Apr 2009 17:29:45 +0000 Subject: [issue5410] msvcrt bytes cleanup In-Reply-To: <1236081375.11.0.544682804494.issue5410@psf.upfronthosting.co.za> Message-ID: <1240075785.23.0.467057775373.issue5410@psf.upfronthosting.co.za> STINNER Victor added the comment: > MSDN says _ungetwch returns WEOF instead of EOF when error occurs. Ok, I updated my patch (to use WEOF). ---------- Added file: http://bugs.python.org/file13718/msvcrt_wchar-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 19:45:18 2009 From: report at bugs.python.org (Aleksi Torhamo) Date: Sat, 18 Apr 2009 17:45:18 +0000 Subject: [issue5787] object.__getattribute__(super, '__bases__') crashes the interpreter. In-Reply-To: <1240076718.56.0.20381278649.issue5787@psf.upfronthosting.co.za> Message-ID: <1240076718.56.0.20381278649.issue5787@psf.upfronthosting.co.za> New submission from Aleksi Torhamo : object.__getattribute__(super, '__bases__') crashes the interpreter. It seems to happen at Objects/typeobject.c in type_get_bases(), when tp_bases is NULL. Crashing types in __builtins__ per version would seem to be: python2.4: slice frozenset super staticmethod float enumerate long xrange tuple reversed property complex buffer classmethod python2.5: slice frozenset super staticmethod float enumerate long xrange reversed property complex buffer classmethod python2.6: slice super staticmethod float enumerate long xrange reversed python3.0: memoryview slice super filter range staticmethod float enumerate reversed map 2.7 and 3.1 not tested since i don't have them installed. ---------- components: Interpreter Core messages: 86126 nosy: alexer severity: normal status: open title: object.__getattribute__(super, '__bases__') crashes the interpreter. type: crash versions: Python 2.4, Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 19:55:51 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 18 Apr 2009 17:55:51 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1240077351.1.0.837430985065.issue1580@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hello folks, IIUC, autoconf tries to enable SSE2 by default without asking. Isn't it a problem for people distributing Python binaries (e.g. Linux vendors) and expecting these binaries to work on legacy systems even though the system on which the binaries were compiled supports SSE2? Or am I misunderstanding what the changes are? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 19:56:17 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 Apr 2009 17:56:17 +0000 Subject: [issue3633] float.fromhex discrepancy under Solaris In-Reply-To: <1219324715.21.0.0788061296903.issue3633@psf.upfronthosting.co.za> Message-ID: <1240077377.56.0.404522565004.issue3633@psf.upfronthosting.co.za> Mark Dickinson added the comment: A postscript: looking back at this from afar, the original error was almost certainly due to a missing Py_CHARMASK around the arguments to isdigit and isxdigit, and nothing to do with Unicode fullwidth digits at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 20:08:31 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 Apr 2009 18:08:31 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1240078111.86.0.768476093315.issue1580@psf.upfronthosting.co.za> Mark Dickinson added the comment: Yes, I think you're right. Perhaps the SSE2 support should be turned into an --enable-sse2 configure option, that's disabled by default? One problem with this is that I don't know how to enable SSE2 instructions for compilers other than gcc, so the option would only apply to gcc-based systems. Disabling SSE2 would just mean that all x86/gcc systems would end up using the inline assembler to get and set the control word; so we'd still get short float repr everywhere we did before. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 20:09:27 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 18 Apr 2009 18:09:27 +0000 Subject: [issue5786] len(reversed([1,2,3])) does not work anymore in 2.6.2 In-Reply-To: <1240070428.04.0.628652917462.issue5786@psf.upfronthosting.co.za> Message-ID: <1240078167.77.0.389519882349.issue5786@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 20:10:12 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 18 Apr 2009 18:10:12 +0000 Subject: [issue5786] len(reversed([1,2,3])) does not work anymore in 2.6.2 In-Reply-To: <1240070428.04.0.628652917462.issue5786@psf.upfronthosting.co.za> Message-ID: <1240078212.16.0.840659021051.issue5786@psf.upfronthosting.co.za> Georg Brandl added the comment: Raymond, this was your change in r67478 (backported to trunk in r67498). ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 20:34:57 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 Apr 2009 18:34:57 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1240079697.03.0.504094728798.issue1580@psf.upfronthosting.co.za> Mark Dickinson added the comment: Perhaps better to drop the SSE2 bits completely. Anybody who actually wants SSE2 instructions in their binary can do a CC="gcc -msse2 -mfpmath=sse" configure && ... Unless there are objections, I'll drop everything involving SSE2 from the configure script. It's a bit of a shame, though: it's definitely desirable to be using the SSE2 instructions for floating-point whenever possible. Fewer surprises due to double rounding or random 80-bit register spilling, better performance on underflow and NaNs, ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 20:37:40 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 18 Apr 2009 18:37:40 +0000 Subject: [issue5788] datetime.timedelta is inconvenient to use... In-Reply-To: <1240079860.62.0.329216013715.issue5788@psf.upfronthosting.co.za> Message-ID: <1240079860.62.0.329216013715.issue5788@psf.upfronthosting.co.za> New submission from Brian Quinlan : ...in seconds-based library functions (e.g. time.sleep) and calculations (e.g. distance = velocity * ?). ---------- components: Library (Lib) messages: 86132 nosy: bquinlan severity: normal status: open title: datetime.timedelta is inconvenient to use... versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 20:38:43 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 18 Apr 2009 18:38:43 +0000 Subject: [issue5788] datetime.timedelta is inconvenient to use... In-Reply-To: <1240079860.62.0.329216013715.issue5788@psf.upfronthosting.co.za> Message-ID: <1240079923.46.0.548607901363.issue5788@psf.upfronthosting.co.za> Changes by Brian Quinlan : ---------- keywords: +patch Added file: http://bugs.python.org/file13719/totalseconds.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 21:22:14 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 18 Apr 2009 19:22:14 +0000 Subject: [issue5788] datetime.timedelta is inconvenient to use... In-Reply-To: <1240079860.62.0.329216013715.issue5788@psf.upfronthosting.co.za> Message-ID: <1240082534.92.0.669020585693.issue5788@psf.upfronthosting.co.za> Georg Brandl added the comment: Please include a proper description of your problem, and a patch description when you post a patch. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 21:28:01 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 18 Apr 2009 19:28:01 +0000 Subject: [issue5771] SA bugs with unittest.py@r71263 In-Reply-To: <1239875594.79.0.0374770932255.issue5771@psf.upfronthosting.co.za> Message-ID: <1240082881.25.0.803751612972.issue5771@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r71721. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 21:36:42 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 18 Apr 2009 19:36:42 +0000 Subject: [issue5788] datetime.timedelta is inconvenient to use... In-Reply-To: <1240079860.62.0.329216013715.issue5788@psf.upfronthosting.co.za> Message-ID: <1240083402.78.0.286383948348.issue5788@psf.upfronthosting.co.za> Brian Quinlan added the comment: I did add a patch description: "Adds a datetime.total_seconds attribute" - is that unclear? The idea is that you should be able to extract the total number of seconds in the duration i.e. >>> dt = datetime.timedelta(seconds=1234567.89) >>> dt.total_seconds 1234567.89 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 22:03:00 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 18 Apr 2009 20:03:00 +0000 Subject: [issue5788] datetime.timedelta is inconvenient to use... In-Reply-To: <1240079860.62.0.329216013715.issue5788@psf.upfronthosting.co.za> Message-ID: <1240084980.98.0.63743050769.issue5788@psf.upfronthosting.co.za> Georg Brandl added the comment: I saw the patch description as well, but usually you put that description, and perhaps a motivation as well, in the comment. That way it's easier for people to directly see what an issue is about. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 22:13:20 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 18 Apr 2009 20:13:20 +0000 Subject: [issue5787] object.__getattribute__(super, '__bases__') crashes the interpreter. In-Reply-To: <1240076718.56.0.20381278649.issue5787@psf.upfronthosting.co.za> Message-ID: <1240085600.58.0.849671487876.issue5787@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Should be fixed in r71722. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 22:20:26 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 18 Apr 2009 20:20:26 +0000 Subject: [issue5788] datetime.timedelta is inconvenient to use... In-Reply-To: <1240079860.62.0.329216013715.issue5788@psf.upfronthosting.co.za> Message-ID: <1240086026.21.0.134737372199.issue5788@psf.upfronthosting.co.za> Brian Quinlan added the comment: OK, a bit on motivation: 1. datetime.timedelta instances are a convenient way of representing durations 2. datetime.timedelta instances cannot be conveniently used in many calculations e.g. calculating distance based on velocity and time 3. datetime.timedelta instances cannot be conveniently used in many library functions e.g. time.sleep(), urllib2.urlopen(timeout=) I propose to fix that by adding a timedelta.total_seconds attribute that equals: timedelta.days * 3600 * 24 + timedelta.seconds + timedelta.microseconds / 100000.0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 22:21:28 2009 From: report at bugs.python.org (Aarni Koskela) Date: Sat, 18 Apr 2009 20:21:28 +0000 Subject: [issue5787] object.__getattribute__(super, '__bases__') crashes the interpreter. In-Reply-To: <1240076718.56.0.20381278649.issue5787@psf.upfronthosting.co.za> Message-ID: <1240086088.69.0.882923239916.issue5787@psf.upfronthosting.co.za> Aarni Koskela added the comment: The r71722 patch has several typos (replace initalize with initialize). ---------- nosy: +akx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 22:50:15 2009 From: report at bugs.python.org (Aleksi Torhamo) Date: Sat, 18 Apr 2009 20:50:15 +0000 Subject: [issue5787] object.__getattribute__(super, '__bases__') crashes the interpreter. In-Reply-To: <1240076718.56.0.20381278649.issue5787@psf.upfronthosting.co.za> Message-ID: <1240087815.12.0.866889491377.issue5787@psf.upfronthosting.co.za> Aleksi Torhamo added the comment: Just verified that r71722 fixes all the builtins, however i just noticed that some types under module types cause segfaults too. Under python2.7 those are: CodeType BuiltinMethodType DictProxyType GeneratorType GetSetDescriptorType EllipsisType FrameType InstanceType MemberDescriptorType Not sure, but i'm guessing there might be yet more types somewhere, that need fixing (as the only places i've looked at are __builtins__ and types - the first ones to cause problems/come to mind). Would there be some way to find out all defined types, or to fix this for all types in a single place? ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 18 22:56:30 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 18 Apr 2009 20:56:30 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1240088190.4.0.814027864099.issue1580@psf.upfronthosting.co.za> Mark Dickinson added the comment: SSE2 detection and flags removed in r71723. We'll see how the buildbots fare... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 00:16:01 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 18 Apr 2009 22:16:01 +0000 Subject: [issue5787] object.__getattribute__(super, '__bases__') crashes the interpreter. In-Reply-To: <1240076718.56.0.20381278649.issue5787@psf.upfronthosting.co.za> Message-ID: <1240092961.1.0.937906432936.issue5787@psf.upfronthosting.co.za> Benjamin Peterson added the comment: The rest should be fixed in r71734. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 00:16:21 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 18 Apr 2009 22:16:21 +0000 Subject: [issue5787] object.__getattribute__(super, '__bases__') crashes the interpreter. In-Reply-To: <1240076718.56.0.20381278649.issue5787@psf.upfronthosting.co.za> Message-ID: <1240092981.56.0.0420274082388.issue5787@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 01:30:54 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 18 Apr 2009 23:30:54 +0000 Subject: [issue5786] len(reversed([1,2,3])) does not work anymore in 2.6.2 In-Reply-To: <1240070428.04.0.628652917462.issue5786@psf.upfronthosting.co.za> Message-ID: <1240097454.4.0.706850172675.issue5786@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Guido decided that iterators should not support len() because he wanted bool(it) to always be True. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 01:35:35 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 18 Apr 2009 23:35:35 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1240097735.38.0.021023061845.issue1580@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Is there a way to use SSE when available and x86 when it's not. IIRC, floating point used to work that way (using a C lib as a fallback on systems w/o coprocessor support). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 01:37:50 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 18 Apr 2009 23:37:50 +0000 Subject: [issue5786] len(reversed([1,2,3])) does not work anymore in 2.6.2 In-Reply-To: <1240070428.04.0.628652917462.issue5786@psf.upfronthosting.co.za> Message-ID: <1240097870.16.0.373918075182.issue5786@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Uh, perhaps the behaviour wasn't optimal but breaking compatibility between two bugfix releases isn't developer-friendly either. While we could keep it in trunk, it sounds like the change should be reverted in 2.6. The backport to 2.6 was done by Georg in r67569, by the way :-) ---------- nosy: +pitrou resolution: invalid -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 01:43:07 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 18 Apr 2009 23:43:07 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1240097735.38.0.021023061845.issue1580@psf.upfronthosting.co.za> Message-ID: <1240098286.9193.6.camel@fsol> Antoine Pitrou added the comment: > Is there a way to use SSE when available and x86 when it's not. Probably, but I don't think there is any point doing so. The main benefit of SSE2 is to get higher performance on floating point intensive code, which no pure Python code could be regarded as (the CPU cycles elapsed between two FP instructions would dwarf the cost of executing the FP instructions themselves). The situation is different for specialized packages like numpy, but their decisions need not be the same as ours AFAIK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 01:49:48 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 18 Apr 2009 23:49:48 +0000 Subject: [issue5788] datetime.timedelta is inconvenient to use... In-Reply-To: <1240079860.62.0.329216013715.issue5788@psf.upfronthosting.co.za> Message-ID: <1240098588.95.0.627077964913.issue5788@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The addition looks quite legitimate to me. The only thing is that it may be better as a method (total_seconds()) rather than an attribute, given the other APIs in the datetime module. Also, the patch lacks some unit tests. ---------- nosy: +pitrou versions: +Python 2.7 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 01:50:02 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 18 Apr 2009 23:50:02 +0000 Subject: [issue5788] datetime.timedelta is inconvenient to use... In-Reply-To: <1240079860.62.0.329216013715.issue5788@psf.upfronthosting.co.za> Message-ID: <1240098602.18.0.0842134042499.issue5788@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- priority: -> normal stage: -> patch review type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 01:50:46 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 18 Apr 2009 23:50:46 +0000 Subject: [issue5788] datetime.timedelta is inconvenient to use... In-Reply-To: <1240079860.62.0.329216013715.issue5788@psf.upfronthosting.co.za> Message-ID: <1240098646.39.0.0157429476562.issue5788@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sorry for the last comment about unit tests, they are here actually :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 01:52:33 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 18 Apr 2009 23:52:33 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1240098753.99.0.889850542231.issue1580@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The advantage is accuracy. No double rounding. This will also help the math.fsum() function that is also susceptible to double rounding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 01:55:17 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 18 Apr 2009 23:55:17 +0000 Subject: [issue5734] Fix BufferedRWPair In-Reply-To: <1239446469.87.0.208856663223.issue5734@psf.upfronthosting.co.za> Message-ID: <1240098917.66.0.57577999557.issue5734@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch looks ok, thanks. ---------- resolution: -> accepted stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 02:07:18 2009 From: report at bugs.python.org (Elliot Murphy) Date: Sun, 19 Apr 2009 00:07:18 +0000 Subject: [issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails Message-ID: <1240099638.15.0.365066529208.issue1424152@psf.upfronthosting.co.za> Changes by Elliot Murphy : ---------- nosy: +statik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 02:11:22 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 19 Apr 2009 00:11:22 +0000 Subject: [issue5734] Fix BufferedRWPair In-Reply-To: <1239446469.87.0.208856663223.issue5734@psf.upfronthosting.co.za> Message-ID: <1240099882.85.0.863856719082.issue5734@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r71736. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 03:32:09 2009 From: report at bugs.python.org (Aleksi Torhamo) Date: Sun, 19 Apr 2009 01:32:09 +0000 Subject: [issue5787] object.__getattribute__(super, '__bases__') crashes the interpreter. In-Reply-To: <1240076718.56.0.20381278649.issue5787@psf.upfronthosting.co.za> Message-ID: <1240104729.19.0.462000819485.issue5787@psf.upfronthosting.co.za> Aleksi Torhamo added the comment: Stumbled upon a few more. python2.4/2.5: socket.SSLType re._pattern_type weakref.ProxyType weakref.CallableProxyType python2.6/2.7: weakref.ProxyType weakref.CallableProxyType python3.0: weakref.ProxyType weakref.CallableProxyType _abcoll.dict_proxy I'll also mention MLab.arraytype and MLab.UfuncType, though they are in a third-party module.. Btw, should this be kept open until this is backported to 2.4/2.5 as well? ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 03:42:29 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 19 Apr 2009 01:42:29 +0000 Subject: [issue5786] len(reversed([1,2,3])) does not work anymore in 2.6.2 In-Reply-To: <1240070428.04.0.628652917462.issue5786@psf.upfronthosting.co.za> Message-ID: <1240105349.83.0.227537132331.issue5786@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It's up to you guys. I had thought to change it only for Py2.7 but Guido probably considers it to be a bug, so possibly the backport was justified. ---------- assignee: rhettinger -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 04:33:14 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 19 Apr 2009 02:33:14 +0000 Subject: [issue5787] object.__getattribute__(super, '__bases__') crashes the interpreter. In-Reply-To: <1240076718.56.0.20381278649.issue5787@psf.upfronthosting.co.za> Message-ID: <1240108394.39.0.148884375873.issue5787@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed the ones applicable to 2.7/2.6 in r71738. These fixes won't be backported to 2.4/2.5. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 04:53:09 2009 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 19 Apr 2009 02:53:09 +0000 Subject: [issue5789] powerset recipe listed twice in itertools docs In-Reply-To: <1240109589.15.0.0305049263162.issue5789@psf.upfronthosting.co.za> Message-ID: <1240109589.15.0.0305049263162.issue5789@psf.upfronthosting.co.za> New submission from Steven D'Aprano : In the itertools recipes section of the docs, powerset() is listed twice. http://docs.python.org/library/itertools.html#recipes ---------- assignee: georg.brandl components: Documentation messages: 86155 nosy: georg.brandl, stevenjd severity: normal status: open title: powerset recipe listed twice in itertools docs versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 04:56:44 2009 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 19 Apr 2009 02:56:44 +0000 Subject: [issue5790] itertools.izip python code has a typo In-Reply-To: <1240109804.52.0.172902644967.issue5790@psf.upfronthosting.co.za> Message-ID: <1240109804.52.0.172902644967.issue5790@psf.upfronthosting.co.za> New submission from Steven D'Aprano : In the documentation for itertools, the Python equivalent to izip has a typo: yield yield tuple(map(next, iterables)) Obviously should only have a single yield. http://docs.python.org/library/itertools.html#itertools.izip ---------- assignee: georg.brandl components: Documentation messages: 86156 nosy: georg.brandl, stevenjd severity: normal status: open title: itertools.izip python code has a typo versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 05:01:48 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 19 Apr 2009 03:01:48 +0000 Subject: [issue5790] itertools.izip python code has a typo In-Reply-To: <1240109804.52.0.172902644967.issue5790@psf.upfronthosting.co.za> Message-ID: <1240110108.52.0.639036012868.issue5790@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: georg.brandl -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 06:10:28 2009 From: report at bugs.python.org (Matthew Iversen) Date: Sun, 19 Apr 2009 04:10:28 +0000 Subject: [issue1537721] csv module: add header row to DictWriter Message-ID: <1240114228.01.0.347680677608.issue1537721@psf.upfronthosting.co.za> Matthew Iversen added the comment: Skip, you were arguing in another csv issue on a NamedTupleReader that the Reader and Writer should work in concert together. Certainly, making this default functionality for DictWriter would definitely make it work more in concert with DictReader. A sample process of reading and writing might be: 1. DictReader reads in header names, reads in data 2. Pass in header names to DictWriter on init 3. DictWriter writes out modified data back to csv file (headers get written automatically or with a method call) 4. DictReader can now reader in the csv file automatically again with header names My feeling is, if DictReader can read in head names, why can't DictWriter write them back out again? Shouldn't there be a good amount of symmatry to their function/abilities? My feeling of how to implement this functionality would be to include a new init argument, say 'writeheader'. It's default would be True if you wanted to implement this new feature by default, or False if you wanted to keep it an option so that older scripts relying on the old functionality won't break immmediately. DictWriter would then write the header on the first call to writerow(s), or perhaps also with an explicit call to writeheader() say. I certainly am miffed by the fact that DictWriter cannot produce (normally) a csv file that DictReader can read in automatically. ---------- nosy: +ivo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 10:44:25 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 19 Apr 2009 08:44:25 +0000 Subject: [issue1580] Use shorter float repr when possible In-Reply-To: <1197314007.06.0.227642647262.issue1580@psf.upfronthosting.co.za> Message-ID: <1240130665.83.0.328550745196.issue1580@psf.upfronthosting.co.za> Mark Dickinson added the comment: [Raymond] > Is there a way to use SSE when available and x86 when it's not. I guess it's possible in theory, but I don't know of any way to do this in practice. I suppose one could trap the SIGILL generated by the attempted use of an SSE2 instruction on a non-supported platform---is this how things used to work for 386s without the 387? That would make a sequence of floating-point instructions on non-SSE2 x86 horribly slow, though. Antoine: as Raymond said, the advantage of SSE2 for numeric work is accuracy, predictability, and consistency across platforms. The SSE2 instructions finally put an end to all the problems arising from the mismatch between the precision of the x87 floating-point registers (64- bits) and the precision of a C double (53-bits). Those difficulties include (1) unpredictable rounding of intermediate values from 64-bit precision to 53-bit precision, due to spilling of temporaries from FPU registers to memory, and (2) double-rounding. The arithmetic of Python itself is largely immune to the former, but not the latter. (And of course the register spilling still causes headaches for various bits of CPython). Those difficulties can be *mostly* dealt with by setting the x87 rounding precision to double (instead of extended), though this doesn't fix the exponent range, so one still ends up with double-rounding on underflow. The catch is that one can't mess with the x87 state globally, as various library functions (especially libm functions) might depend on it being in whatever the OS considers to be the default state. There's a very nice paper by David Monniaux that covers all this: definitely recommended reading after you've finished Goldberg's "What Every Computer Scientist...". It can currently be found at: http://hal.archives-ouvertes.fr/hal-00128124/en/ An example: in Python (any version), try this: >>> 1e16 + 2.9999 10000000000000002.0 On OS X, Windows and FreeBSD you'll get the answer above. (OS X gcc uses SSE2 by default; Windows and FreeBSD both make the default x87 rounding-precision 53 bits). On 32-bit Linux/x86 or Solaris/x86 you'll likely get the answer 10000000000000004.0 instead, because Linux doesn't (usually?) change the Intel default rounding precision of 64-bits. Using SSE2 instead of the x87 would have fixed this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 11:37:17 2009 From: report at bugs.python.org (Christof) Date: Sun, 19 Apr 2009 09:37:17 +0000 Subject: [issue5786] len(reversed([1,2,3])) does not work anymore in 2.6.2 In-Reply-To: <1240070428.04.0.628652917462.issue5786@psf.upfronthosting.co.za> Message-ID: <1240133837.41.0.685851507313.issue5786@psf.upfronthosting.co.za> Christof added the comment: A compatibility break in a minor bugfix version is never a good idea I guess. I understand the reasoning but this change may break quite a few packages (at least it broke mine). A workaround in programs is easy but for already released and deployed versions simply not possible. A change for Python 2.7 would be at least annoying too but I guess could be justified. Just my thoughts... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 12:25:59 2009 From: report at bugs.python.org (Senthil) Date: Sun, 19 Apr 2009 10:25:59 +0000 Subject: [issue918368] urllib doesn't correct server returned urls Message-ID: <1240136759.92.0.483747241972.issue918368@psf.upfronthosting.co.za> Senthil added the comment: The attached patch fixes this issue and adds the test too. Followed John J Lee's suggestion for the patch.Can someone review this? For the other referenced issue1153027, bug is not reproducible in the trunk and I see that fix has been made in revision 43132. It follows the approach of percent encoding space at redirect_request. I shall verify if we need to change that to a different fix or present one would be sufficient. ---------- assignee: -> orsenthil keywords: +patch Added file: http://bugs.python.org/file13720/issue918368-py27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 12:42:02 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 19 Apr 2009 10:42:02 +0000 Subject: [issue5657] bad repr of itertools.count object with negative value on OS X 10.4 with 10.5 build In-Reply-To: <1238614228.92.0.740866649828.issue5657@psf.upfronthosting.co.za> Message-ID: <1240137722.68.0.730646043614.issue5657@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Fixed in r71743 (trunk), r71744 (2.6), r71746 (3.0), r71745 (3.1) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 12:45:23 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 19 Apr 2009 10:45:23 +0000 Subject: [issue1602133] non-framework built python fails to define environ properly Message-ID: <1240137923.99.0.0272900440112.issue1602133@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I can reproduce this with a unix build of python2.5: * Install a unix build of python 2.5 (--with-pydebug) as /opt/python2.5-dbg * Install pyobjc 2.2-dev (from PyObjC's subversion repository) * Build the addressbook plugin example in pyobjc-framework-AddressBook * Install said plugin and open the AddressBook application * The plugin won't load, and the console will mention that _environ cannot be found. I haven't tested this with python 2.6 or later yet, 2.5 happens to be the version of Python I test PyObjC with. ---------- resolution: works for me -> accepted status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 12:57:48 2009 From: report at bugs.python.org (Carl Friedrich Bolz) Date: Sun, 19 Apr 2009 10:57:48 +0000 Subject: [issue5791] title information of unicodedata is wrong in some cases In-Reply-To: <1240138668.81.0.556481056778.issue5791@psf.upfronthosting.co.za> Message-ID: <1240138668.81.0.556481056778.issue5791@psf.upfronthosting.co.za> New submission from Carl Friedrich Bolz : There seems to be a problem with some unicode character's title information: $ python2.6 Python 2.6.2c1 (release26-maint, Apr 14 2009, 08:02:48) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> unichr(453) u'\u01c5' >>> unichr(453).title() u'\u01c4' But the title should return the same character, according to this: http://www.fileformat.info/info/unicode/char/01c5/index.htm (I also checked the files that unicode.org provides). I tried to follow the problem a bit, it seems to come from _PyUnicode_ToTitlecase in unicodetype.c. The unicode record contains the offset of the character to its titled version. If the character is its own titled version, then the offset is zero. But zero is also used for when there is no information available, so the offset to the upper-case version of the character is used. If this is a different character (as for the example above), the result of .title() is wrong. ---------- components: Interpreter Core messages: 86163 nosy: cfbolz severity: normal status: open title: title information of unicodedata is wrong in some cases type: behavior versions: Python 2.4, Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Sun Apr 19 13:05:09 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Sun, 19 Apr 2009 11:05:09 +0000 Subject: [issue5791] title information of unicodedata is wrong in some cases In-Reply-To: <1240138668.81.0.556481056778.issue5791@psf.upfronthosting.co.za> Message-ID: <1240139109.5.0.414603667843.issue5791@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is a duplicate of issue4971 ---------- nosy: +loewis resolution: -> duplicate status: open -> closed superseder: -> Incorrect title case _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 13:05:36 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 19 Apr 2009 11:05:36 +0000 Subject: [issue5413] urllib ctypes error on Mac OS X Server 10.5 In-Reply-To: <1236124544.96.0.577290884621.issue5413@psf.upfronthosting.co.za> Message-ID: <1240139136.46.0.489166819169.issue5413@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The attached patch is not entirely correct, I'm not yet uploading an updated patch because the fix is obvious. I cannot reproduce this with a the 2.6.2 installer (build on PPC) nor with a recent build from subversion (python-trunk, build on X86). My tests were done on a PPC G4 iMac running the following version of OSX: ProductName: Mac OS X ProductVersion: 10.4.11 BuildVersion: 8S165 Xcode is: $ xcodebuild -version Component versions: DevToolsCore-660.0; DevToolsSupport-651.0 I'm currently installing 10.5 server in a VM, and will try to test that as well (using Rosetta). I don't have access to a PPC machine running 10.5 server, the 10.4 system I mention above cannot be easily reinstalled. BTW. I intend to commit the fixed version of my patch regardless of whether this fixes the issue because it is slightly more correct to fetch CoreFoundation symbols directly from the CoreFoundation framework instead of relying on SystemConfiguration's "connection" to that framework. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 13:41:46 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 19 Apr 2009 11:41:46 +0000 Subject: [issue5786] len(reversed([1,2,3])) does not work anymore in 2.6.2 In-Reply-To: <1240070428.04.0.628652917462.issue5786@psf.upfronthosting.co.za> Message-ID: <1240141306.74.0.57930914621.issue5786@psf.upfronthosting.co.za> Mark Dickinson added the comment: Is there a 2.6 release imminent? I thought I saw some discussion of a 2.6.3 release, but I'm not sure what the eventual decision was. If so, perhaps this change could be quickly reverted in the release26-maint branch? ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 14:06:07 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sun, 19 Apr 2009 12:06:07 +0000 Subject: [issue5788] datetime.timedelta is inconvenient to use... In-Reply-To: <1240079860.62.0.329216013715.issue5788@psf.upfronthosting.co.za> Message-ID: <1240142767.29.0.720593729841.issue5788@psf.upfronthosting.co.za> Changes by Brian Quinlan : Added file: http://bugs.python.org/file13721/totalseconds2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 14:07:20 2009 From: report at bugs.python.org (Brian Quinlan) Date: Sun, 19 Apr 2009 12:07:20 +0000 Subject: [issue5788] datetime.timedelta is inconvenient to use... In-Reply-To: <1240079860.62.0.329216013715.issue5788@psf.upfronthosting.co.za> Message-ID: <1240142840.34.0.439263884521.issue5788@psf.upfronthosting.co.za> Brian Quinlan added the comment: Attached is a patch that implements .total_seconds as an instance method ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 14:33:20 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 19 Apr 2009 12:33:20 +0000 Subject: [issue5792] Enable short float repr() on Solaris/x86 In-Reply-To: <1240144400.05.0.462557167881.issue5792@psf.upfronthosting.co.za> Message-ID: <1240144400.05.0.462557167881.issue5792@psf.upfronthosting.co.za> New submission from Mark Dickinson : The short float repr() that's in 3.1 (probably) doesn't work on Solaris/x86 when using Sun's compiler to build. It would be nice to fix this. It probably works on Solaris/x86/gcc, though confirmation of that would be appreciated. Marking as easy, because this should be an easy task for someone who has access to the appropriate setup. I can probably do all the autoconf/define stuff required, but I need help from someone who has access to Solaris/x86 and who can be available to do testing. ---------- components: Interpreter Core keywords: easy messages: 86168 nosy: marketdickinson priority: normal severity: normal stage: needs patch status: open title: Enable short float repr() on Solaris/x86 type: feature request versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 14:40:25 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 19 Apr 2009 12:40:25 +0000 Subject: [issue5792] Enable short float repr() on Solaris/x86 In-Reply-To: <1240144400.05.0.462557167881.issue5792@psf.upfronthosting.co.za> Message-ID: <1240144825.87.0.398361645647.issue5792@psf.upfronthosting.co.za> Mark Dickinson added the comment: See the comments in the Include/pyport.h file for an explanation of what's required. (Search for HAVE_PY_SET_53BIT_PRECISION.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 14:57:47 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 19 Apr 2009 12:57:47 +0000 Subject: [issue5793] Rationalize isdigit / isalpha / tolower / ... uses throughout Python source In-Reply-To: <1240145867.12.0.0306505871305.issue5793@psf.upfronthosting.co.za> Message-ID: <1240145867.12.0.0306505871305.issue5793@psf.upfronthosting.co.za> New submission from Mark Dickinson : Problem: the standard C character handling functions from ctype.h (isalpha, isdigit, isxdigit, isspace, toupper, tolower, etc.) are locale aware, but for almost all uses CPython needs locale-unaware versions of these. There are various solutions in the current source: - there's a file Include/bytes_methods.h which provides suitable ISDIGIT/ISALPHA/... macros, but also undefines the standard functions. As it is, it can't be included in Python.h since that would break 3rd party code that includes Python.h and also uses isdigit. - some files have their own solution: Python/pystrtod.c defines its own (probably inefficient) ISDIGIT and ISSPACE macros. - in some places the standard C functions are just used directly (and possibly incorrectly). A gotcha here is that one has to remember to use Py_CHARMASK to avoid errors on some platforms. (See issue 3633 for an example.) It would be nice to clean all this up, and have one central, efficient, easy-to-use set of Py_ISDIGIT/Py_ISALPHA ... locale-independent macros (or functions) that could be used safely throughout the Python source. ---------- components: Interpreter Core keywords: easy messages: 86170 nosy: eric.smith, marketdickinson priority: normal severity: normal stage: needs patch status: open title: Rationalize isdigit / isalpha / tolower / ... uses throughout Python source type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From =?utf-8?q?St=C3=A9phane_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Sun Apr 19 16:22:05 2009 From: =?utf-8?q?St=C3=A9phane_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?St=C3=A9phane_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Sun, 19 Apr 2009 14:22:05 +0000 Subject: [issue5785] Condition.wait() does not respect its timeout In-Reply-To: <1240062828.56.0.381280263985.issue5785@psf.upfronthosting.co.za> Message-ID: <1240150925.62.0.998589986302.issue5785@psf.upfronthosting.co.za> St?phane added the comment: Ok I fixed the issue thanks to the help from Piet van Oostrum: I didn't call gobject.threads_init(), so that gave the unexpected behaviour. It is certainly bad documentation on the gobject side, but you may consider adding some kind of warning on the threading documentation page, since I guess gobject is quite commonly used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 17:16:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sun, 19 Apr 2009 15:16:26 +0000 Subject: [issue5786] len(reversed([1,2,3])) does not work anymore in 2.6.2 In-Reply-To: <1240070428.04.0.628652917462.issue5786@psf.upfronthosting.co.za> Message-ID: <1240154186.51.0.455094103936.issue5786@psf.upfronthosting.co.za> Daniel Diniz added the comment: Setting as a release blocker so Barry can consider this for 2.6.3 (-committers seems to suggest that it'll be released soon). ---------- nosy: +ajaksu2 priority: -> release blocker stage: -> commit review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 17:26:39 2009 From: report at bugs.python.org (Eric Smith) Date: Sun, 19 Apr 2009 15:26:39 +0000 Subject: [issue5793] Rationalize isdigit / isalpha / tolower / ... uses throughout Python source In-Reply-To: <1240145867.12.0.0306505871305.issue5793@psf.upfronthosting.co.za> Message-ID: <1240154799.14.0.997674478084.issue5793@psf.upfronthosting.co.za> Eric Smith added the comment: I concur. I've also been bitten by forgetting Py_CHARMASK, so a single version that took this into account (and was locale-unaware) would be welcome. In private mail I'd mentioned that if these are functions, they should take int. But I now think that's incorrect, and they should take char or unsigned char. I think the standard C functions take int because they also allow EOF. I think the Py_ versions should allow only characters and not allow EOF. Py_CHARMASK already enforces this, anyway, with likely undefined results. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 17:30:20 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 19 Apr 2009 15:30:20 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1240155020.03.0.0749253776605.issue5463@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hmm. In 3.0 and 2.7, I get: >>> from struct import pack >>> pack('L', 123.0) sys:1: DeprecationWarning: integer argument expected, got float b'{\x00\x00\x00' So it looks like we already changed py3k to get rid of the DeprecationWarning. I think the idea was that eventually *only* integers would be accepted for the integer format codes. So pack('L', 123.0) should ideally raise TypeError. If we're not going to do that, we should at least put the DeprecationWarning back in, but it seems better to actually go ahead with the deprecation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 18:17:03 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 19 Apr 2009 16:17:03 +0000 Subject: [issue1530559] struct.pack raises TypeError where it used to convert Message-ID: <1240157823.45.0.252841003497.issue1530559@psf.upfronthosting.co.za> Mark Dickinson added the comment: Stealing this from Bob. Bob, please steal it back it you want it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 18:17:11 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 19 Apr 2009 16:17:11 +0000 Subject: [issue1530559] struct.pack raises TypeError where it used to convert Message-ID: <1240157831.35.0.274870040966.issue1530559@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: bob.ippolito -> marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 18:25:35 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 19 Apr 2009 16:25:35 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1240158335.35.0.390543017394.issue5463@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's an updated version of your patch: all I've done is fix up get_(u)long, get_(u)longlong and get_pylong so that they only accept integers. ---------- Added file: http://bugs.python.org/file13722/cleanup_float_coerce_patch_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 21:43:24 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Sun, 19 Apr 2009 19:43:24 +0000 Subject: [issue5756] idle pydoc et al removed from 3.1 without versioned replacements In-Reply-To: <1239740660.49.0.649614984791.issue5756@psf.upfronthosting.co.za> Message-ID: <1240170204.12.0.616645927464.issue5756@psf.upfronthosting.co.za> Changes by Kurt B. Kaiser : ---------- nosy: +kbk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 21:53:00 2009 From: report at bugs.python.org (Carl Witty) Date: Sun, 19 Apr 2009 19:53:00 +0000 Subject: [issue5794] pickle/cPickle of recursive tuples create pickles that cPickle can't load In-Reply-To: <1240170780.68.0.204813353535.issue5794@psf.upfronthosting.co.za> Message-ID: <1240170780.68.0.204813353535.issue5794@psf.upfronthosting.co.za> New submission from Carl Witty : When I try to pickle a recursive tuple (that recurses through a list), pickle can load the result but cPickle fails with "unpickling stack overflow". (I just downloaded and built Python 2.6.2 on 64-bit x86 Debian testing to verify this bug; it also fails on Python 2.5.2 on 32-bit x86 Debian testing. I think that probably it doesn't depend on the architecture or operating system at all.) Here is the test case. At the end, cPickle.loads raises an exception; instead, it should produce an object equivalent to v, like pickle.loads does. (I didn't show it in the test case, but pickles produced by pickle.dumps have the same behavior -- they work with pickle.loads but not cPickle.loads.) >>> v = ([],) >>> v[0].append(v) >>> import pickle >>> import cPickle >>> v ([([...],)],) >>> vp = cPickle.dumps(v) >>> pickle.loads(vp) ([([...],)],) >>> cPickle.loads(vp) Traceback (most recent call last): File "", line 1, in cPickle.UnpicklingError: unpickling stack underflow ---------- components: Library (Lib) messages: 86177 nosy: cwitty severity: normal status: open title: pickle/cPickle of recursive tuples create pickles that cPickle can't load type: behavior versions: Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 22:42:45 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 19 Apr 2009 20:42:45 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1240173765.94.0.105418522846.issue5463@psf.upfronthosting.co.za> Mark Dickinson added the comment: Committed part 3 in r71755. Thank you! Is there anything else you think we need to fix up here? ---------- resolution: -> accepted stage: test needed -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 22:43:20 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 19 Apr 2009 20:43:20 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1240173800.64.0.299982228071.issue5463@psf.upfronthosting.co.za> Mark Dickinson added the comment: That should be r71754, of course. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 22:44:33 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 19 Apr 2009 20:44:33 +0000 Subject: [issue5463] Remove deprecated features from struct module In-Reply-To: <1236633440.53.0.769324137007.issue5463@psf.upfronthosting.co.za> Message-ID: <1240173873.94.0.240302976139.issue5463@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 22:50:19 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 19 Apr 2009 20:50:19 +0000 Subject: [issue1530559] struct.pack raises TypeError where it used to convert Message-ID: <1240174219.18.0.437146040533.issue1530559@psf.upfronthosting.co.za> Mark Dickinson added the comment: The deprecated struct features (float coercion, overflow wrapping) have been removed for py3k in r70497, r70688, r71754. I don't plan to backport this to 2.7; I'll just try to fix the behaviour in a minimal way there. One thing that's not clear to me: what's the rationale for raising struct.error everywhere instead of more specific Python errors; e.g., TypeError for struct.pack('L', 'not an integer') and OverflowError for struct.pack('L', 10**100)? Is there a particular use-case for "except struct.error"? ---------- priority: critical -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 19 23:10:47 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 19 Apr 2009 21:10:47 +0000 Subject: [issue1741130] struct.pack("I", "foo"); struct.pack("L", "foo") should fail Message-ID: <1240175447.43.0.871452977964.issue1741130@psf.upfronthosting.co.za> Mark Dickinson added the comment: It looks as though this was sort-of fixed sometime between 2.6.1 and 2.6.2. In 2.6.2, I get the following (and results from trunk and 3.0.1 are similar): Python 2.6.2+ (release26-maint:71755, Apr 19 2009, 22:06:02) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import struct >>> struct.pack('L', 'not an integer') Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for &: 'str' and 'long' That error message suggests that there's something nasty happening somewhere, though. It looks as though we're getting the right type of exception, but for the wrong reasons. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 00:16:07 2009 From: report at bugs.python.org (Bob Ippolito) Date: Sun, 19 Apr 2009 22:16:07 +0000 Subject: [issue1530559] struct.pack raises TypeError where it used to convert Message-ID: <1240179367.98.0.107007788326.issue1530559@psf.upfronthosting.co.za> Bob Ippolito added the comment: I believe that struct.error is just how it worked before 2.5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 00:18:43 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 19 Apr 2009 22:18:43 +0000 Subject: [issue5795] test_distutils failure on the ppc Debian buildbot In-Reply-To: <1240179523.09.0.84546813194.issue5795@psf.upfronthosting.co.za> Message-ID: <1240179523.09.0.84546813194.issue5795@psf.upfronthosting.co.za> New submission from Antoine Pitrou : The following test fails on the ppc Debian buildbot (trunk and py3k): test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase) ... gcc-4.3: x86_64: No such file or directory cc1: error: unrecognized command line option "-arch" ERROR ====================================================================== ERROR: test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/distutils/tests/test_build_ext.py", line 64, in test_build_ext cmd.run() File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/distutils/command/build_ext.py", line 353, in run self.build_extensions() File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/distutils/command/build_ext.py", line 480, in build_extensions self.build_extension(ext) File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/distutils/command/build_ext.py", line 550, in build_extension depends=ext.depends) File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/distutils/ccompiler.py", line 695, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/distutils/unixccompiler.py", line 180, in _compile raise CompileError, msg CompileError: command 'gcc' failed with exit status 1 Here are links to the log files: http://www.python.org/dev/buildbot/trunk.stable/ppc%20Debian%20unstable%20trunk/builds/388/step-test/0 http://www.python.org/dev/buildbot/3.x.stable/ppc%20Debian%20unstable%203.x/builds/654/step-test/0 ---------- assignee: tarek components: Distutils messages: 86183 nosy: pitrou, tarek priority: normal severity: normal status: open title: test_distutils failure on the ppc Debian buildbot type: behavior versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 00:21:58 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 19 Apr 2009 22:21:58 +0000 Subject: [issue5795] test_distutils failure on the ppc Debian buildbot In-Reply-To: <1240179523.09.0.84546813194.issue5795@psf.upfronthosting.co.za> Message-ID: <1240179718.65.0.850043618334.issue5795@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Two strange things: - "-arch" doesn't exist, it should be "-march=" - why is there a reference to x86_64 on a ppc buildbot? ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 00:48:57 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 19 Apr 2009 22:48:57 +0000 Subject: [issue5795] test_distutils failure on the ppc Debian buildbot In-Reply-To: <1240179523.09.0.84546813194.issue5795@psf.upfronthosting.co.za> Message-ID: <1240181337.76.0.595579925681.issue5795@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, I assume "-arch x86_64" is a MacOS X-specific gcc flag. The problem could be with distutils.tests.test_util:test_get_platform which borks the environment variable CFLAGS by adding this flag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 01:08:38 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 19 Apr 2009 23:08:38 +0000 Subject: [issue5796] test_posix, test_pty crash under Windows In-Reply-To: <1240182518.87.0.621846990716.issue5796@psf.upfronthosting.co.za> Message-ID: <1240182518.87.0.621846990716.issue5796@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This seems related to the import behaviour changes in regrtest. Re-running test 'test_posix' in verbose mode test test_posix crashed -- : No module named pwd Traceback (most recent call last): File "../lib/test/regrtest.py", line 569, in runtest_inner the_package = __import__(abstest, globals(), locals(), []) File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\test\test_posix.py", line 8, in import pwd ImportError: No module named pwd Re-running test 'test_pty' in verbose mode test test_pty crashed -- : No module named fcntl Traceback (most recent call last): File "../lib/test/regrtest.py", line 569, in runtest_inner the_package = __import__(abstest, globals(), locals(), []) File "E:\cygwin\home\db3l\buildarea\trunk.bolen-windows\build\lib\test\test_pty.py", line 2, in import fcntl ImportError: No module named fcntl http://www.python.org/dev/buildbot/trunk.stable/x86%20XP-4%20trunk/builds/2056/step-test/0 ---------- assignee: r.david.murray components: Tests, Windows messages: 86186 nosy: pitrou, r.david.murray priority: high severity: normal stage: needs patch status: open title: test_posix, test_pty crash under Windows type: crash versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 03:49:21 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 20 Apr 2009 01:49:21 +0000 Subject: [issue5785] Condition.wait() does not respect its timeout In-Reply-To: <1240062828.56.0.381280263985.issue5785@psf.upfronthosting.co.za> Message-ID: <1240192161.5.0.809533184005.issue5785@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I don't think we need warnings about third party libraries in our docs. ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 05:45:07 2009 From: report at bugs.python.org (Kelvin Liang) Date: Mon, 20 Apr 2009 03:45:07 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1240199107.89.0.863883053118.issue5670@psf.upfronthosting.co.za> Kelvin Liang added the comment: Can this patch be used or ported to 2.5.x? ---------- nosy: +feisan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 06:01:24 2009 From: report at bugs.python.org (nabeel) Date: Mon, 20 Apr 2009 04:01:24 +0000 Subject: [issue5797] there is en exception om Create User page In-Reply-To: <1240200084.56.0.449706089015.issue5797@psf.upfronthosting.co.za> Message-ID: <1240200084.56.0.449706089015.issue5797@psf.upfronthosting.co.za> New submission from nabeel : there is en exception om Create User page ---------- messages: 86189 nosy: nabeel severity: normal status: open title: there is en exception om Create User page type: crash versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Dennis_Lichtenth=C3=A4ler_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 20 09:52:55 2009 From: =?utf-8?q?Dennis_Lichtenth=C3=A4ler_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Dennis_Lichtenth=C3=A4ler_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 20 Apr 2009 07:52:55 +0000 Subject: [issue3584] Exception for test_urllib2_localnet In-Reply-To: <1219016069.28.0.247374147192.issue3584@psf.upfronthosting.co.za> Message-ID: <1240213975.22.0.370118303265.issue3584@psf.upfronthosting.co.za> Dennis Lichtenth?ler added the comment: I get the same behavior on an up-to-date Gentoo machine with Python 2.5.4. It seems, test_urllib2_localnet tries to bind to port 8080. If something else is listening there, I get this error. I changed the test to point to a different port and things seem to work. Perhaps the test should check whether the port is available before binding to it or even use a random port... 8080 is all too common! ---------- nosy: +episodeiv _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 20 09:57:41 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 20 Apr 2009 07:57:41 +0000 Subject: [issue5795] test_distutils failure on the ppc Debian buildbot In-Reply-To: <1240179523.09.0.84546813194.issue5795@psf.upfronthosting.co.za> Message-ID: <1240214261.22.0.448042478376.issue5795@psf.upfronthosting.co.za> Tarek Ziad? added the comment: r71758 fixes it, but I'd like to run the buildbot on the debian ppc slave before I update Misc/NEWS and merge in py3K. I tried to force a build here, but it failed http://www.python.org/dev/buildbot/trunk.stable/ppc%20Debian%20unstable%20trunk I'll ask Matthias about that. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Ga=C3=ABtan_de_Menten_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 20 11:13:48 2009 From: =?utf-8?q?Ga=C3=ABtan_de_Menten_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Ga=C3=ABtan_de_Menten_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 20 Apr 2009 09:13:48 +0000 Subject: [issue1202] zlib.crc32() and adler32() return value In-Reply-To: <1190719871.47.0.233788425538.issue1202@psf.upfronthosting.co.za> Message-ID: <1240218828.47.0.207799719104.issue1202@psf.upfronthosting.co.za> Ga?tan de Menten added the comment: Regarding the issue J. David Ib??ez has, I have a few comments to add: - It's also present on 32bit. - AFAICT: * it's present in both 2.6 branch & trunk (as of 68886), * it's a problem with line 1110 (in 2.6 branch), or line 1122 in trunk, which should read " _______________________________________ From =?utf-8?q?Kirit_S=C3=A6lensminde_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 20 12:35:10 2009 From: =?utf-8?q?Kirit_S=C3=A6lensminde_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Kirit_S=C3=A6lensminde_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 20 Apr 2009 10:35:10 +0000 Subject: [issue1683368] object.__init__ shouldn't allow args/kwds Message-ID: <1240223710.07.0.555095650674.issue1683368@psf.upfronthosting.co.za> Changes by Kirit S?lensminde : ---------- nosy: +KayEss _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 13:02:12 2009 From: report at bugs.python.org (Ismail Donmez) Date: Mon, 20 Apr 2009 11:02:12 +0000 Subject: [issue5798] test_asynchat fails on Mac OSX In-Reply-To: <1240225332.5.0.570636191093.issue5798@psf.upfronthosting.co.za> Message-ID: <1240225332.5.0.570636191093.issue5798@psf.upfronthosting.co.za> New submission from Ismail Donmez : Using latest python 2.6 branch; test_asynchat fails with the following error: error: uncaptured python exception, closing channel (:[Errno 9] Bad file descriptor [/Users/cartman/Sources/python-2.6/Lib/asyncore.py|readwrite|107] [/Users/cartman/Sources/python-2.6/Lib/asyncore.py|handle_expt_event|441] [|getsockopt|1] [/Users/cartman/Sources/python-2.6/Lib/socket.py|_dummy|165]) Using Mac OSX 10.5.6. ---------- components: Tests messages: 86193 nosy: cartman severity: normal status: open title: test_asynchat fails on Mac OSX versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 13:03:50 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 20 Apr 2009 11:03:50 +0000 Subject: [issue5670] Speed up pickling of dicts in cPickle In-Reply-To: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za> Message-ID: <1240225430.88.0.120643463174.issue5670@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sorry, it won't even be integrated in 2.6 actually. It's a new feature, not a bug fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 13:05:39 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 20 Apr 2009 11:05:39 +0000 Subject: [issue1944] Documentation for PyUnicode_AsString (et al.) missing. In-Reply-To: <1201415203.65.0.272410099804.issue1944@psf.upfronthosting.co.za> Message-ID: <1240225539.42.0.0741186648279.issue1944@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +georg.brandl, lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 13:07:14 2009 From: report at bugs.python.org (Larry Hastings) Date: Mon, 20 Apr 2009 11:07:14 +0000 Subject: [issue5799] Change ntpath functions to implicitly support UNC paths In-Reply-To: <1240225634.02.0.80774698084.issue5799@psf.upfronthosting.co.za> Message-ID: <1240225634.02.0.80774698084.issue5799@psf.upfronthosting.co.za> New submission from Larry Hastings : This patch changes "ntpath" so all functions handle UNC paths. In a Windows path string, a UNC path functions *exactly* like a drive letter. This patch means that the Python path split/join functions treats them as if they were. For instance: >>> splitdrive("A:\\FOO\\BAR.TXT") ("A:", "\\FOO\\BAR.TXT") With this patch applied: >>> splitdrive("\\\\HOSTNAME\\SHARE\\FOO\\BAR.TXT") ("\\\\HOSTNAME\\SHARE", "\\FOO\\BAR.TXT") This methodology only breaks down in one place: there is no "default directory" for a UNC share point. E.g. you can say >>> os.chdir("c:") or >>> os.chdir("c:foo\\bar") but you can't say >>> os.chdir("\\\\hostname\\share") The attached patch changes: * Modify join, split, splitdrive, and ismount to add explicit support for UNC paths. (The other functions pick up support from these four.) * Simplify isabs and normpath, now that they don't need to be delicate about UNC paths. * Modify existing unit tests and add new ones. * Document the changes to the API. * Deprecate splitunc, with a warning and a documentation remark. This patch adds one subtle change I hadn't expected. If you call split() with a drive letter followed by a trailing slash, it returns the trailing slash as part of the "head" returned. E.g. >>> os.path.split("\\") ("\\", "") >>> os.path.split("A:\\") ("A:\\", "") This is mentioned in the documentation, as follows: Trailing slashes are stripped from head unless it is the root (one or more slashes only). For some reason, when os.path.split was called with a UNC path with only a trailing slash, it stripped the trailing slash: >>> os.path.split("\\\\hostname\\share\\") ("\\\\hostname\\share", "") My patch changes this behavior; you would now see: >>> os.path.split("\\\\hostname\\share\\") ("\\\\hostname\\share\\", "") I think it's an improvement--this is more consistent. Note that this does *not* break the documented requirement that os.path.join(os.path.split(path)) == path; that continues to work fine. In the interests of full disclosure: I submitted a patch providing this exact behavior just over ten years ago. GvR accepted it into Python 1.5.2b2 (marked "*EXPERIMENTAL*") and removed it from 1.5.2c1. You can read GvR's commentary upon removing it; see comments in Misc/HISTORY dated "Tue Apr 6 19:38:18 1999". If memory serves correctly, the "problems" cited were only on Cygwin. At the time Cygwin used "ntpath", and it supported "//a/foo" as an alias for "A:\\FOO". You can see how this would cause Cygwin problems. In the intervening decade, two highly relevant things have happened: * Python no longer uses ntpath for os.path on Cygwin. It instead uses posixpath. * Cygwin removed the "//a/foo" drive letter hack. In fact, I believe it now support UNC paths. Therefore this patch will have no effect on Cygwin users. p.s. I discussed this patch with Mark Hammond at the CPython sprint at PyCon 2008. I therefore added him to the nosy list. I have no idea if this is proper etiquette; I apologize in advance if it is not. ---------- components: Windows files: lch.ntpath.r71757.diff keywords: patch messages: 86195 nosy: lhastings, mhammond severity: normal status: open title: Change ntpath functions to implicitly support UNC paths type: feature request versions: Python 3.1 Added file: http://bugs.python.org/file13723/lch.ntpath.r71757.diff _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 20 16:28:54 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 20 Apr 2009 14:28:54 +0000 Subject: [issue5795] test_distutils failure on the ppc Debian buildbot In-Reply-To: <1240179523.09.0.84546813194.issue5795@psf.upfronthosting.co.za> Message-ID: <1240237734.5.0.127037812476.issue5795@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Fixed in r71758, all green under ppc. I am updating the News file now thanks! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 16:42:39 2009 From: report at bugs.python.org (Koen van de Sande) Date: Mon, 20 Apr 2009 14:42:39 +0000 Subject: [issue5689] please support lzma compression as an extension and in the tarfile module In-Reply-To: <1238861315.81.0.348941469726.issue5689@psf.upfronthosting.co.za> Message-ID: <1240238559.01.0.172194012311.issue5689@psf.upfronthosting.co.za> Koen van de Sande added the comment: The LZMA implementation from 7-zip has been released as public domain (since version 4.62 / Nov 2008) in the LZMA SDK: http://www.7-zip.org/ sdk.html So, there shouldn't be a license issue for Windows. I am not sure if there are already system-provided LZMA libraries on Linux at this time. ---------- nosy: +koen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 17:29:30 2009 From: report at bugs.python.org (shamilbi) Date: Mon, 20 Apr 2009 15:29:30 +0000 Subject: [issue5170] logging to file + encoding In-Reply-To: <1233936467.22.0.152712476213.issue5170@psf.upfronthosting.co.za> Message-ID: <1240241370.22.0.444370587567.issue5170@psf.upfronthosting.co.za> shamilbi added the comment: (python 2.6.2, WinXP) logging to console stopped working. Here is a workaround: logging/__init__.py: class StreamHandler(Handler): ... def emit(self, record): ... if (isinstance(msg, unicode) or getattr(stream, 'encoding', None) is None): - stream.write(fs % msg) + if stream == sys.stdout: + print(msg) + else: + stream.write(fs % msg) ---------- status: closed -> open type: crash -> behavior _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 20 18:01:05 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 20 Apr 2009 16:01:05 +0000 Subject: [issue5800] make wsgiref.headers.Headers accept empty constructor In-Reply-To: <1240243265.38.0.0946630520568.issue5800@psf.upfronthosting.co.za> Message-ID: <1240243265.38.0.0946630520568.issue5800@psf.upfronthosting.co.za> New submission from Tarek Ziad? : wsgiref.headers.Headers will let you manage a collection of HTTP response headers, but the constructor forces you to provide a list: >>> from wsgiref.headers import Headers >>> headers = Headers([]) >>> headers.add_header('Content-Type', 'text/plain') A logical change would be to allowed creating an empty Headers instance: >>> from wsgiref.headers import Headers >>> headers = Headers() >>> headers.add_header('Content-Type', 'text/plain') ---------- components: Library (Lib) messages: 86199 nosy: pje, tarek severity: normal status: open title: make wsgiref.headers.Headers accept empty constructor type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Mon Apr 20 18:03:58 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Mon, 20 Apr 2009 16:03:58 +0000 Subject: [issue5801] spurious empty lines in wsgiref code In-Reply-To: <1240243437.89.0.00300959182441.issue5801@psf.upfronthosting.co.za> Message-ID: <1240243437.89.0.00300959182441.issue5801@psf.upfronthosting.co.za> New submission from Tarek Ziad? : the wsgiref package is hard to read, there are blocs of empty lines. Can I pep8-fy it ? ---------- components: Library (Lib) messages: 86200 nosy: pje, tarek severity: normal status: open title: spurious empty lines in wsgiref code versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 18:42:31 2009 From: report at bugs.python.org (Hong Chen) Date: Mon, 20 Apr 2009 16:42:31 +0000 Subject: [issue5802] The security descriptors of python binaries in Windows are not strict enough In-Reply-To: <1240245750.84.0.391245943129.issue5802@psf.upfronthosting.co.za> Message-ID: <1240245750.84.0.391245943129.issue5802@psf.upfronthosting.co.za> New submission from Hong Chen : The security descriptors of python binaries (like python.exe, pythonw.exe, etc) allow any Authenticated Users to modify these binaries. This may cause a privilege-escalation problem since administrators may use python binaries when performing administrative tasks. A normal unprivileged user may turn a python binary into a trojan and acquire administrator's sids. Test environment: windows vista, python 2.6 ---------- components: Windows messages: 86201 nosy: kindloaf severity: normal status: open title: The security descriptors of python binaries in Windows are not strict enough type: security versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 20:25:26 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 20 Apr 2009 18:25:26 +0000 Subject: [issue5790] itertools.izip python code has a typo In-Reply-To: <1240109804.52.0.172902644967.issue5790@psf.upfronthosting.co.za> Message-ID: <1240251926.52.0.961727034281.issue5790@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for the report. Fixed in r71770 and r71771. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 21:01:31 2009 From: report at bugs.python.org (Dave Baggett) Date: Mon, 20 Apr 2009 19:01:31 +0000 Subject: [issue5803] email/quoprimime: encode and decode are very slow on large messages In-Reply-To: <1240254091.33.0.632025917195.issue5803@psf.upfronthosting.co.za> Message-ID: <1240254091.33.0.632025917195.issue5803@psf.upfronthosting.co.za> New submission from Dave Baggett : The implementation of encode and decode are slow, and scale nonlinearly in the size of the message to be encoded/decoded. A simple fix is to use an array.array('c') and append to it, rather than using string concatenation. This change makes the code more than an order of magnitude faster. ---------- components: Library (Lib) messages: 86203 nosy: dmbaggett severity: normal status: open title: email/quoprimime: encode and decode are very slow on large messages versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 21:01:43 2009 From: report at bugs.python.org (Dave Baggett) Date: Mon, 20 Apr 2009 19:01:43 +0000 Subject: [issue5803] email/quoprimime: encode and decode are very slow on large messages In-Reply-To: <1240254091.33.0.632025917195.issue5803@psf.upfronthosting.co.za> Message-ID: <1240254103.7.0.0519238924266.issue5803@psf.upfronthosting.co.za> Changes by Dave Baggett : ---------- type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 21:51:13 2009 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 20 Apr 2009 19:51:13 +0000 Subject: [issue3720] segfault in for loop with evil iterator In-Reply-To: <1219983572.61.0.35264499467.issue3720@psf.upfronthosting.co.za> Message-ID: <1240257073.2.0.364935191407.issue3720@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'm okay with that hack for 2.6 and 2.5. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Mon Apr 20 21:51:51 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Mon, 20 Apr 2009 19:51:51 +0000 Subject: [issue5689] please support lzma compression as an extension and in the tarfile module In-Reply-To: <1240238559.01.0.172194012311.issue5689@psf.upfronthosting.co.za> Message-ID: <49ECD254.7020003@v.loewis.de> Martin v. L?wis added the comment: > The LZMA implementation from 7-zip has been released as public domain > (since version 4.62 / Nov 2008) in the LZMA SDK: http://www.7-zip.org/ > sdk.html That's good news. Now, if somebody could contribute a Python wrapper for these... > So, there shouldn't be a license issue for Windows. I am not sure if > there are already system-provided LZMA libraries on Linux at this time. There are. The Linux version apparently originates from the same sources, so they might be API compatible. However, I wouldn't mind if we extracted the entire lzma library from 7zip, and put it into the source distribution. ---------- title: please support lzma compression as an extension and in the tarfile module -> please support lzma compression as an extension and in the tarfile module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 23:50:44 2009 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 20 Apr 2009 21:50:44 +0000 Subject: [issue3166] Make conversions from long to float correctly rounded. In-Reply-To: <1214082720.03.0.30402071522.issue3166@psf.upfronthosting.co.za> Message-ID: <1240264244.86.0.0739497012294.issue3166@psf.upfronthosting.co.za> Mark Dickinson added the comment: (Slightly updated version of) patch applied in r71772 (trunk), r71773 (py3k). ---------- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 23:52:45 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 20 Apr 2009 21:52:45 +0000 Subject: [issue5783] IDLE cannot find windows chm file In-Reply-To: <1239995515.37.0.798086990952.issue5783@psf.upfronthosting.co.za> Message-ID: <1240264365.95.0.82921589211.issue5783@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think idle should be updated to look for the correct file name. ---------- assignee: benjamin.peterson -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 20 23:59:55 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 20 Apr 2009 21:59:55 +0000 Subject: [issue5692] test_zipfile fails under Windows In-Reply-To: <1238865433.18.0.587625961619.issue5692@psf.upfronthosting.co.za> Message-ID: <1240264795.76.0.0152578890132.issue5692@psf.upfronthosting.co.za> Benjamin Peterson added the comment: You should probably just add a check that the path isn't in the root to that condition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 00:01:44 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 20 Apr 2009 22:01:44 +0000 Subject: [issue5783] IDLE cannot find windows chm file In-Reply-To: <1239995515.37.0.798086990952.issue5783@psf.upfronthosting.co.za> Message-ID: <1240264904.82.0.957925816468.issue5783@psf.upfronthosting.co.za> Guilherme Polo added the comment: Maybe the functions in Doc/tools/sphinxext/patchlevel.py should be moved to somewhere else then ? IDLE could use them. ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Apr 21 00:21:39 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Mon, 20 Apr 2009 22:21:39 +0000 Subject: [issue5783] IDLE cannot find windows chm file In-Reply-To: <1240264904.82.0.957925816468.issue5783@psf.upfronthosting.co.za> Message-ID: <49ECF570.80603@v.loewis.de> Martin v. L?wis added the comment: > Maybe the functions in Doc/tools/sphinxext/patchlevel.py should be moved > to somewhere else then ? IDLE could use them. No. IDLE shouldn't parse the version out of the header file, but instead use sys.version_info to compute the file name, so it's really just get_sys_version_info, and you only need half of its return value. Copying it is fine, IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 00:48:31 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 20 Apr 2009 22:48:31 +0000 Subject: [issue5783] IDLE cannot find windows chm file In-Reply-To: <1239995515.37.0.798086990952.issue5783@psf.upfronthosting.co.za> Message-ID: <1240267711.63.0.685094282326.issue5783@psf.upfronthosting.co.za> Guilherme Polo added the comment: Fine, Martin. Patch attached for idle only. ---------- keywords: +patch Added file: http://bugs.python.org/file13724/issue_5783.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 01:47:00 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 20 Apr 2009 23:47:00 +0000 Subject: [issue5756] idle pydoc et al removed from 3.1 without versioned replacements In-Reply-To: <1239740660.49.0.649614984791.issue5756@psf.upfronthosting.co.za> Message-ID: <1240271220.93.0.798314718874.issue5756@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think the scripts should just get a "3" appended to them in installation. Unless distutils provides an easy way to do this, a patch should probably just rename the scripts before installing them. ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 01:47:30 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 20 Apr 2009 23:47:30 +0000 Subject: [issue5756] idle pydoc et al removed from 3.1 without versioned replacements In-Reply-To: <1239740660.49.0.649614984791.issue5756@psf.upfronthosting.co.za> Message-ID: <1240271250.75.0.294700814156.issue5756@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 01:56:44 2009 From: report at bugs.python.org (Ilya Sandler) Date: Mon, 20 Apr 2009 23:56:44 +0000 Subject: [issue5575] Add env vars for controlling building sqlite, hashlib and ssl In-Reply-To: <1238101680.27.0.350099709898.issue5575@psf.upfronthosting.co.za> Message-ID: <1240271804.65.0.470886948908.issue5575@psf.upfronthosting.co.za> Ilya Sandler added the comment: I think this would be useful for anyone who builds cpython on a non-mainstream platform. I know this would have been useful for me when I tried to build cpython on an older linux distro where libs were installed in a non-std location. ---------- nosy: +isandler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 02:12:00 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 21 Apr 2009 00:12:00 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1240272720.4.0.407695668546.issue5237@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Suggested doc change for LibRef / StringServices / string.... / Format String Syntax 1. In the grammar box, replace the field_name line with " field_name ::= arg_name ("." attribute_name | "[" element_index "]")* arg_name ::= (identifier | integer)? " The current text ambiguously uses "field_name" for both 'field_name' and 'arg_name'. I found explaining the rule for blank arg_names in field_names easier and clearer with two separate unambiguous terms. Note: 'element_index' should be linked to its definition just as, for instance, 'attribute_name' is. Currently it is not. 2. Revise the next two paragraphs as follows (using * to indicate grammar-term italics as in the current text -- except *all* is just for emphasis): " In less formal terms, the replacement field starts with a *field_name* that specifies the object whose value is to be formatted and inserted into the output instead of the replacement field. The *field_name* is optionally followed by a *conversion* field, which is preceded by an exclamation point '!', and a *format_spec*, which is preceded by a colon ':'. These specify a non-default format for the replacement value. The *field_name* itself begins with an *arg_name* that is either a number or a keyword. If it?s a number, it refers to a positional argument of the str.format() method, and if it?s a keyword it refers to a named keyword argument. If the numerical arg_names in a format string are 0, 1, 2, ... in sequence, they can *all* be omitted (not just some) and the numbers 0, 1, 2, ... will be automatically inserted in order. The *arg_name* can be followed by any number of index or attribute expressions. An expression of the form '.name' selects the named attribute using getattr(), while an expression of the form '[index]' does an index lookup using __getitem__(). " Note: getattr and __getitem__ should be left linked as in the current text. 3. In the following examples, add ''' "From {} to {}" # Same as "From {0] to {1}" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 03:07:07 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 21 Apr 2009 01:07:07 +0000 Subject: [issue5796] test_posix, test_pty crash under Windows In-Reply-To: <1240182518.87.0.621846990716.issue5796@psf.upfronthosting.co.za> Message-ID: <1240276027.82.0.984940985929.issue5796@psf.upfronthosting.co.za> R. David Murray added the comment: Patch attached. Can you test this for me or should I apply it and wait to see if the buildbot passes? ---------- keywords: +patch stage: needs patch -> patch review type: crash -> behavior Added file: http://bugs.python.org/file13725/issue5796.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 03:33:01 2009 From: report at bugs.python.org (Kurt B. Kaiser) Date: Tue, 21 Apr 2009 01:33:01 +0000 Subject: [issue5783] IDLE cannot find windows chm file In-Reply-To: <1239995515.37.0.798086990952.issue5783@psf.upfronthosting.co.za> Message-ID: <1240277581.26.0.963306983667.issue5783@psf.upfronthosting.co.za> Changes by Kurt B. Kaiser : ---------- assignee: -> kbk nosy: +kbk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 04:14:20 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 21 Apr 2009 02:14:20 +0000 Subject: [issue3584] Exception for test_urllib2_localnet In-Reply-To: <1219016069.28.0.247374147192.issue3584@psf.upfronthosting.co.za> Message-ID: <1240280060.65.0.947597883839.issue3584@psf.upfronthosting.co.za> R. David Murray added the comment: test_urllib2_localnet works for me if something is running on port 8080 on python 2.6. Since python 2.5 is in security-fix-only mode, this bug report is out of date. ---------- nosy: +r.david.murray priority: -> low resolution: -> out of date stage: -> committed/rejected status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 04:18:32 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 21 Apr 2009 02:18:32 +0000 Subject: [issue5783] IDLE cannot find windows chm file In-Reply-To: <1239995515.37.0.798086990952.issue5783@psf.upfronthosting.co.za> Message-ID: <1240280312.46.0.980295652285.issue5783@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fragile solution, but it works. IMO, it's a better design to just have the file named Python26.chm like it always used to be done. Now, we've duplicated someones arbitrary logic (ignoring sys.version_info.serial and special casing sys.version_info.release_level=="final") but the duplication isn't exact because the original puts dots better the major, minor, and micro versions. This is asking for another bug someday when the logic gets changed in one place but not the other. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 04:46:10 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 21 Apr 2009 02:46:10 +0000 Subject: [issue5796] test_posix, test_pty crash under Windows In-Reply-To: <1240182518.87.0.621846990716.issue5796@psf.upfronthosting.co.za> Message-ID: <1240281970.29.0.240929982401.issue5796@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think you should apply it. You can always change it if it doesn't work. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Apr 21 04:48:14 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Tue, 21 Apr 2009 02:48:14 +0000 Subject: [issue5783] IDLE cannot find windows chm file In-Reply-To: <1240280312.46.0.980295652285.issue5783@psf.upfronthosting.co.za> Message-ID: <49ED33EA.90604@v.loewis.de> Martin v. L?wis added the comment: > Fragile solution, but it works. IMO, it's a better design to just have > the file named Python26.chm like it always used to be done. That was also fragile, as this bug report demonstrates. It broke when sphinx decided to put more version information into the file names. So when the file naming algorithm changes in one place and not the others, it *will* break, no matter what the old algorithm was. The lesson to be learned is that you just should be *very* careful to ever change file names. Applying that lesson to the status quo means that IDLE has to change, not the file name of the CHM file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 05:27:10 2009 From: report at bugs.python.org (Senthil) Date: Tue, 21 Apr 2009 03:27:10 +0000 Subject: [issue918368] urllib doesn't correct server returned urls Message-ID: <1240284430.36.0.877354127771.issue918368@psf.upfronthosting.co.za> Senthil added the comment: Fixed this in the revision 71780 for Python 2.7. ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 07:23:08 2009 From: report at bugs.python.org (Husen daudi) Date: Tue, 21 Apr 2009 05:23:08 +0000 Subject: [issue5762] AttributeError: 'NoneType' object has no attribute 'replace' In-Reply-To: <1239798874.6.0.325655580097.issue5762@psf.upfronthosting.co.za> Message-ID: <1240291388.13.0.259794320471.issue5762@psf.upfronthosting.co.za> Husen daudi added the comment: I have solved this error, My tag has None value for one attribute. But python should check for None value in _write_data function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 08:07:34 2009 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 21 Apr 2009 06:07:34 +0000 Subject: [issue5170] logging to file + encoding In-Reply-To: <1233936467.22.0.152712476213.issue5170@psf.upfronthosting.co.za> Message-ID: <1240294054.15.0.04277158269.issue5170@psf.upfronthosting.co.za> Vinay Sajip added the comment: Can you retry with setting the "encoding" attribute of the file to "cp1251"? That should work and that should be the appropriate method to avoid the problem. test_logging.py in the Python distribution has a test which exercises Unicode functionality using cp1251, does that test work in your environment? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 09:44:33 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 21 Apr 2009 07:44:33 +0000 Subject: [issue5756] idle pydoc et al removed from 3.1 without versioned replacements In-Reply-To: <1239740660.49.0.649614984791.issue5756@psf.upfronthosting.co.za> Message-ID: <1240299873.76.0.00271102360268.issue5756@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Couldn't we just rename them in the repository? IIRC the name with a '3' suffix would be the official name for these tools in Python 3.x, which would make it more natural to change the name in the repository as well. I don't know enough of svnmerge to know if renaming would be a problem for svnmerge. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 10:37:58 2009 From: report at bugs.python.org (shamilbi) Date: Tue, 21 Apr 2009 08:37:58 +0000 Subject: [issue5170] logging to file + encoding In-Reply-To: <1240294054.15.0.04277158269.issue5170@psf.upfronthosting.co.za> Message-ID: shamilbi added the comment: > > Can you retry with setting the "encoding" attribute of the file to > "cp1251"? That should work and that should be the appropriate method to > avoid the problem. > > test_logging.py in the Python distribution has a test which exercises > Unicode functionality using cp1251, does that test work in your > environment? logging to file is OK (since 2.6.2), logging to console __was__ OK (2.6.1), not now (2.6.2) shamil ---------- Added file: http://bugs.python.org/file13726/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
Can you retry with setting the "encoding" attribute of the file to
"cp1251"? That should work and that should be the appropriate method to
avoid the problem.

test_logging.py in the Python distribution has a test which exercises
Unicode functionality using cp1251, does that test work in your environment?
??
logging to file is OK (since 2.6.2), logging to console __was__ OK (2.6.1), not now (2.6.2)

shamil

From report at bugs.python.org Tue Apr 21 11:13:24 2009 From: report at bugs.python.org (Lars) Date: Tue, 21 Apr 2009 09:13:24 +0000 Subject: [issue672115] Assignment to __bases__ of direct object subclasses Message-ID: <1240305204.03.0.59118555223.issue672115@psf.upfronthosting.co.za> Lars added the comment: in my project i need to be able to let the user dynamically make and remove inheritance relationships between classes and in my testing i think i have run into this issue assigning to __bases__. the class object(object): pass trick seems to work, but i can't really oversee the consequenses. I also saw another variation which might be the same issue: A= type("A", (object,), {'one': 1}) B= type("B", (object,), {'two': 2}) C= type("C", (object,), {'three': 3}) A = type("A",(A,B),{}) print dir(A) print A.__bases__ print '-----------------------------------' A.__bases__ = (B,C) print dir(A) print A.__bases__ print '-----------------------------------' no exceptions, but the second dir(A) shows that A has lost its attribute 'one' if the class object(object) trick is not safe, is there a way to get the dynamic inheritance behaviour in another way, e.g. through metaclasses? ---------- nosy: +farcat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 11:25:07 2009 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 21 Apr 2009 09:25:07 +0000 Subject: [issue5170] logging to file + encoding In-Reply-To: <1233936467.22.0.152712476213.issue5170@psf.upfronthosting.co.za> Message-ID: <1240305907.01.0.510148893924.issue5170@psf.upfronthosting.co.za> Vinay Sajip added the comment: Trunk and release26-maint were recently changed (r71657, r71658) to use the following logic, which differs from the code snippet you posted. if (isinstance(msg, unicode) and getattr(stream, 'encoding', None)): stream.write(fs.decode(stream.encoding) % msg) else: stream.write(fs % msg) If the stream is stderr and you are passing a unicode msg, the else branch will not be taken; as long as the stream has an encoding attribute, it should output correctly. The change was made when another, similar issue was posted by another user (issue #5768). Can you confirm what happens with the current code as it is in release26-maint? ???????! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 13:58:05 2009 From: report at bugs.python.org (Eric Smith) Date: Tue, 21 Apr 2009 11:58:05 +0000 Subject: [issue5775] marshal.c needs to be checked for out of memory errors In-Reply-To: <1239919671.05.0.969461869754.issue5775@psf.upfronthosting.co.za> Message-ID: <1240315085.68.0.57130457033.issue5775@psf.upfronthosting.co.za> Eric Smith added the comment: Fixed in r71783. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 15:06:43 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 21 Apr 2009 13:06:43 +0000 Subject: [issue5796] test_posix, test_pty crash under Windows In-Reply-To: <1240182518.87.0.621846990716.issue5796@psf.upfronthosting.co.za> Message-ID: <1240319203.88.0.975899539502.issue5796@psf.upfronthosting.co.za> R. David Murray added the comment: Applied in r71785. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 16:30:40 2009 From: report at bugs.python.org (Vah Rashim) Date: Tue, 21 Apr 2009 14:30:40 +0000 Subject: [issue5805] Distutils (or py2exe) error with DistributionMetaData In-Reply-To: <1240324240.34.0.236937269756.issue5805@psf.upfronthosting.co.za> Message-ID: <1240324240.34.0.236937269756.issue5805@psf.upfronthosting.co.za> New submission from Vah Rashim : I'find issue http://bugs.python.org/issue708320. It's closed, but in python 2.6 this problem are yet exists. I'm fix it, but don't know, is this good solution. quote this my message from above issue without changes^ """ I'm running py2exe on python 2.6 and have this error, too. I'm look through distutils/dist.py and read following: self.metadata = DistributionMetadata() method_basenames = dir(self.metadata) + \ ['fullname', 'contact', 'contact_email'] for basename in method_basenames: method_name = "get_" + basename setattr(self, method_name, getattr(self.metadata, method_name)) I'm printing dir(self.metadata) and get this lines: ['__doc__', '__init__', '__module__', 'author', 'author_email', 'description', 'get_author', 'get_author_email', 'get_co ntact', 'get_contact_email', 'get_description', 'get_fullname', 'get_keywords', 'get_licence', 'get_long_description', ' get_maintainer', 'get_maintainer_email', 'get_name', 'get_platforms', 'get_url', 'get_version', 'keywords', 'licence', ' long_description', 'maintainer', 'maintainer_email', 'name', 'platforms', 'url', 'version', 'write_pkg_info'] code in dist.py trying add all methods from metadata to self, even 'magic' and getters. I think, that's wrong, because no method like get___doc, get_get_contact and other. I'm solve this problem by adding regexp for checking is this method allow for adding to self. this is my (ugly, i think) code: for basename in method_basenames: if re.match(r'(__|get_|write_)\w+', basename) is None: #MY FIXES! method_name = "get_" + basename setattr(self, method_name, getattr(self.metadata, method_name)) With this change, all py2exe works work correctly (and i don't try distutils in other cases). P.S. i don't know, is this python or py2exe problem: maybe py2exe replcae nature python distutils module. """ ---------- assignee: tarek components: Distutils messages: 86230 nosy: tarek, varash severity: normal status: open title: Distutils (or py2exe) error with DistributionMetaData versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 16:41:32 2009 From: report at bugs.python.org (Dave Fliger) Date: Tue, 21 Apr 2009 14:41:32 +0000 Subject: [issue5806] MySQL crash on machine startup.... In-Reply-To: <1240324892.81.0.865146510595.issue5806@psf.upfronthosting.co.za> Message-ID: <1240324892.81.0.865146510595.issue5806@psf.upfronthosting.co.za> New submission from Dave Fliger : I recently (in the last 5 days) downloaded and installed Python 2.6.x. Upon startup of this machine I noticed a Windows warning that "mysqld.exe could not start...". I really didn't pay attention to it until today since I had no plans to use MySQL or any other app that might use it. I also use XAMPP, which does rely on MySQL. This morning when I started XAMPP, the MySQL server crashed on startup of XAMPP. I removed Python by uninstalling it, set XAMPP to start on startup and rebooted. Bingo!!!! No problem. Seems like the install process does not check for other applications using MySQL and appropriates the db for itself. Is this correct? If that is correct, then the install process needs to be altered. Is this an issue? I don't know. You tell me. ---------- components: Installation messages: 86231 nosy: plattecoducks severity: normal status: open title: MySQL crash on machine startup.... type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 17:12:44 2009 From: report at bugs.python.org (Vito De Tullio) Date: Tue, 21 Apr 2009 15:12:44 +0000 Subject: [issue5807] ConfigParser.RawConfigParser it's an "old-style" class In-Reply-To: <1240326763.95.0.709769411309.issue5807@psf.upfronthosting.co.za> Message-ID: <1240326763.95.0.709769411309.issue5807@psf.upfronthosting.co.za> New submission from Vito De Tullio : RawConfigParser does not inherit from object, so using (to make an example) super() it's impossible. Python 2.6 (r26:66714, Feb 3 2009, 20:52:03) [GCC 4.3.2 [gcc-4_3-branch revision 141291]] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from ConfigParser import RawConfigParser >>> class MyConfigParser(RawConfigParser): ... def __init__(self): ... super(MyConfigParser, self).__init__() ... >>> mcp = MyConfigParser() Traceback (most recent call last): File "", line 1, in File "", line 3, in __init__ TypeError: super() argument 1 must be type, not classobj >>> ---------- components: Library (Lib) messages: 86232 nosy: ZeD severity: normal status: open title: ConfigParser.RawConfigParser it's an "old-style" class versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 17:20:29 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 21 Apr 2009 15:20:29 +0000 Subject: [issue5575] Add env vars for controlling building sqlite, hashlib and ssl In-Reply-To: <1238101680.27.0.350099709898.issue5575@psf.upfronthosting.co.za> Message-ID: <1240327229.51.0.175206609074.issue5575@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Are these environment variables Python-specific? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 17:21:07 2009 From: report at bugs.python.org (ayal baron) Date: Tue, 21 Apr 2009 15:21:07 +0000 Subject: [issue1590864] import deadlocks when using PyObjC threads Message-ID: <1240327267.13.0.704950731709.issue1590864@psf.upfronthosting.co.za> ayal baron added the comment: Hi, We have the same problem while running two threads where one is running a subprocess command and the other is importing modules. This will cause a deadlock and this IS a bug!!! This happens quite often on a slow machine (once every 2-3 runs). ---------- nosy: +abaron _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 17:21:32 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 21 Apr 2009 15:21:32 +0000 Subject: [issue5803] email/quoprimime: encode and decode are very slow on large messages In-Reply-To: <1240254091.33.0.632025917195.issue5803@psf.upfronthosting.co.za> Message-ID: <1240327292.51.0.102234304933.issue5803@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Do you have a patch? Also, detailed timing examples are welcome (you can e.g. use the "timeit" module from the command line). ---------- nosy: +pitrou versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 17:21:43 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 21 Apr 2009 15:21:43 +0000 Subject: [issue5803] email/quoprimime: encode and decode are very slow on large messages In-Reply-To: <1240254091.33.0.632025917195.issue5803@psf.upfronthosting.co.za> Message-ID: <1240327303.19.0.924890536217.issue5803@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- priority: -> normal stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 17:23:44 2009 From: report at bugs.python.org (Dave Baggett) Date: Tue, 21 Apr 2009 15:23:44 +0000 Subject: [issue5803] email/quoprimime: encode and decode are very slow on large messages In-Reply-To: <1240254091.33.0.632025917195.issue5803@psf.upfronthosting.co.za> Message-ID: <1240327424.3.0.806024631458.issue5803@psf.upfronthosting.co.za> Dave Baggett added the comment: I can certainly generate a patch for you. What form would you like it in, and against what source tree? Also, do you have a preference between the use of array.array vs. standard arrays? (I don't know whether it's good or bad to depend on "import array" in quoprimime.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 17:23:50 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 21 Apr 2009 15:23:50 +0000 Subject: [issue5761] add file name to py3k IO objects repr() In-Reply-To: <1239792347.2.0.639213233478.issue5761@psf.upfronthosting.co.za> Message-ID: <1240327430.94.0.0275980349129.issue5761@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Benjamin, do you think it can still be added after beta1? (I ask that in case noone does it before) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 17:30:51 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 21 Apr 2009 15:30:51 +0000 Subject: [issue5803] email/quoprimime: encode and decode are very slow on large messages In-Reply-To: <1240254091.33.0.632025917195.issue5803@psf.upfronthosting.co.za> Message-ID: <1240327851.45.0.154085684361.issue5803@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch must be against the SVN trunk, in standard unified diff ("svn diff" does the trick). What do you call standard arrays? Do you mean the builtin list type? Storing one separate character per list element is a poor choice because it will waste a lot of memory. The array.array type is more efficient for this. However, there are two other, more idiomatic ways of doing this: - accumulate the chunks of encoded/decoded data into a list (but not only 1-character strings...) and join() them at the end. - or, use a StringIO object (from the cStringIO module) Bonus points if you time all three possibilities and submit the fastest :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 17:34:47 2009 From: report at bugs.python.org (Dave Baggett) Date: Tue, 21 Apr 2009 15:34:47 +0000 Subject: [issue5803] email/quoprimime: encode and decode are very slow on large messages In-Reply-To: <1240254091.33.0.632025917195.issue5803@psf.upfronthosting.co.za> Message-ID: <1240328087.41.0.302734947173.issue5803@psf.upfronthosting.co.za> Dave Baggett added the comment: Yes, sorry, I meant "built-in list type" not "array". Your point about using lists this way is valid, and is why I used array.array('c'). I will do as you suggest and try all three methods. I did time the array.array approach vs. the one currently in the code and it was about 30 times faster. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 17:43:16 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 21 Apr 2009 15:43:16 +0000 Subject: [issue5804] Add a "tail" argument to zlib.decompress In-Reply-To: <1240307503.01.0.128578916914.issue5804@psf.upfronthosting.co.za> Message-ID: <1240328596.85.0.0809798718739.issue5804@psf.upfronthosting.co.za> Antoine Pitrou added the comment: As usual the patch should come with some unit tests. Also, it seems you don't test the return value of PyString_FromStringAndSize before building your tuple. ---------- nosy: +pitrou priority: -> normal stage: -> patch review versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 17:49:34 2009 From: report at bugs.python.org (Lawrence Allan Jones) Date: Tue, 21 Apr 2009 15:49:34 +0000 Subject: [issue5808] Subprocess.getstatusoutput Fails Executing 'dir' Command on Windows In-Reply-To: <1240328974.09.0.446818382044.issue5808@psf.upfronthosting.co.za> Message-ID: <1240328974.09.0.446818382044.issue5808@psf.upfronthosting.co.za> New submission from Lawrence Allan Jones : When attempting to use the subprocess.getstatusoutput() function on Windows, I noticed an unusual error message: "'{' is not recognized as an internal or external command, operable program or batch file." When the output contained this message, the status was always 256. >From the interactive prompt, I performed the following: Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import subprocess >>> cmdline = 'dir' >>> (status, output) = subprocess.getstatusoutput(cmdline) >>> status 256 >>> output "'{' is not recognized as an internal or external command,\noperable program or batch file." >>> I think this is an error (but it is possible I misunderstand the documentation for the function :) .) ---------- messages: 86242 nosy: mrwizard82d1 severity: normal status: open title: Subprocess.getstatusoutput Fails Executing 'dir' Command on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 17:56:05 2009 From: report at bugs.python.org (Lawrence Allan Jones) Date: Tue, 21 Apr 2009 15:56:05 +0000 Subject: [issue5808] Subprocess.getstatusoutput Fails Executing 'dir' Command on Windows In-Reply-To: <1240328974.09.0.446818382044.issue5808@psf.upfronthosting.co.za> Message-ID: <1240329365.02.0.111555044079.issue5808@psf.upfronthosting.co.za> Lawrence Allan Jones added the comment: Oops: user error. The manual states that subprocess.getstatusoutput() is only open under Unix. Somehow :) I missed this note. Sorry for wasting bandwidth. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 17:57:21 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 21 Apr 2009 15:57:21 +0000 Subject: [issue5804] Add a "tail" argument to zlib.decompress In-Reply-To: <1240328803.66.0.624136571147.issue5804@psf.upfronthosting.co.za> Message-ID: <1240329542.7801.12.camel@fsol> Antoine Pitrou added the comment: > It is not necessary to test the return value, it is done by > Py_BuildValue(). Sorry, it's ok then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 18:01:52 2009 From: report at bugs.python.org (Michael J. Fromberger) Date: Tue, 21 Apr 2009 16:01:52 +0000 Subject: [issue5809] "No such file or directory" with framework build under MacOS 10.4.11 In-Reply-To: <1240329712.27.0.0341104214309.issue5809@psf.upfronthosting.co.za> Message-ID: <1240329712.27.0.0341104214309.issue5809@psf.upfronthosting.co.za> New submission from Michael J. Fromberger : Checkout: Configure: env CFLAGS="-I/opt/local/include" LDFLAGS="-L/opt/local/lib" sh ./configure --enable-framework --enable-shared --enable-readline Build: make The configuration step completes successfully, and the build proceeds; however, the following error occurs: gcc -L/opt/local/lib -u _PyMac_Error Python.framework/Versions/2.6/Python -o python.exe \ Modules/python.o \ -L. -lpython2.6 -ldl This appears to be a problem in the definition of the LINKFORSHARED variable in the Makefile, but I am not sure what the intended meaning of that variable is, so I'm not sure what the fix should be. A complete make trace is attached. ---------- components: Build files: makedump.txt messages: 86245 nosy: creachadair severity: normal status: open title: "No such file or directory" with framework build under MacOS 10.4.11 type: compile error versions: Python 2.6 Added file: http://bugs.python.org/file13728/makedump.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 18:03:23 2009 From: report at bugs.python.org (Michael J. Fromberger) Date: Tue, 21 Apr 2009 16:03:23 +0000 Subject: [issue5809] "No such file or directory" with framework build under MacOS 10.4.11 In-Reply-To: <1240329712.27.0.0341104214309.issue5809@psf.upfronthosting.co.za> Message-ID: <1240329803.69.0.696249517916.issue5809@psf.upfronthosting.co.za> Michael J. Fromberger added the comment: Sorry, I managed to not copy the error message. It is: i686-apple-darwin8-gcc-4.0.1: Python.framework/Versions/2.6/Python: No such file or directory make: *** [python.exe] Error 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 18:29:23 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 21 Apr 2009 16:29:23 +0000 Subject: [issue5806] MySQL crash on machine startup.... In-Reply-To: <1240324892.81.0.865146510595.issue5806@psf.upfronthosting.co.za> Message-ID: <1240331363.3.0.358284534937.issue5806@psf.upfronthosting.co.za> R. David Murray added the comment: Python doesn't care about mysql. You can use a third party library to talk to mysql from python, but only if you install that third party library. Otherwise, python isn't even aware of whether or not mysql is installed. So whatever the problem is, it is very unlikely that it has anything to do with your python install. If your mysqld starts failing again after reinstalling python, then I'd suggest posting to python-list and see if the community can help you narrow down the problem. If for some bizarre reason it does turn out to be an issue with the python install, you can open a new ticket with more information, or reopen this one. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed type: crash -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 18:34:37 2009 From: report at bugs.python.org (Dave Fliger) Date: Tue, 21 Apr 2009 16:34:37 +0000 Subject: [issue5806] MySQL crash on machine startup.... In-Reply-To: <1240331363.3.0.358284534937.issue5806@psf.upfronthosting.co.za> Message-ID: <45452.80322.qm@web83003.mail.mud.yahoo.com> Dave Fliger added the comment: Thanks for the response. I wasn't sure what the deal was, and sort of intuitively knew it wasn't the problem. I wouldn't have mentioned it??with the exception that uninstalling solved the problem. That's a bit odd, don't you think? ?? Dave Fliger Webmaster Rogers Sporting Goods 1760 N. Church Road Liberty, MO 64068 (816)??781 9026 ?? ________________________________ From: R. David Murray To: plattecountyducks at yahoo.com Sent: Tuesday, April 21, 2009 11:29:23 AM Subject: [issue5806] MySQL crash on machine startup.... R. David Murray added the comment: Python doesn't care about mysql.?? You can use a third party library to talk to mysql from python, but only if you install that third party library. Otherwise, python isn't even aware of whether or not mysql is installed. So whatever the problem is, it is very unlikely that it has anything to do with your python install. If your mysqld starts failing again after reinstalling python, then I'd suggest posting to python-list and see if the community can help you narrow down the problem.?? If for some bizarre reason it does turn out to be an issue with the python install, you can open a new ticket with more information, or reopen this one. ---------- nosy: +r.david.murray resolution:?? -> invalid stage:?? -> committed/rejected status: open -> closed type: crash -> _______________________________________ Python tracker _______________________________________ ---------- Added file: http://bugs.python.org/file13730/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
Thanks for the response. I wasn't sure what the deal was, and sort of intuitively knew it wasn't the problem. I wouldn't have mentioned it with the exception that uninstalling solved the problem. That's a bit odd, don't you think?
 

Dave Fliger

Webmaster

Rogers Sporting Goods

1760 N. Church Road

Liberty, MO 64068

(816) 781 9026

 




From: R. David Murray <report at bugs.python.org>
To: plattecountyducks at yahoo.com
Sent: Tuesday, April 21, 2009 11:29:23 AM
Subject: [issue5806] MySQL crash on machine startup....


R. David Murray <rdmurray at bitdance.com> added the comment:

Python doesn't care about mysql.  You can use a third party library to
talk to mysql from python, but only if you install that third party
library. Otherwise, python isn't even aware of whether or not mysql is
installed. So whatever the problem is, it is very unlikely that it has
anything to do with your python install.

If your mysqld starts failing again after reinstalling python, then I'd
suggest posting to python-list and see if the community can help you
narrow down the problem.  If for some bizarre reason it does turn out to
be an issue with the python install, you can open a new ticket with more
information, or reopen this one.

----------
nosy: +r.david.murray
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed
type: crash ->

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5806>
_______________________________________

From report at bugs.python.org Tue Apr 21 18:39:24 2009 From: report at bugs.python.org (R. David Murray) Date: Tue, 21 Apr 2009 16:39:24 +0000 Subject: [issue5806] MySQL crash on machine startup.... In-Reply-To: <1240324892.81.0.865146510595.issue5806@psf.upfronthosting.co.za> Message-ID: <1240331964.49.0.464796983019.issue5806@psf.upfronthosting.co.za> R. David Murray added the comment: Well, you mentioned that you also added something to your startup...so it wasn't _only_ uninstalling python. That's why I suggested resinstalling it and seeing if things broke again...and then if it did getting help to track down why, because as I said python doesn't touch mysql. (Doesn't touch it even if you install the 3rd party mysql interface library...when you do that it just installs a client program). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 18:41:26 2009 From: report at bugs.python.org (Dave Fliger) Date: Tue, 21 Apr 2009 16:41:26 +0000 Subject: [issue5806] MySQL crash on machine startup.... In-Reply-To: <1240331964.49.0.464796983019.issue5806@psf.upfronthosting.co.za> Message-ID: <510759.86423.qm@web83003.mail.mud.yahoo.com> Dave Fliger added the comment: Thank you, sir. I'll try that later in the day. I just don't want to "break" what I have. I'm eager to look under the hood of Python. ?? Dave Fliger Webmaster Rogers Sporting Goods 1760 N. Church Road Liberty, MO 64068 (816)??781 9026 ?? ________________________________ From: R. David Murray To: plattecountyducks at yahoo.com Sent: Tuesday, April 21, 2009 11:39:24 AM Subject: [issue5806] MySQL crash on machine startup.... R. David Murray added the comment: Well, you mentioned that you also added something to your startup...so it wasn't _only_ uninstalling python.?? That's why I suggested resinstalling it and seeing if things broke again...and then if it did getting help to track down why, because as I said python doesn't touch mysql.?? (Doesn't touch it even if you install the 3rd party mysql interface library...when you do that it just installs a client program). ---------- _______________________________________ Python tracker _______________________________________ ---------- Added file: http://bugs.python.org/file13731/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
Thank you, sir. I'll try that later in the day. I just don't want to "break" what I have. I'm eager to look under the hood of Python.
 

Dave Fliger

Webmaster

Rogers Sporting Goods

1760 N. Church Road

Liberty, MO 64068

(816) 781 9026

 




From: R. David Murray <report at bugs.python.org>
To: plattecountyducks at yahoo.com
Sent: Tuesday, April 21, 2009 11:39:24 AM
Subject: [issue5806] MySQL crash on machine startup....


R. David Murray <rdmurray at bitdance.com> added the comment:

Well, you mentioned that you also added something to your startup...so
it wasn't _only_ uninstalling python.  That's why I suggested
resinstalling it and seeing if things broke again...and then if it did
getting help to track down why, because as I said python doesn't touch
mysql.  (Doesn't touch it even if you install the 3rd party mysql
interface library...when you do that it just installs a client program).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5806>
_______________________________________

From report at bugs.python.org Tue Apr 21 19:47:07 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 21 Apr 2009 17:47:07 +0000 Subject: [issue5786] len(reversed([1,2,3])) does not work anymore in 2.6.2 In-Reply-To: <1240070428.04.0.628652917462.issue5786@psf.upfronthosting.co.za> Message-ID: <1240336027.01.0.827144141289.issue5786@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 19:55:14 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 21 Apr 2009 17:55:14 +0000 Subject: [issue5786] len(reversed([1,2,3])) does not work anymore in 2.6.2 In-Reply-To: <1240070428.04.0.628652917462.issue5786@psf.upfronthosting.co.za> Message-ID: <1240336514.64.0.628154699467.issue5786@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Essentially, the only argument for reverting this is breaking compatibility with 2.6.0 and 2.6.1. But, in the process, reverting it means breaking compatibility with 2.6.2. Since the cat is already out of the bag for 2.6.2, I think the bugfix ought to be left in-place. It's too disruptive to switch back and forth during micro releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 20:14:21 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 21 Apr 2009 18:14:21 +0000 Subject: [issue5761] add file name to py3k IO objects repr() In-Reply-To: <1240327430.94.0.0275980349129.issue5761@psf.upfronthosting.co.za> Message-ID: <1afaf6160904211114x45a2640co3b3460e8f415c045@mail.gmail.com> Benjamin Peterson added the comment: 2009/4/21 Antoine Pitrou : > > Antoine Pitrou added the comment: > > Benjamin, do you think it can still be added after beta1? > (I ask that in case noone does it before) Yes, I think that would be ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 20:16:43 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 21 Apr 2009 18:16:43 +0000 Subject: [issue5807] ConfigParser.RawConfigParser it's an "old-style" class In-Reply-To: <1240326763.95.0.709769411309.issue5807@psf.upfronthosting.co.za> Message-ID: <1240337803.76.0.154341667175.issue5807@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Changing it would break compatibility. ---------- nosy: +benjamin.peterson resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 20:19:49 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 21 Apr 2009 18:19:49 +0000 Subject: [issue5786] len(reversed([1,2,3])) does not work anymore in 2.6.2 In-Reply-To: <1240070428.04.0.628652917462.issue5786@psf.upfronthosting.co.za> Message-ID: <1240337989.26.0.558076254108.issue5786@psf.upfronthosting.co.za> Mark Dickinson added the comment: If 2.6.3 isn't imminent, I agree this change should be left in place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 20:23:21 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 21 Apr 2009 18:23:21 +0000 Subject: [issue5757] Documentation error for Condition.notify() In-Reply-To: <1239742610.61.0.843225535898.issue5757@psf.upfronthosting.co.za> Message-ID: <1240338201.09.0.838594185095.issue5757@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r71786. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 20:24:44 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 21 Apr 2009 18:24:44 +0000 Subject: [issue5751] Typo in documentation of print function parameters In-Reply-To: <1239701175.13.0.88945528483.issue5751@psf.upfronthosting.co.za> Message-ID: <1240338284.01.0.633069539221.issue5751@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r71787. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 20:42:13 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 21 Apr 2009 18:42:13 +0000 Subject: [issue5808] Subprocess.getstatusoutput Fails Executing 'dir' Command on Windows In-Reply-To: <1240328974.09.0.446818382044.issue5808@psf.upfronthosting.co.za> Message-ID: <1240339333.55.0.646731871005.issue5808@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 21:02:43 2009 From: report at bugs.python.org (Chris Rebert) Date: Tue, 21 Apr 2009 19:02:43 +0000 Subject: [issue5434] datetime.monthdelta In-Reply-To: <1236402290.49.0.02662803662.issue5434@psf.upfronthosting.co.za> Message-ID: <1240340563.38.0.174187766549.issue5434@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 21:09:03 2009 From: report at bugs.python.org (Eric Smith) Date: Tue, 21 Apr 2009 19:09:03 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1240340943.5.0.965045976595.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: Thanks, Terry. Your changes look reasonable to me. Can you commit them, or at least convert it to a patch against the existing docs? ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Apr 21 23:15:23 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Tue, 21 Apr 2009 21:15:23 +0000 Subject: [issue5805] Distutils (or py2exe) error with DistributionMetaData In-Reply-To: <1240324240.34.0.236937269756.issue5805@psf.upfronthosting.co.za> Message-ID: <1240348523.26.0.139040031877.issue5805@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The bug report was closed here because it is not a bug in Python, but in py2exe, which is independent of Python. Please report it to the py2exe maintainers. Closing this one as well. ---------- nosy: +loewis resolution: -> invalid status: open -> closed versions: +3rd party -Python 2.6 _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Apr 21 23:16:58 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Tue, 21 Apr 2009 21:16:58 +0000 Subject: [issue5806] MySQL crash on machine startup.... In-Reply-To: <1240324892.81.0.865146510595.issue5806@psf.upfronthosting.co.za> Message-ID: <1240348618.62.0.318393998613.issue5806@psf.upfronthosting.co.za> Changes by Martin v. L?wis : Removed file: http://bugs.python.org/file13730/unnamed _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Apr 21 23:17:02 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Tue, 21 Apr 2009 21:17:02 +0000 Subject: [issue5806] MySQL crash on machine startup.... In-Reply-To: <1240324892.81.0.865146510595.issue5806@psf.upfronthosting.co.za> Message-ID: <1240348622.05.0.13116483833.issue5806@psf.upfronthosting.co.za> Changes by Martin v. L?wis : Removed file: http://bugs.python.org/file13731/unnamed _______________________________________ Python tracker _______________________________________ From =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za Tue Apr 21 23:18:52 2009 From: =?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za (=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?= at psf.upfronthosting.co.za) Date: Tue, 21 Apr 2009 21:18:52 +0000 Subject: [issue5806] MySQL crash on machine startup.... In-Reply-To: <1240324892.81.0.865146510595.issue5806@psf.upfronthosting.co.za> Message-ID: <1240348732.34.0.177450542037.issue5806@psf.upfronthosting.co.za> Martin v. L?wis added the comment: As David says: Python has no business with mysql. If they interfere, it could be because of a bug in Python, or because of a bug in mysql, or because of a bug in Windows, or because of a plain misconfiguration on your side. So unless you can provide detailed instructions on how to reproduce it, there is likely little that we can do. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 21 23:52:33 2009 From: report at bugs.python.org (Dave Fliger) Date: Tue, 21 Apr 2009 21:52:33 +0000 Subject: [issue5806] MySQL crash on machine startup.... In-Reply-To: <1240348732.34.0.177450542037.issue5806@psf.upfronthosting.co.za> Message-ID: <26757.27186.qm@web83007.mail.mud.yahoo.com> Dave Fliger added the comment: True enough, my friend. I really didn't know if it had been reported before. If I go over the sequence of events tat I performed here on this machine, then my only conclusion was the installation of Python because everything worked prior to that. I know that if I can't give you the steps to reproduce, there is no problem. So I guess this is an alert. If someone else reports something similar, you may have an issue. My original post clearly said that I didn't know if it was an issue or not. ?? Dave Fliger Webmaster Rogers Sporting Goods 1760 N. Church Road Liberty, MO 64068 (816)??781 9026 ?? ________________________________ From: ""Martin v. L??wis" @psf.upfronthosting.co.za" <=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?=@psf.upfronthosting.co.za> To: plattecountyducks at yahoo.com Sent: Tuesday, April 21, 2009 4:18:53 PM Subject: [issue5806] MySQL crash on machine startup.... Martin v. L??wis added the comment: As David says: Python has no business with mysql. If they interfere, it could be because of a bug in Python, or because of a bug in mysql, or because of a bug in Windows, or because of a plain misconfiguration on your side. So unless you can provide detailed instructions on how to reproduce it, there is likely little that we can do. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ ---------- Added file: http://bugs.python.org/file13732/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
True enough, my friend. I really didn't know if it had been reported before. If I go over the sequence of events tat I performed here on this machine, then my only conclusion was the installation of Python because everything worked prior to that. I know that if I can't give you the steps to reproduce, there is no problem.
 
So I guess this is an alert. If someone else reports something similar, you may have an issue. My original post clearly said that I didn't know if it was an issue or not.
 

Dave Fliger

Webmaster

Rogers Sporting Goods

1760 N. Church Road

Liberty, MO 64068

(816) 781 9026

 




From: ""Martin v. L??wis" <report at bugs.python.org>@psf.upfronthosting.co.za" <=?utf-8?b?Ik1hcnRpbiB2LiBMw7Z3aXMiIDxyZXBvcnRAYnVncy5weXRob24ub3JnPg==?=@psf.upfronthosting.co.za>
To: plattecountyducks at yahoo.com
Sent: Tuesday, April 21, 2009 4:18:53 PM
Subject: [issue5806] MySQL crash on machine startup....


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

As David says: Python has no business with mysql. If they interfere, it
could be because of a bug in Python, or because of a bug in mysql, or
because of a bug in Windows, or because of a plain misconfiguration on
your side.

So unless you can provide detailed instructions on how to reproduce it,
there is likely little that we can do.

----------
nosy: +loewis

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5806>
_______________________________________

From report at bugs.python.org Wed Apr 22 01:21:29 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 21 Apr 2009 23:21:29 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1240356089.76.0.777411585748.issue5237@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am not a committer and cannot make patches. However, I did download http://svn.python.org/view/python/trunk/Doc/library/string.rst?revision=70650&view=markup, as string27.txt, carefully edit using the existing rst format, and upload. I trust you can make the patch and commit. ---------- Added file: http://bugs.python.org/file13733/string27.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 01:27:04 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 21 Apr 2009 23:27:04 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1240356424.32.0.048101862856.issue5237@psf.upfronthosting.co.za> Terry J. Reedy added the comment: PS. I first edited http://svn.python.org/view/python/branches/py3k/Doc/library/strings.rst?revision=63803&view=markup but then noticed that this goes in 2.7. My impression is that the procedure is to commit to trunk and then forward port, so I redid it as indicated above. But if you are going from 3.1 to 2.7, I will upload the 3.1 revision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 02:38:37 2009 From: report at bugs.python.org (Eric Smith) Date: Wed, 22 Apr 2009 00:38:37 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1240360717.88.0.164952205593.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: Thanks, Terry. I think the only changes I'll make are: arg_name: (`identifier` | `integer`)* should be: arg_name: (`identifier` | `integer`)? And leave: conversion: "r" | "s" instead of: conversion: "r" | "s" | "a" because 'a' isn't valid in 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 02:55:31 2009 From: report at bugs.python.org (Eric Smith) Date: Wed, 22 Apr 2009 00:55:31 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1240361731.04.0.752577623454.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: Documentation changes checked into trunk in r71788 and py3k in r71790. Issue closed. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 03:00:42 2009 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Wed, 22 Apr 2009 01:00:42 +0000 Subject: [issue5810] test_distutils fails - sysconfig._config_vars is None In-Reply-To: <1240362042.52.0.447474592558.issue5810@psf.upfronthosting.co.za> Message-ID: <1240362042.52.0.447474592558.issue5810@psf.upfronthosting.co.za> New submission from Sridhar Ratnakumar : Sorry, but the commit r69598 (due to Issue4524) has a problem. On Windows and Linux (although not on MacOSX), test_distutils fails: test_distutils test test_distutils failed -- Traceback (most recent call last): File "C:\Python26\lib\distutils\tests\test_build_scripts.py", line 93, in test_version_int old = sysconfig._config_vars.get('VERSION') AttributeError: 'NoneType' object has no attribute 'get' Using the documented API (`sysconfig.get_config_vars()`) instead of an uninitialized private variable (`sysconfig._config_vars.get('VERSION')`) may fix it. The following session is from my a Windows machine: >>> from distutils import sysconfig >>> print sysconfig._config_vars None >>> s = sysconfig.get_config_vars() >>> s {'EXE': '.exe', ...} >>> sysconfig._config_vars {'EXE': '.exe', ...} >>> We face this failure while testing the ActivePython builds based on Python 2.6.2. ---------- assignee: tarek components: Distutils messages: 86266 nosy: srid, tarek, trentm severity: normal status: open title: test_distutils fails - sysconfig._config_vars is None type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 04:26:55 2009 From: report at bugs.python.org (R. David Murray) Date: Wed, 22 Apr 2009 02:26:55 +0000 Subject: [issue5796] test_posix, test_pty crash under Windows In-Reply-To: <1240182518.87.0.621846990716.issue5796@psf.upfronthosting.co.za> Message-ID: <1240367215.03.0.837539116302.issue5796@psf.upfronthosting.co.za> R. David Murray added the comment: x86 XP-4 trunk buildbot showed correct skip for these tests. Ported to py3k in r71792. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 05:44:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 03:44:44 +0000 Subject: [issue5797] there is en exception om Create User page In-Reply-To: <1240200084.56.0.449706089015.issue5797@psf.upfronthosting.co.za> Message-ID: <1240371884.44.0.77101647867.issue5797@psf.upfronthosting.co.za> Daniel Diniz added the comment: Which Create User page? What is the error you get, where and how does it happen? ---------- nosy: +ajaksu2 type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 06:10:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 04:10:02 +0000 Subject: [issue5753] CVE-2008-5983 python: untrusted python modules search path In-Reply-To: <1239709179.65.0.173847743531.issue5753@psf.upfronthosting.co.za> Message-ID: <1240373402.03.0.542852094561.issue5753@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: -> critical stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 06:12:48 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 04:12:48 +0000 Subject: [issue5727] doctest pdb readline broken In-Reply-To: <1239276305.19.0.526867750163.issue5727@psf.upfronthosting.co.za> Message-ID: <1240373568.68.0.558287600332.issue5727@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.6, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:06:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:06:10 +0000 Subject: [issue1540112] Allow choice of copy function in shutil.copytree Message-ID: <1240376769.43.0.956633948771.issue1540112@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:06:35 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:06:35 +0000 Subject: [issue5800] make wsgiref.headers.Headers accept empty constructor In-Reply-To: <1240243265.38.0.0946630520568.issue5800@psf.upfronthosting.co.za> Message-ID: <1240376795.81.0.807566857714.issue5800@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:07:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:07:11 +0000 Subject: [issue5754] Shelve module writeback parameter does not act as advertised In-Reply-To: <1239728605.41.0.419145925815.issue5754@psf.upfronthosting.co.za> Message-ID: <1240376831.38.0.724114667199.issue5754@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:07:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:07:11 +0000 Subject: [issue5789] powerset recipe listed twice in itertools docs In-Reply-To: <1240109589.15.0.0305049263162.issue5789@psf.upfronthosting.co.za> Message-ID: <1240376831.74.0.828575329776.issue5789@psf.upfronthosting.co.za> Daniel Diniz added the comment: Clear Bug Day candidate, but I just can't see the duplication :) ---------- keywords: +easy nosy: +ajaksu2 type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:07:21 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:07:21 +0000 Subject: [issue5752] xml.dom.minidom does not handle newline characters in attribute values In-Reply-To: <1239707588.77.0.33795755364.issue5752@psf.upfronthosting.co.za> Message-ID: <1240376841.71.0.354303486251.issue5752@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy stage: -> test needed versions: -Python 2.4, Python 2.5, Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:07:32 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:07:32 +0000 Subject: [issue1752919] Exception in HTMLParser for special JavaScript code Message-ID: <1240376852.28.0.271476324135.issue1752919@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:07:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:07:39 +0000 Subject: [issue1672568] silent error in email.message.Message.get_payload Message-ID: <1240376859.73.0.741713958211.issue1672568@psf.upfronthosting.co.za> Daniel Diniz added the comment: Looks good to me, adding tests and docs could be a nice Bug Day task. ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:07:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:07:43 +0000 Subject: [issue1745761] Bad attributes/data handling in SGMLib Message-ID: <1240376863.49.0.148997305328.issue1745761@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:07:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:07:47 +0000 Subject: [issue1738179] help() can't find right source file Message-ID: <1240376867.49.0.462329005247.issue1738179@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:07:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:07:55 +0000 Subject: [issue809887] Improve pdb breakpoint feedback Message-ID: <1240376875.41.0.0923215615167.issue809887@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:08:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:08:01 +0000 Subject: [issue5650] Obsolete RFC's should be removed from doc of urllib.urlparse In-Reply-To: <1238602458.06.0.807356829134.issue5650@psf.upfronthosting.co.za> Message-ID: <1240376881.66.0.931149277114.issue5650@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy stage: -> needs patch type: -> behavior versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:08:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:08:06 +0000 Subject: [issue1711605] CGIHttpServer leaves traces of previous requests in env Message-ID: <1240376886.85.0.390068736344.issue1711605@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:08:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:08:10 +0000 Subject: [issue1284670] Allow to restrict ModuleFinder to get "direct" dependencies Message-ID: <1240376890.74.0.508514863435.issue1284670@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:08:16 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:08:16 +0000 Subject: [issue1721862] email.FeedParser.BufferedSubFile improperly handles "\r\n" Message-ID: <1240376896.85.0.723523740562.issue1721862@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:08:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:08:27 +0000 Subject: [issue1681333] email.header unicode fix Message-ID: <1240376907.38.0.0578921248689.issue1681333@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:08:33 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:08:33 +0000 Subject: [issue1560032] confusing error msg from random.randint Message-ID: <1240376913.5.0.463443533317.issue1560032@psf.upfronthosting.co.za> Daniel Diniz added the comment: Don't worry :) Tagging as a Bug Day candidate. ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:08:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:08:41 +0000 Subject: [issue1076515] shutil.move clobbers read-only files. Message-ID: <1240376921.88.0.00295314457272.issue1076515@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:08:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:08:47 +0000 Subject: [issue1690608] email.utils.formataddr() should be rfc2047 aware Message-ID: <1240376927.58.0.320968728457.issue1690608@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:08:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:08:55 +0000 Subject: [issue1648102] proxy_bypass in urllib handling of macro Message-ID: <1240376935.92.0.0205405285376.issue1648102@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:09:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:09:01 +0000 Subject: [issue1726208] SimpleHTTPServer extensions_map Message-ID: <1240376941.42.0.0139810337505.issue1726208@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:09:09 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:09:09 +0000 Subject: [issue1515142] sgmllib should recover from unmatched quotes Message-ID: <1240376949.83.0.382260122785.issue1515142@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy, patch stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:09:15 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 05:09:15 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1240376955.48.0.0107078773947.issue1553375@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 07:27:21 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 22 Apr 2009 05:27:21 +0000 Subject: [issue5789] powerset recipe listed twice in itertools docs In-Reply-To: <1240109589.15.0.0305049263162.issue5789@psf.upfronthosting.co.za> Message-ID: <1240378040.82.0.0426398466713.issue5789@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Already fixed. ---------- nosy: +rhettinger resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 08:13:01 2009 From: report at bugs.python.org (Robert Kern) Date: Wed, 22 Apr 2009 06:13:01 +0000 Subject: [issue4111] Add DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1240380781.68.0.330245306978.issue4111@psf.upfronthosting.co.za> Robert Kern added the comment: Skip, it doesn't appear that the ustack helper is getting incorporated into the OS X build anywhere. This rule is obviously wrong (compiling the wrong input file with the wrong flags): Include/phelper.h: $(srcdir)/Include/phelper.d dtrace -o $@ $(DFLAGS) -C -h -s $(srcdir)/Python/python.d I *think* it should be something along these lines: Include/phelper.h: $(srcdir)/Include/phelper.d dtrace -o $@ -DPHELPER $(DFLAGS) $(CPPFLAGS) -C -h -s $(srcdir)/Include/phelper.d There are some static functions in the standard system headers that get pulled in that need to be avoided. The #define _SYS_STAT_H up at the top avoids similar problems on Solaris. I'm working through the OS X headers now, but I'm stuck on trying to avoid sys/_structs.h. Unfortunately, it does not have the #ifndef _SYS__STRUCTS_H magic up at the top that would allow me to do so, nor any convenient #ifdefs around the offending declaration. Even if that would work, phelper.h is not #included anywhere. I'm not really sure where it needs to go. On Solaris, the object file gets linked in, but on OS X, you don't generate an object file; you just #include the .h. Somewhere. I'm guessing where the pydtrace.h is currently, but I don't really know. John, do you have any insights? Also, s/DTRADEHDRS/DTRACEHDRS/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 08:15:54 2009 From: report at bugs.python.org (Torsten Rottmann) Date: Wed, 22 Apr 2009 06:15:54 +0000 Subject: [issue5811] io.BufferedReader.peek(): Documentation differs from Implementation In-Reply-To: <1240380953.7.0.732520909261.issue5811@psf.upfronthosting.co.za> Message-ID: <1240380953.7.0.732520909261.issue5811@psf.upfronthosting.co.za> New submission from Torsten Rottmann : The documented behavior of io.BufferedReader.peek([n]) states: peek([n]) Return 1 (or n if specified) bytes from a buffer without advancing the position. Thereas the parameter n is the _max_ length of returned bytes. Implementation is: def _peek_unlocked(self, n=0): want = min(n, self.buffer_size) have = len(self._read_buf) - self._read_pos if have < want: to_read = self.buffer_size - have current = self.raw.read(to_read) if current: self._read_buf = self._read_buf[self._read_pos:] + current self._read_pos = 0 return self._read_buf[self._read_pos:] Where you may see that the parameter n is the _min_ length of returned bytes. So peek(1) will return _not_ just 1 Byte, but the remaining bytes in the buffer. ---------- components: Library (Lib) messages: 86274 nosy: trott severity: normal status: open title: io.BufferedReader.peek(): Documentation differs from Implementation type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 08:20:10 2009 From: report at bugs.python.org (Torsten Rottmann) Date: Wed, 22 Apr 2009 06:20:10 +0000 Subject: [issue5811] io.BufferedReader.peek(): Documentation differs from Implementation In-Reply-To: <1240380953.7.0.732520909261.issue5811@psf.upfronthosting.co.za> Message-ID: <1240381210.64.0.0136147023688.issue5811@psf.upfronthosting.co.za> Torsten Rottmann added the comment: Note: this is also in Python 2.6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 08:29:16 2009 From: report at bugs.python.org (Torsten Rottmann) Date: Wed, 22 Apr 2009 06:29:16 +0000 Subject: [issue5811] io.BufferedReader.peek(): Documentation differs from Implementation In-Reply-To: <1240380953.7.0.732520909261.issue5811@psf.upfronthosting.co.za> Message-ID: <1240381756.65.0.915481397022.issue5811@psf.upfronthosting.co.za> Torsten Rottmann added the comment: Proposed patch to fix this: set the default of n to 1 as stated by docs: def _peek_unlocked(self, n=1): return n bytes: return self._read_buf[self._read_pos:self._read_pos+n] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 08:41:46 2009 From: report at bugs.python.org (Robert Kern) Date: Wed, 22 Apr 2009 06:41:46 +0000 Subject: [issue4111] Add DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1240382506.76.0.405263264443.issue4111@psf.upfronthosting.co.za> Robert Kern added the comment: Got a bit farther. Adding this stanza to the top of phelper.d gets past the issues in the headers: #ifdef __APPLE__ #define _SYS_TIME_H_ #define _SYS_SELECT_H_ #define __MATH_H__ #define _OS__OSBYTEORDER_H #define _FD_SET #define __GNUC_VA_LIST #endif /* __APPLE__ */ However, I now get a more legitimate dtrace compilation error that John might be able to help us interpret: $ dtrace -o /Users/rkern/hg/Python-2.5.4/Include/phelper.h -DPHELPER -I. -IInclude -I/Users/rkern/hg/Python-2.5.4/Include -C -h -s /Users/rkern/hg/Python-2.5.4/Include/phelper.d dtrace: failed to compile script /Users/rkern/hg/Python-2.5.4/Include/phelper.d: line 110: relocation remains against user symbol D``PyEval_EvalFrameEx (offset 0x5) I also tried running this without -DPHELPER as a regular DTrace script rather than a ustack helper and ran into a problem that I've noticed with any OS X Python build I've tried. I cannot seem to probe any of the C functions in the Python interpreter. There are no simply pid$target:a.out:: probes available. I'm wondering if that is an effect of their being in a .framework, but I think I've been able to probe other symbols other .frameworks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 09:34:48 2009 From: report at bugs.python.org (Laszlo (Laca) Peter) Date: Wed, 22 Apr 2009 07:34:48 +0000 Subject: [issue4111] Add DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1240385688.44.0.914113644538.issue4111@psf.upfronthosting.co.za> Laszlo (Laca) Peter added the comment: Look at these lines at the beginning of phelper.d: #if defined(__i386) #define startframe PyEval_EvalFrameEx #define endframe PyEval_EvalCodeEx #elif defined(__amd64) #define PyEval_EvalFrameEx PyEval_EvalFrameExReal #define startframe PyEval_EvalFrameExReal #define endframe PyEval_EvalCodeEx #elif defined(__sparc) #define PyEval_EvalFrameEx PyEval_EvalFrameExReal #define startframe PyEval_EvalFrameEx #define endframe PyEval_EvalFrameExReal #endif You may need to adjust these if your compiler defines something different from the __i386 or __amd64. I guess an #else #error your architecture was not recognized #endif would be useful here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 09:45:22 2009 From: report at bugs.python.org (Robert Kern) Date: Wed, 22 Apr 2009 07:45:22 +0000 Subject: [issue4111] Add DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1240386322.24.0.767664849483.issue4111@psf.upfronthosting.co.za> Robert Kern added the comment: This is on an Intel Core 2 Duo running OS X 10.5.6. __i386 is defined. ---------- _______________________________________ Python tracker _______________________________________ From =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za Wed Apr 22 10:36:57 2009 From: =?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za (=?utf-8?q?Tarek_Ziad=C3=A9_=3Creport=40bugs=2Epython=2Eorg=3E?= at psf.upfronthosting.co.za) Date: Wed, 22 Apr 2009 08:36:57 +0000 Subject: [issue5810] test_distutils fails - sysconfig._config_vars is None In-Reply-To: <1240362042.52.0.447474592558.issue5810@psf.upfronthosting.co.za> Message-ID: <1240389417.51.0.0142893017883.issue5810@psf.upfronthosting.co.za> Tarek Ziad? added the comment: While your fix proposal is accurate, _config_vars is initialized in the test framework because it is used by various part. I was unable to reproduce your issue, how do you do ? ---------- versions: +Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 10:45:42 2009 From: report at bugs.python.org (Paul Moore) Date: Wed, 22 Apr 2009 08:45:42 +0000 Subject: [issue5799] Change ntpath functions to implicitly support UNC paths In-Reply-To: <1240225634.02.0.80774698084.issue5799@psf.upfronthosting.co.za> Message-ID: <1240389942.87.0.836455109087.issue5799@psf.upfronthosting.co.za> Paul Moore added the comment: This sounds reasonable to me. I would like to see this patch applied. Note - someone involved with the cygwin port should confirm that the patch does indeed no longer cause issues for cygwin. ---------- nosy: +pmoore _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 10:47:38 2009 From: report at bugs.python.org (shamilbi) Date: Wed, 22 Apr 2009 08:47:38 +0000 Subject: [issue5170] logging to file + encoding In-Reply-To: <1240305907.01.0.510148893924.issue5170@psf.upfronthosting.co.za> Message-ID: shamilbi added the comment: > > Trunk and release26-maint were recently changed (r71657, r71658) to use > the following logic, which differs from the code snippet you posted. > > if (isinstance(msg, unicode) and > getattr(stream, 'encoding', None)): > stream.write(fs.decode(stream.encoding) % msg) > else: > stream.write(fs % msg) > > If the stream is stderr and you are passing a unicode msg, the else > branch will not be taken; as long as the stream has an encoding > attribute, it should output correctly. > > The change was made when another, similar issue was posted by another > user (issue #5768). > > Can you confirm what happens with the current code as it is in > release26-maint? ??????????????! it still doesn't work for console (but OK for files). the following works in both cases: if (isinstance(msg, unicode) and getattr(stream, 'encoding', None) and (stream == sys.stdout or stream == sys.stderr)): stream.write(fs % msg.encode(stream.encoding)) else: stream.write(fs % msg) i think it's all about the difference betwin print(msg) and sys.stdout.write('%s\n' % msg) shamil ---------- Added file: http://bugs.python.org/file13734/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
Trunk and release26-maint were recently changed (r71657, r71658) to use
the following logic, which differs from the code snippet you posted.

?? ?? ?? ?? ?? ?? ?? ?? ?? ??if (isinstance(msg, unicode) and
?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??getattr(stream, 'encoding', None)):
?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??stream.write(fs.decode(stream.encoding) % msg)
?? ?? ?? ?? ?? ?? ?? ?? ?? ??else:
?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??stream.write(fs % msg)

If the stream is stderr and you are passing a unicode msg, the else
branch will not be taken; as long as the stream has an encoding
attribute, it should output correctly.

The change was made when another, similar issue was posted by another
user (issue #5768).

Can you confirm what happens with the current code as it is in
release26-maint? ??????????????!
??
it still doesn't work for console (but OK for files).

the following works in both cases:
if (isinstance(msg, unicode) and
?????? getattr(stream, 'encoding', None) and
?????? (stream == sys.stdout or stream == sys.stderr)):
?????? stream.write(fs % msg.encode(stream.encoding))
else:
???????? stream.write(fs % msg)

i think it's all about the difference betwin print(msg) and sys.stdout.write('%s\n' % msg)

shamil
From report at bugs.python.org Wed Apr 22 12:04:27 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 22 Apr 2009 10:04:27 +0000 Subject: [issue5812] Fraction('1e6') should be valid. In-Reply-To: <1240394667.14.0.711650033948.issue5812@psf.upfronthosting.co.za> Message-ID: <1240394667.14.0.711650033948.issue5812@psf.upfronthosting.co.za> New submission from Mark Dickinson : When the Fractions module was first added to Python, it was decided that when constructing from a string, decimal strings should be allowed, but not those including an exponent. For example, Fraction('1.1') is currently valid, but Fraction('1.1e6') is not. I think exponents should be permitted, for a couple of reasons: (1) consistency: there's a clearly-defined notion of a numeric string of the form ([sign] integer_part [fractional_part] [exponent]); the float and Decimal constructors both accept all numeric strings. Fraction currently accepts some, but not all of these. (2) Easy interactions with floats: with this addition, a Fraction can always be constructed from the str() or repr() of a finite float or finite Decimal; without it, only some of those strings can be converted. (3) Ease of parsing files containing numeric strings. (4) It's a very simple change! See attached patch. Jeffrey, any thoughts? ---------- assignee: marketdickinson components: Library (Lib) files: fraction_from_exp.patch keywords: patch messages: 86283 nosy: jyasskin, marketdickinson priority: normal severity: normal stage: patch review status: open title: Fraction('1e6') should be valid. type: feature request versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13735/fraction_from_exp.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 13:24:04 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 22 Apr 2009 11:24:04 +0000 Subject: [issue5799] Change ntpath functions to implicitly support UNC paths In-Reply-To: <1240225634.02.0.80774698084.issue5799@psf.upfronthosting.co.za> Message-ID: <1240399444.4.0.364826516568.issue5799@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I confirm that the cygwin port uses posixpath, and that the current patch has no impact there, except for users which explicitly import ntpath to get nt semantics. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 13:24:34 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 22 Apr 2009 11:24:34 +0000 Subject: [issue5812] Fraction('1e6') should be valid. In-Reply-To: <1240394667.14.0.711650033948.issue5812@psf.upfronthosting.co.za> Message-ID: <1240399474.92.0.146365738543.issue5812@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Also, it would be nice if the Fraction constructor accepted both a numerator and denominator that we also fractions. This came up in a demonstration of continued fractions and it bombed when the denominator was not allowed to be a Fraction itself. The meaning is well-defined and it is also a simple change. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 13:35:18 2009 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 22 Apr 2009 11:35:18 +0000 Subject: [issue5170] logging to file + encoding In-Reply-To: <1233936467.22.0.152712476213.issue5170@psf.upfronthosting.co.za> Message-ID: <1240400118.88.0.695125715467.issue5170@psf.upfronthosting.co.za> Vinay Sajip added the comment: > i think it's all about the difference betwin print(msg) and > sys.stdout.write('%s\n' % msg) Yes. Actually, it's about what streams will accept. For example, a stream opened with codecs.open(encoding='cp1251') will accept a Unicode string and encode it before output. Likewise, a StringIO wrapped inside a writer obtained from the codecs module. However, stdout and stderr are of type file and seem to behave differently - they behave as expected if I encode the value written to them, but fail if I write a Unicode string to them. I don't think special-casing for sys.stdout and sys.stderr in the logging code is the correct approach. Better to put a conditional encoding step when it's needed - now I just need to figure out all the cases when it's needed ;-) ---------- resolution: fixed -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 14:00:29 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 22 Apr 2009 12:00:29 +0000 Subject: [issue5812] Fraction('1e6') should be valid. In-Reply-To: <1240394667.14.0.711650033948.issue5812@psf.upfronthosting.co.za> Message-ID: <1240401629.21.0.692174987175.issue5812@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Also, it would be nice if the Fraction constructor accepted both a > numerator and denominator that we also fractions. This makes sense to me. It reminds me of the way that complex(real, imag) allows real and imag to be complex numbers, and does the 'right thing'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 14:08:21 2009 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 22 Apr 2009 12:08:21 +0000 Subject: [issue5813] Pointer into language reference from __future__ module documentation In-Reply-To: <1240402101.01.0.458823769963.issue5813@psf.upfronthosting.co.za> Message-ID: <1240402101.01.0.458823769963.issue5813@psf.upfronthosting.co.za> New submission from Nick Coghlan : I was explaining __future__ to someone and it occurred to me that it would be handy to have a "see also" in that module's documentation that pointed readers to the relevant section on future statements in the language reference (http://docs.python.org/reference/simple_stmts.html#future-statements) A "see also" pointer back to PEP 326 from one of those two locations might also be worthwhile. ---------- assignee: georg.brandl components: Documentation messages: 86289 nosy: georg.brandl, ncoghlan priority: low severity: normal status: open title: Pointer into language reference from __future__ module documentation type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 14:10:42 2009 From: report at bugs.python.org (John Levon) Date: Wed, 22 Apr 2009 12:10:42 +0000 Subject: [issue4111] Add DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1240402242.37.0.369006300019.issue4111@psf.upfronthosting.co.za> John Levon added the comment: Robert, I have no idea how Mac OS does pstack helpers without generating object files, sorry. > no simply pid$target:a.out:: probes available. Hmm. Try adding -Z to see if that helps. > /Users/rkern/hg/Python-2.5.4/Include/phelper.d: line 110: relocation > remains against user symbol D``PyEval_EvalFrameEx (offset 0x5) This is trying to tell you that there's no such function. Indeed, this isn't mentioned in my original patches, have you been editing it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 14:14:28 2009 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 22 Apr 2009 12:14:28 +0000 Subject: [issue5170] logging to file + encoding In-Reply-To: <1233936467.22.0.152712476213.issue5170@psf.upfronthosting.co.za> Message-ID: <1240402468.5.0.34666643319.issue5170@psf.upfronthosting.co.za> Vinay Sajip added the comment: Fix checked into trunk and release26-maint. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 14:15:47 2009 From: report at bugs.python.org (Arkadiusz Miskiewicz Arkadiusz Miskiewicz) Date: Wed, 22 Apr 2009 12:15:47 +0000 Subject: [issue5814] SocketServer: TypeError: waitpid() takes no keyword arguments In-Reply-To: <1240402546.97.0.496265243234.issue5814@psf.upfronthosting.co.za> Message-ID: <1240402546.97.0.496265243234.issue5814@psf.upfronthosting.co.za> New submission from Arkadiusz Miskiewicz Arkadiusz Miskiewicz : SocketServer.py contains call os.waitpid(0, options=0) but os.waitpid doesn't accept keyword arguments. I guess the best fix is to make waitpid accept such arguments. Traceback (most recent call last): File "/usr/share/python2.6/SocketServer.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "/usr/share/python2.6/SocketServer.py", line 522, in process_request self.collect_children () File "/usr/share/python2.6/SocketServer.py", line 490, in collect_children pid, status = os.waitpid(0, options=0) TypeError: waitpid() takes no keyword arguments ---------- components: Library (Lib) messages: 86292 nosy: arekm severity: normal status: open title: SocketServer: TypeError: waitpid() takes no keyword arguments versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 14:33:39 2009 From: report at bugs.python.org (Eric Smith) Date: Wed, 22 Apr 2009 12:33:39 +0000 Subject: [issue5793] Rationalize isdigit / isalpha / tolower / ... uses throughout Python source In-Reply-To: <1240145867.12.0.0306505871305.issue5793@psf.upfronthosting.co.za> Message-ID: <1240403619.1.0.808746380601.issue5793@psf.upfronthosting.co.za> Eric Smith added the comment: Also, see _toupper/_tolower in Objects/stringlib/stringdef.h and Objects/stringobject.c. Those should be rationalized as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 14:37:14 2009 From: report at bugs.python.org (Walter Doekes) Date: Wed, 22 Apr 2009 12:37:14 +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: <1240403834.52.0.110886728862.issue2980@psf.upfronthosting.co.za> Walter Doekes added the comment: Same issue with Django here ;-) I wouldn't mind a protocol 3 that does <128 ascii only. If only because debugging base64'd zlib'd protocol-2 data is not particularly convenient. ---------- nosy: +wdoekes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 14:45:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 12:45:50 +0000 Subject: [issue1459279] sgmllib.SGMLparser and hexadecimal numeric character refs Message-ID: <1240404350.22.0.594780934109.issue1459279@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 14:45:58 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 12:45:58 +0000 Subject: [issue1566260] Better order in file type descriptions Message-ID: <1240404358.77.0.674375025964.issue1566260@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 14:46:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 12:46:05 +0000 Subject: [issue1565071] update Lib/plat-linux2/IN.py Message-ID: <1240404365.34.0.142808483561.issue1565071@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 14:46:23 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 12:46:23 +0000 Subject: [issue5584] json.loads(u'3.14') fails unexpectedly (minor scanner bug) In-Reply-To: <1238219615.73.0.707210951472.issue5584@psf.upfronthosting.co.za> Message-ID: <1240404383.42.0.883089435583.issue5584@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: -> high versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 14:46:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 12:46:56 +0000 Subject: [issue1153027] http_error_302() crashes with 'HTTP/1.1 400 Bad Request Message-ID: <1240404416.96.0.1847527322.issue1153027@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 14:47:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 12:47:03 +0000 Subject: [issue1500504] Alternate RFC 3986 compliant URI parsing module Message-ID: <1240404423.96.0.581034908449.issue1500504@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 14:47:19 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 12:47:19 +0000 Subject: [issue1492704] distinct error type from shutil.move() Message-ID: <1240404439.26.0.00970750259341.issue1492704@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 14:47:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 12:47:10 +0000 Subject: [issue1436203] getpass.getpass() should allow Unicode prompts Message-ID: <1240404430.58.0.466511489882.issue1436203@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 15:47:52 2009 From: report at bugs.python.org (Senthil) Date: Wed, 22 Apr 2009 13:47:52 +0000 Subject: [issue1500504] Alternate RFC 3986 compliant URI parsing module Message-ID: <1240408072.55.0.893213918509.issue1500504@psf.upfronthosting.co.za> Changes by Senthil : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:26:23 2009 From: report at bugs.python.org (Senthil) Date: Wed, 22 Apr 2009 14:26:23 +0000 Subject: [issue1648102] proxy_bypass in urllib handling of macro Message-ID: <1240410383.7.0.510381833296.issue1648102@psf.upfronthosting.co.za> Changes by Senthil : ---------- assignee: -> orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:35:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:35:26 +0000 Subject: [issue1443875] email/charset.py convert() patch Message-ID: <1240410926.66.0.142325926267.issue1443875@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:35:30 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:35:30 +0000 Subject: [issue1437051] "continue" in .pdbrc has no effect Message-ID: <1240410930.11.0.93134663319.issue1437051@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:35:32 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:35:32 +0000 Subject: [issue1438480] shutil.move raises OSError when copystat fails Message-ID: <1240410932.06.0.509600461472.issue1438480@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:35:35 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:35:35 +0000 Subject: [issue1422094] email.MIME*.as_string removes duplicate spaces Message-ID: <1240410935.7.0.370006928127.issue1422094@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:35:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:35:41 +0000 Subject: [issue1432343] Description of file-object read() method is wrong. Message-ID: <1240410941.87.0.16158400926.issue1432343@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy nosy: +pitrou stage: -> patch review versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:35:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:35:50 +0000 Subject: [issue1394135] Deleting first item causes anydbm.first() to fail Message-ID: <1240410950.47.0.770450414802.issue1394135@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:35:57 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:35:57 +0000 Subject: [issue1398781] Example in section 5.3 "Pure Embedding" doesn't work. Message-ID: <1240410957.37.0.531094325395.issue1398781@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:36:00 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:36:00 +0000 Subject: [issue1410680] Add 'surgical editing' to ConfigParser Message-ID: <1240410960.27.0.84230003993.issue1410680@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:36:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:36:08 +0000 Subject: [issue1360243] Add XML-RPC Fault Interoperability to XMLRPC libraries Message-ID: <1240410968.09.0.416857719401.issue1360243@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:36:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:36:12 +0000 Subject: [issue1372770] email.Header should preserve original FWS Message-ID: <1240410972.0.0.537300047851.issue1372770@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:36:30 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:36:30 +0000 Subject: [issue1356969] Tix.py class HList missing info_bbox Message-ID: <1240410990.46.0.851664677676.issue1356969@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:36:37 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:36:37 +0000 Subject: [issue1314572] Trailing slash redirection for SimpleHTTPServer Message-ID: <1240410997.47.0.229589501403.issue1314572@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:36:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:36:47 +0000 Subject: [issue1243730] Big speedup in email message parsing Message-ID: <1240411007.88.0.150852284084.issue1243730@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:37:09 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:37:09 +0000 Subject: [issue1158490] locale fails if LANGUAGE has multiple locales Message-ID: <1240411029.83.0.462739282925.issue1158490@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:37:18 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:37:18 +0000 Subject: [issue1666318] shutil.copytree doesn't preserve directory permissions Message-ID: <1240411038.36.0.79712885471.issue1666318@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:37:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:37:24 +0000 Subject: [issue3565] array documentation, method names not 3.0 compliant In-Reply-To: <1218878053.61.0.879399084038.issue3565@psf.upfronthosting.co.za> Message-ID: <1240411044.11.0.477500628598.issue3565@psf.upfronthosting.co.za> Daniel Diniz added the comment: The doc patch is in scope for the Bug Day. ---------- keywords: +easy nosy: +ajaksu2 stage: -> test needed type: -> feature request versions: +Python 3.1 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:38:00 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:38:00 +0000 Subject: [issue3022] mailbox module, two small fixes In-Reply-To: <1212355773.67.0.369854949727.issue3022@psf.upfronthosting.co.za> Message-ID: <1240411080.01.0.095381588675.issue3022@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: -> normal stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:38:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:38:05 +0000 Subject: [issue5498] Can SGMLParser properly handle tags? In-Reply-To: <1237288775.97.0.464945533476.issue5498@psf.upfronthosting.co.za> Message-ID: <1240411085.04.0.569324568017.issue5498@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy stage: -> test needed versions: +Python 2.6 -3rd party, Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:38:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:38:20 +0000 Subject: [issue444582] Finding programs in PATH, addition to os Message-ID: <1240411100.67.0.804186146766.issue444582@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +replace dist/src/Tools/scripts/which.py with tmick's which keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:38:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:38:28 +0000 Subject: [issue5430] imaplib: must not replace LF or CR by CRLF in literals In-Reply-To: <1236325877.36.0.637700625895.issue5430@psf.upfronthosting.co.za> Message-ID: <1240411108.38.0.312934000746.issue5430@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:38:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:38:43 +0000 Subject: [issue5423] Exception raised when attempting to call set_charset on an email.mime.multipart once sub-parts have been attached In-Reply-To: <1236258073.44.0.224242973923.issue5423@psf.upfronthosting.co.za> Message-ID: <1240411123.12.0.0720239360863.issue5423@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:39:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:39:01 +0000 Subject: [issue5419] urllib.request.open(someURL).read() returns a bytes object so writing it requires binary mode In-Reply-To: <1236216086.62.0.687528545638.issue5419@psf.upfronthosting.co.za> Message-ID: <1240411141.1.0.580480644298.issue5419@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy priority: -> normal stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:39:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:39:08 +0000 Subject: [issue5117] os.path.relpath problem with root directory In-Reply-To: <1233386752.72.0.952122419494.issue5117@psf.upfronthosting.co.za> Message-ID: <1240411148.22.0.847682328908.issue5117@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: -> normal stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:39:15 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:39:15 +0000 Subject: [issue4712] Document pickle behavior for subclasses of dicts/lists In-Reply-To: <1229880245.44.0.0654065239479.issue4712@psf.upfronthosting.co.za> Message-ID: <1240411155.94.0.540603005714.issue4712@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:39:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:39:20 +0000 Subject: [issue1355826] shutil.move() does not preserve ownership Message-ID: <1240411160.99.0.963040819136.issue1355826@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:39:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:39:28 +0000 Subject: [issue5395] array.fromfile not checking I/O errors In-Reply-To: <1235845824.28.0.0746931050705.issue5395@psf.upfronthosting.co.za> Message-ID: <1240411168.87.0.813218939273.issue5395@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy priority: -> normal stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:39:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:39:59 +0000 Subject: [issue5283] setting __class__ in __del__ is bad. mmkay. negative ref count! kaboom! In-Reply-To: <1234819475.16.0.132337680587.issue5283@psf.upfronthosting.co.za> Message-ID: <1240411199.78.0.877249668112.issue5283@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:40:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:40:11 +0000 Subject: [issue5259] smtplib is broken in Python3 In-Reply-To: <1234621158.53.0.153253851523.issue5259@psf.upfronthosting.co.za> Message-ID: <1240411211.87.0.745990904612.issue5259@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +email/base64mime.py cannot work, smtplib cannot sendmail over TLS keywords: +easy priority: -> normal stage: -> test needed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:40:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:40:20 +0000 Subject: [issue5304] email/base64mime.py cannot work In-Reply-To: <1234920967.72.0.68808055681.issue5304@psf.upfronthosting.co.za> Message-ID: <1240411220.3.0.873493658914.issue5304@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy priority: -> high stage: -> test needed type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:40:31 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:40:31 +0000 Subject: [issue3921] smtplib cannot sendmail over TLS In-Reply-To: <1221984708.09.0.19052832877.issue3921@psf.upfronthosting.co.za> Message-ID: <1240411231.76.0.456018389276.issue3921@psf.upfronthosting.co.za> Daniel Diniz added the comment: The attached patch makes using smtplib in py3k possible. It isn't proposed as a correct fix. ---------- keywords: +easy, patch nosy: +ajaksu2 priority: -> high stage: -> test needed type: -> behavior Added file: http://bugs.python.org/file13736/smtplib.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:40:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:40:44 +0000 Subject: [issue5230] pydoc reports misleading failure if target module raises an ImportError In-Reply-To: <1234473388.92.0.353382315269.issue5230@psf.upfronthosting.co.za> Message-ID: <1240411244.67.0.00549395006494.issue5230@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy priority: -> normal versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:41:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:41:10 +0000 Subject: [issue3073] Cookie.Morsel breaks in parsing cookie values with whitespace In-Reply-To: <1213092703.97.0.622811170151.issue3073@psf.upfronthosting.co.za> Message-ID: <1240411270.13.0.0342305915214.issue3073@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: -> normal stage: -> patch review versions: -Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:41:21 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:41:21 +0000 Subject: [issue5286] urrlib2 digest authentication problems In-Reply-To: <1234828359.04.0.561116090692.issue5286@psf.upfronthosting.co.za> Message-ID: <1240411281.76.0.265171433369.issue5286@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy priority: -> normal stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:42:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:42:52 +0000 Subject: [issue1375011] Improper handling of duplicate cookies Message-ID: <1240411372.43.0.767425983359.issue1375011@psf.upfronthosting.co.za> Daniel Diniz added the comment: See discussion in issue 1372650. ---------- keywords: +easy nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:43:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:43:41 +0000 Subject: [issue1243654] Faster output if message already has a boundary Message-ID: <1240411421.44.0.977186857.issue1243654@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:43:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:43:50 +0000 Subject: [issue1210680] Split email headers near a space Message-ID: <1240411430.8.0.614766622014.issue1210680@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:43:57 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:43:57 +0000 Subject: [issue1189811] pydoc may hide non-private doc strings. Message-ID: <1240411437.94.0.752805741657.issue1189811@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 22 16:44:13 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 22 Apr 2009 14:44:13 +0000 Subject: [issue1144533] htmllib quote parse error within a