From report at bugs.python.org Tue Feb 1 00:02:42 2011 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 31 Jan 2011 23:02:42 +0000 Subject: [issue11016] Add S_ISDOOR to the stat module In-Reply-To: <1296474363.6.0.287806699302.issue11016@psf.upfronthosting.co.za> Message-ID: <4D473F90.1060003@v.loewis.de> Martin v. L?wis added the comment: Am 31.01.2011 12:46, schrieb Jes?s Cea Avi?n: > > Jes?s Cea Avi?n added the comment: > > Martin, I guess "stat" deprecation could require a few years and it > would be an extra incompatibility burden between 2.7 and 3.x. > > Beside the symbolic constants, why would you see "stat" deprecated?. Because it doesn't provide any useful functionality, and confuses the users. The ST_* constants should have been deprecated long ago, since people really should use the st_ members of stat_result. In addition, stat_result should stop behaving like a tuple. The other constants and functions (S_*) are plainly non-portable. Apparently, contributor have the illusion that the values they put into the file are somehow standardized, when they are actually not. So having the module available makes people like you wonder how to best support it (see msg127107 and msg127110). Better remove it so that it doesn't confuse you anymore. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 00:07:02 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 31 Jan 2011 23:07:02 +0000 Subject: [issue11016] Add S_ISDOOR to the stat module In-Reply-To: <1296039446.69.0.66523737586.issue11016@psf.upfronthosting.co.za> Message-ID: <1296515222.1.0.23783742745.issue11016@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Apparently, contributor have the illusion that the values they put > into the file are somehow standardized, when they are actually not. Are there actual bugs with that or is it merely a theoretical concern? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 00:53:13 2011 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 31 Jan 2011 23:53:13 +0000 Subject: [issue11016] Add S_ISDOOR to the stat module In-Reply-To: <1296515222.1.0.23783742745.issue11016@psf.upfronthosting.co.za> Message-ID: <4D474B67.6050402@v.loewis.de> Martin v. L?wis added the comment: >> Apparently, contributor have the illusion that the values they put >> into the file are somehow standardized, when they are actually not. > > Are there actual bugs with that or is it merely a theoretical concern? Neither, nor (i.e. it's in the middle). I'm not aware of an actual problem, but I very much doubt that SF_SNAPSHOT really has the same meaning on all systems (IOW, chances are high that some system has allocated the same bit to mean something different). Looking in more detail: for the S_IFMT flags, OSX/Darwin/FreeBSD defines 0xe000 as S_IFWHT (whiteout), but Solaris defines it as S_IFPORT (event port). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 01:02:38 2011 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Feb 2011 00:02:38 +0000 Subject: [issue3080] Full unicode import system In-Reply-To: <1213208697.49.0.984990811807.issue3080@psf.upfronthosting.co.za> Message-ID: <1296518558.73.0.684426353588.issue3080@psf.upfronthosting.co.za> STINNER Victor added the comment: See also #6011. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 01:03:16 2011 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Feb 2011 00:03:16 +0000 Subject: [issue10614] ZipFile: add a filename_encoding argument In-Reply-To: <1291362121.18.0.976785403189.issue10614@psf.upfronthosting.co.za> Message-ID: <1296518596.61.0.504539124607.issue10614@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: ZipFile and CP932 encoding -> ZipFile: add a filename_encoding argument _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 01:03:34 2011 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Feb 2011 00:03:34 +0000 Subject: [issue11022] locale.setlocale() doesn't change I/O codec, os.environ does In-Reply-To: <1296126025.04.0.965125504096.issue11022@psf.upfronthosting.co.za> Message-ID: <1296518614.25.0.811446496003.issue11022@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached patch replaces locale.getpreferredencoding() by locale.getpreferredencoding(False) in _io.TextIOWrapper and _pyio.TextIOWrapper. ---------- keywords: +patch Added file: http://bugs.python.org/file20637/io_dont_set_locale.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 01:05:46 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 01 Feb 2011 00:05:46 +0000 Subject: [issue11022] locale.setlocale() doesn't change I/O codec, os.environ does In-Reply-To: <1296126025.04.0.965125504096.issue11022@psf.upfronthosting.co.za> Message-ID: <1296518746.35.0.0807710540984.issue11022@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 03:02:22 2011 From: report at bugs.python.org (Owen) Date: Tue, 01 Feb 2011 02:02:22 +0000 Subject: [issue9884] The 4th parameter of method always None or 0 on x64 Windows. In-Reply-To: <1284714742.48.0.856656538994.issue9884@psf.upfronthosting.co.za> Message-ID: <1296525742.53.0.567487191938.issue9884@psf.upfronthosting.co.za> Owen added the comment: Thanks, this issue has been fixed. :-) fixing revisions: r88284 (3.2), r88285 (3.1) and r88286 (2.7) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 03:07:06 2011 From: report at bugs.python.org (Alex McNerney) Date: Tue, 01 Feb 2011 02:07:06 +0000 Subject: [issue11075] Turtle crash with IDLE on Mac OS X 10.6 In-Reply-To: <1296451592.7.0.220170284749.issue11075@psf.upfronthosting.co.za> Message-ID: <1296526026.86.0.744511145615.issue11075@psf.upfronthosting.co.za> Alex McNerney added the comment: It may be because the program that I am trying to run automatically exits, I do not know yet how to keep a turtle program running (waiting for input). The only way I know so far is to use the function "exitonclick()," but when using that, my I cannot use any other mouseevents in my program. (Help?) Anyways, an example of a script that will cause turtle to hang/crash is even such a simple one as: " import turtle as t def flfr(): t.fd(10) t.lt(45) t.fd(10) t.rt(45) t.onkey(flfr, "Up") t.listen() " Is there anyway to keep a turtle program running, waiting for user interaction without using the exitonclick() function? Also, thank you for pointing out the maintenance svn, I did an svn checkout, compiled, and installed it and it fixed other problems that I was having with Python 2.7.1 ActiveState Tcl/Tk 8.5.9 (such as hanging when running a program when the shell isn't open.) Another quick question that you don't have to answer: is there anyway to ignore interaction (keystrokes, mouseclicks) while an onkey function is activated? Like if I make a function that takes 10 seconds to complete, can I ignore all interaction while that function is being run? Thank you for your time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 03:28:12 2011 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Feb 2011 02:28:12 +0000 Subject: [issue11075] Turtle crash with IDLE on Mac OS X 10.6 In-Reply-To: <1296451592.7.0.220170284749.issue11075@psf.upfronthosting.co.za> Message-ID: <1296527292.42.0.590125452899.issue11075@psf.upfronthosting.co.za> R. David Murray added the comment: Well, the bug tracker isn't really the place to get help on using Python. I would suggest posting to python-list, you are more likely to find people with the time to help you there. You should also take a look at the Turtle demo programs, I'm pretty sure you can find your answers there as I know some of them are interactive. Turtle is designed to work from IDLE, so if it doesn't it's a bug. You haven't mentioned an actual crash of the python interpreter, so I'm changing the type to behavior. ---------- nosy: +r.david.murray type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 03:43:24 2011 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Feb 2011 02:43:24 +0000 Subject: [issue11022] locale.setlocale() doesn't change I/O codec, os.environ does In-Reply-To: <1296126025.04.0.965125504096.issue11022@psf.upfronthosting.co.za> Message-ID: <1296528204.06.0.564576662798.issue11022@psf.upfronthosting.co.za> R. David Murray added the comment: Steffan: I'm not sure what your post means, but I think there is a chance you might be confused about something. Python should *never* change the locale from the C locale. A Python *program* can do so, by calling setlocale, but Python itself should not. This is because when an arbitrary Python program is run, it needs to run in the C locale *unless it chooses otherwise*. To do anything else would produce a myriad portability problems for any code that is affected by locale settings (especially when the programmer doesn't know that it is so affected). This is orthogonal to the issue of deciding what encoding to use for various bits of I/O, where Python may need to discover what locale the user has chosen as a default. It's too bad libc makes this so hard to do safely. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 05:06:25 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 01 Feb 2011 04:06:25 +0000 Subject: [issue11086] add lib2to3/__main__.py In-Reply-To: <1296507167.64.0.584286117272.issue11086@psf.upfronthosting.co.za> Message-ID: <1296533185.86.0.942908617838.issue11086@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It is unfortunate that the cute name for the tool is not valid as a module name. How about renaming "lib2to3" to "to3". The offending leading digit is strictly redundant (there is no 1to3 after all). ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 05:27:05 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 01 Feb 2011 04:27:05 +0000 Subject: [issue1215] Python hang when catching a segfault In-Reply-To: <1190912724.9.0.418130471784.issue1215@psf.upfronthosting.co.za> Message-ID: <1296534425.38.0.180268016903.issue1215@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The consensus is that this is not a crash (and not even a bug). I am not sure what is the proper type for doc enhancement, but is certainly should not show up in a search for crashers. ---------- components: -Interpreter Core nosy: +belopolsky type: crash -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 05:37:38 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 01 Feb 2011 04:37:38 +0000 Subject: [issue886488] popen2 on Windows does not check _fdopen return value Message-ID: <1296535058.72.0.110695730092.issue886488@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- stage: unit test needed -> needs patch title: WinPython 2.3.3 crashes using popen2 to spawn lots of child -> popen2 on Windows does not check _fdopen return value _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 06:00:49 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 01 Feb 2011 05:00:49 +0000 Subject: [issue7074] Turtle module crashes python In-Reply-To: <1254872370.89.0.72942382773.issue7074@psf.upfronthosting.co.za> Message-ID: <1296536449.96.0.0897260034863.issue7074@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I can reproduce the crash on OSX. After ~ 100 keystrokes, I get the following diagnostics: Exception in Tkinter callback Traceback (most recent call last): File "/Users/sasha/Work/python-svn/py3k-commit/Lib/tkinter/__init__.py", line 1399, in __call__ return self.func(*args) File "/Users/sasha/Work/python-svn/py3k-commit/Lib/turtle.py", line 701, in eventfun fun() File "turtlecrash.py", line 12, in klt def klt(): seth(180); fd(vel) File "", line 1, in seth File "/Users/sasha/Work/python-svn/py3k-commit/Lib/turtle.py", line 1936, in setheading self._rotate(angle) File "/Users/sasha/Work/python-svn/py3k-commit/Lib/turtle.py", line 3277, in _rotate self._update() File "/Users/sasha/Work/python-svn/py3k-commit/Lib/turtle.py", line 2660, in _update self._update_data() File "/Users/sasha/Work/python-svn/py3k-commit/Lib/turtle.py", line 2651, in _update_data self._pencolor, self._pensize) File "/Users/sasha/Work/python-svn/py3k-commit/Lib/turtle.py", line 545, in _drawline self.cv.coords(lineitem, *cl) File "", line 1, in coords RuntimeError: maximum recursion depth exceeded Fatal Python error: Cannot recover from stack overflow. Abort trap ---------- nosy: +belopolsky type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 06:10:32 2011 From: report at bugs.python.org (Brett Cannon) Date: Tue, 01 Feb 2011 05:10:32 +0000 Subject: [issue11086] add lib2to3/__main__.py In-Reply-To: <1296507167.64.0.584286117272.issue11086@psf.upfronthosting.co.za> Message-ID: <1296537032.59.0.158412261475.issue11086@psf.upfronthosting.co.za> Brett Cannon added the comment: Would needlessly break code for such a minor perk. I mean I doubt very many people will use this feature if it goes in. It's just rather nice for those who do want the feature to exist in the first place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 06:14:27 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 01 Feb 2011 05:14:27 +0000 Subject: [issue7074] Turtle module crashes python In-Reply-To: <1254872370.89.0.72942382773.issue7074@psf.upfronthosting.co.za> Message-ID: <1296537267.46.0.477970342181.issue7074@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This looks like a duplicate of issue11029. It is not safe to call graphic primitives in event callbacks. A workaround is described at . ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Crash, 2.7.1, Tkinter and threads and line drawing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 06:24:06 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 01 Feb 2011 05:24:06 +0000 Subject: [issue7330] PyUnicode_FromFormat segfault In-Reply-To: <1258314153.95.0.978747695294.issue7330@psf.upfronthosting.co.za> Message-ID: <1296537846.2.0.938383560571.issue7330@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- components: +Unicode nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 06:30:10 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 01 Feb 2011 05:30:10 +0000 Subject: [issue7574] PyUnicode_FromFormat broken and not documented for 2.x In-Reply-To: <1261655681.25.0.454963458841.issue7574@psf.upfronthosting.co.za> Message-ID: <1296538210.24.0.519881297327.issue7574@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Documentation part of this issue will be addressed in #10435. ---------- nosy: +belopolsky resolution: -> duplicate stage: needs patch -> committed/rejected superseder: -> PyUnicode_FromFormat segfault _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 08:57:33 2011 From: report at bugs.python.org (Jurjen N.E. Bos) Date: Tue, 01 Feb 2011 07:57:33 +0000 Subject: [issue11087] Speeding up the interpreter with a few lines of code In-Reply-To: <1296547053.5.0.194611271072.issue11087@psf.upfronthosting.co.za> Message-ID: <1296547053.5.0.194611271072.issue11087@psf.upfronthosting.co.za> New submission from Jurjen N.E. Bos : I found a very simple way to improve the speed of CPython a few percent on the most common platforms (i.e. x86), at the cost of only a few lines of code in ceval.c The only problem is that I don't have any experience in patch submission. Here are the suggested new lines (also see submitted file): #define NEXTARG() (next_instr +=2, *(unsigned short*)&next_instr[-2]) #define PEEKARG() (*(unsigned short*)&next_instr[1]) of course this code only works on little-endian processors that allow nonaligned shorts; a change to configure might be needed (*shiver*). Hope you like it. ---------- components: Interpreter Core files: speedpatch.c messages: 127686 nosy: jneb priority: normal severity: normal status: open title: Speeding up the interpreter with a few lines of code type: performance versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20638/speedpatch.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 09:37:01 2011 From: report at bugs.python.org (Alex McNerney) Date: Tue, 01 Feb 2011 08:37:01 +0000 Subject: [issue11075] Turtle crash with IDLE on Mac OS X 10.6 In-Reply-To: <1296451592.7.0.220170284749.issue11075@psf.upfronthosting.co.za> Message-ID: <1296549421.52.0.785842645017.issue11075@psf.upfronthosting.co.za> Alex McNerney added the comment: Sorry to keep bothering, but running Python 2.7.1:88286 (maintenance) on ActiveState Tcl/Tk 8.5.9 causes the idle to hang when a simple script like: " x = raw_input("x: ") print x " is run. Is this a bug in Tcl/Tk? Looking in the logs I see several instances of "setCanCycle: is deprecated. Please use setCollectionBehavior instead" Does this have any relevancy? Relating to this, I don't know if it is proper to ask here, but is it possible to link Python to a specific Tcl/Tk when compiling from the source? Note: When running Python 2.7.1 (32-bit from installer) with Tcl/Tk 8.4, the above problem is not there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 09:42:55 2011 From: report at bugs.python.org (=?utf-8?q?Mads_Dar=C3=B8_Kristensen?=) Date: Tue, 01 Feb 2011 08:42:55 +0000 Subject: [issue4735] An error occurred during the installation of assembly In-Reply-To: <1230086140.51.0.868984437874.issue4735@psf.upfronthosting.co.za> Message-ID: <1296549775.02.0.680358085626.issue4735@psf.upfronthosting.co.za> Mads Dar? Kristensen added the comment: I have this problem using Python 2.7.1 on a 32-bit Windows 7 PC. ---------- nosy: +madsdk versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 10:01:08 2011 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 01 Feb 2011 09:01:08 +0000 Subject: [issue11084] Serialization of decimal.Decimal to XML-RPC In-Reply-To: <1296502651.44.0.847909816314.issue11084@psf.upfronthosting.co.za> Message-ID: <1296550868.06.0.51552355095.issue11084@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 10:55:40 2011 From: report at bugs.python.org (Daniel Urban) Date: Tue, 01 Feb 2011 09:55:40 +0000 Subject: [issue11085] expose _abcoll as collections.abc In-Reply-To: <1296503066.28.0.738947830383.issue11085@psf.upfronthosting.co.za> Message-ID: <1296554140.77.0.0382843295221.issue11085@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +durban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 11:35:15 2011 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 01 Feb 2011 10:35:15 +0000 Subject: [issue8998] add crypto routines to stdlib In-Reply-To: <1276551598.69.0.32913607148.issue8998@psf.upfronthosting.co.za> Message-ID: <1296556515.31.0.748863788894.issue8998@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 11:46:50 2011 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Feb 2011 10:46:50 +0000 Subject: [issue11075] Using Turtle with IDLE on Mac OS X In-Reply-To: <1296451592.7.0.220170284749.issue11075@psf.upfronthosting.co.za> Message-ID: <1296557210.54.0.074017413354.issue11075@psf.upfronthosting.co.za> Ned Deily added the comment: Now that I looked at the documentation (http://docs.python.org/library/turtle.html), I see that it is clear that Turtle is designed to work from IDLE *but*, as is noted, "when using the module from within IDLE run with the -n switch", which means run IDLE without a subprocess. What may not be so obvious is how to do that on Mac OS X. Double-clicking on IDLE.app launches it with default values including a subprocess and there is no straightforward to override those. From a terminal shell, it is easy to start bin/idle: $ idle2.7 -n although that has a few cosmetic disadvantages with bin/idle over IDLE.app (for example, the application name displayed is "Python" not "IDLE"). It has aways been possible to launch an OS X GUI app from a shell command line using the open(1) command; as of OS X 10.6 it is now also possible to pass regular command line arguments to the application. So the following would work in 10.6 and probably be preferable: $ open -a "/Applications/Python 2.7/IDLE.app" --args -n If you want to have a double-clickable application, a simple approach is to create a launcher application with AppleScript: $ osacompile -o 'IDLE-n.app' < do shell script "open -a '/Applications/Python 2.7/IDLE.app' --args -n" > EOF As someone not used to using Turtle and given the intended user base for Turtle, I wonder whether the current Turtle module documentation is sufficient on this point. Two possible actions I could see are: (1) expanding the documentation to include a suggestion like the above to allow for an OS X clickable app; and/or (2) actually supplying such a simple no-subprocess app with the standard python.org installer distribution (or some other solution). How is this issue handled on Windows? Is there a need to expand the documentation in general? (adding Raymond to the nosy list) ---------- nosy: +rhettinger title: Turtle crash with IDLE on Mac OS X 10.6 -> Using Turtle with IDLE on Mac OS X versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 11:52:58 2011 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Feb 2011 10:52:58 +0000 Subject: [issue7330] PyUnicode_FromFormat segfault In-Reply-To: <1258314153.95.0.978747695294.issue7330@psf.upfronthosting.co.za> Message-ID: <1296557578.89.0.778921995216.issue7330@psf.upfronthosting.co.za> STINNER Victor added the comment: I opened other tickets related to PyUnicode_FromFormatV: * #10833 :Replace %.100s by %s in PyErr_Format(): the arbitrary limit of 500 bytes is outdated * #10831: PyUnicode_FromFormatV() doesn't support %li, %lli, %zi * #10830: PyUnicode_FromFormatV("%c") doesn't support non-BMP characters on narrow build * #10829: PyUnicode_FromFormatV() bugs with "%" and "%%" format strings (see also #10832: Add support of bytes objects in PyBytes_FromFormatV()) PyUnicode_FromFormatV() has now tests in test_unicode: issue_7330.diff should add new tests, at least to check that %20R doesn't crash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 12:02:52 2011 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Feb 2011 11:02:52 +0000 Subject: [issue11088] IDLE on OS X with Cocoa Tk 8.5 can hang waiting on input / raw_input In-Reply-To: <1296558172.37.0.962954496382.issue11088@psf.upfronthosting.co.za> Message-ID: <1296558172.37.0.962954496382.issue11088@psf.upfronthosting.co.za> New submission from Ned Deily : As reported by Alex McNerney in Issue11075 msg127687: "... running Python 2.7.1:88286 (maintenance) [built from source] on ActiveState Tcl/Tk 8.5.9 causes the idle to hang when a simple script like: " x = raw_input("x: ") print x " is run. Is this a bug in Tcl/Tk? Looking in the logs I see several instances of "setCanCycle: is deprecated. Please use setCollectionBehavior instead" Does this have any relevancy?" I can reproduce the problem using input with Cocoa Tk 8.5 and Python 3.2rc2 or raw_input with Python 2.7.1+. It does not seem to happen with Carbon Tk 8.4. This may be related to Issue10940. Investigating further for impact on 3.2. ---------- assignee: ned.deily components: IDLE, Macintosh messages: 127691 nosy: amcnerney13, ned.deily priority: critical severity: normal status: open title: IDLE on OS X with Cocoa Tk 8.5 can hang waiting on input / raw_input type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 12:13:06 2011 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Feb 2011 11:13:06 +0000 Subject: [issue11075] Using Turtle with IDLE on Mac OS X In-Reply-To: <1296451592.7.0.220170284749.issue11075@psf.upfronthosting.co.za> Message-ID: <1296558786.84.0.723847285263.issue11075@psf.upfronthosting.co.za> Ned Deily added the comment: [Please don't add new topics to the same tracker issue. As David mentioned, it would be better to ask for help on one of the user lists to be sure before opening an issue. Besides the general python-list, there is an active OS X users list (pythonmac-sig) where you will find users of IDLE; see http://www.python.org/community/sigs/ That said, to address your most recent message, that appears to indeed be a problem. I've opened Issue11088 for it. The "setCanCycle: is deprecated" messages are a harmless artifact; they should disappear in an upcoming maintenance release of ActiveState Tcl 8.5.] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 12:58:24 2011 From: report at bugs.python.org (Steffen Daode Nurpmeso) Date: Tue, 01 Feb 2011 11:58:24 +0000 Subject: [issue11022] locale.setlocale() doesn't change I/O codec, os.environ does In-Reply-To: <1296126025.04.0.965125504096.issue11022@psf.upfronthosting.co.za> Message-ID: <1296561504.53.0.108765419984.issue11022@psf.upfronthosting.co.za> Steffen Daode Nurpmeso added the comment: Most of this is much too loud for a newbie who is about to read PEP 7 anyway. And if this community has chosen to try (?!?) not to break compatibility with code which does not have a notion of a locale setting (i.e. naively uses other code in that spirit), you know, then this is simply the way it is. Thus: you're right. I do agree with what you say, we here have a (8-bit) C++ library which does this in it's setup(): // Initialize those Locale variables we're responsible for Locale::_ctype_cclass = Locale::_posix_cclass; Locale::_ctype_ccase = Locale::_posix_ccase; (Like i said: we here went completely grazy and avoid system libraries whenever possible and at least directly, doing the stuff ourselfs and only with syscalls.) Besides that i would agree with me that unthreaded init, optional embeddor locale argument, cleanup of .getprefer...() and other drops of setlocale() are/would be good design decisions. And of course: "keeping the thing simple and understandable" is a thing to keep in mind in respect to a normal user. After the end (i have to excuse myself once again for a book): I, f.e., opened an issue 11059 on saturday because the HG repo was (2.7 may still be) not cloneable, and i did so at selenic, too. Notes on that: - pitrou closed it because this tracker is of course for Python bugs. (I asked him to decide - thanks.) - The selenic people told me that i added my trace to a completely wrong issue. (Just searched - that's more than shown in trace dump.) - I've found out that many, *many* issues seem to have been created due to this repo failure at python.org (at selenic), and i've added a note that they possibly should include a prominent notice that people should look for "most recent call last" before creating a new one. (I guess that most of these people are programmers - who else uses HG?) - Conclusion: maybe even os.environ[]= == locale.setlocale() is not simple minded enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 13:40:24 2011 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Feb 2011 12:40:24 +0000 Subject: [issue11079] Make OS X entry in Applications like that in Windows In-Reply-To: <1296490743.96.0.234780831636.issue11079@psf.upfronthosting.co.za> Message-ID: <1296564024.31.0.408327208744.issue11079@psf.upfronthosting.co.za> Ned Deily added the comment: I agree that adding a link to the installed documentation set would be an improvement. Currently, the only easy way to find it is within IDLE: Help -> Python Docs (or F1). I'll propose an installer patch for that for 3.2. -0.5 for removing the Extras directory. Prior to Python 3.2, it contained the contents of the Demo directory. For 3.2, the Demo directory was pruned and relocated to Tools, which had not previously been installed anywhere by OS X installers. Also, there has been at least one request to make some of the contents of Tools available on OS X, i.e. unittestgui. For those reasons, I added Tools under Extras for 3.2. I agree that much of the contents is not particularly useful from, say, IDLE. But the Python Launcher will run them under a command line and users can easily drag/drop any of onto a python command line in a terminal shell or just cd there and can also use the Finder's Get Info to change the application associated with them. That said, the launching of Python scripts in OS X is currently is currently somewhat fragile and unintuitive (in the presence of multiple Python versions) and in need of some work post-3.2; see, for instance, Issue5262. Due to OS X's multiple personalities and interaction styles (Classic Mac, command line UNIX, X-based apps, etc), it's also difficult to assess exactly how the python.org installed Pythons are being used on OS X. My guess, though, is that a majority of our users these days primarily or exclusively use Python from a command line so it would be good to not neglect their needs. The issue of uninstalling has come up before, most recently (IIRC) in Issue7107. Unfortunately, the Mac/README file updated there is not installed. I would be +0.5 at looking into it further as time permits while recognizing that there would need to be caveats like potentially wiping out installed system-wide site-packages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 13:42:38 2011 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 01 Feb 2011 12:42:38 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1296564158.49.0.743412542341.issue10227@psf.upfronthosting.co.za> Stefan Behnel added the comment: I've extracted and fixed the part of this patch that implements the slice object cache. In particular, PySlice_Fini() was incorrectly implemented. This patch applies cleanly for me against the latest py3k branch. ---------- Added file: http://bugs.python.org/file20639/slice-object-cache.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 14:16:06 2011 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Feb 2011 13:16:06 +0000 Subject: [issue11075] Using Turtle with IDLE on Mac OS X In-Reply-To: <1296451592.7.0.220170284749.issue11075@psf.upfronthosting.co.za> Message-ID: <1296566166.39.0.249087748982.issue11075@psf.upfronthosting.co.za> R. David Murray added the comment: Ned: I read the bits in the turtle docs about -n as meaning *if* you use -n *then* you should set this profile option (but if you don't, things should work). I didn't go over the docs in detail, though, so maybe I'm misreading. Since you and I clearly don't know what we are talking about in detail, I'm adding Gregor and Alexander (the latter since he's clearly been using it) to nosy. ---------- assignee: ned.deily -> nosy: +belopolsky, gregorlingl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 14:17:09 2011 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Feb 2011 13:17:09 +0000 Subject: [issue11075] Using Turtle with IDLE on Mac OS X In-Reply-To: <1296451592.7.0.220170284749.issue11075@psf.upfronthosting.co.za> Message-ID: <1296566229.19.0.956819891324.issue11075@psf.upfronthosting.co.za> Ned Deily added the comment: It's clear from testing it and from some searches that -n is, in fact, required. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 14:31:52 2011 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 01 Feb 2011 13:31:52 +0000 Subject: [issue11079] Make OS X entry in Applications like that in Windows In-Reply-To: <1296490743.96.0.234780831636.issue11079@psf.upfronthosting.co.za> Message-ID: <1296567112.71.0.184834903706.issue11079@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm -0 on removing extras. Having extra's at this location makes it easier to discover them. Adding a link to the documention is a good idea, it makes the documentation easier to use without starting IDLE. Adding an uninstall option would be nice, but that requires significant work and is not something to be added before 3.2. Adding an installer requires us to write a script that does the work because while OSX has an installer it doesn't have the corresponding uninstaller. Such a script should only be added after carefully testing it, there is a significant risk that bugs in the script could erase too much content. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 15:04:42 2011 From: report at bugs.python.org (Vasilis) Date: Tue, 01 Feb 2011 14:04:42 +0000 Subject: [issue11089] ConfigParser 50x slower in 2.7 In-Reply-To: <1296569082.9.0.874258670374.issue11089@psf.upfronthosting.co.za> Message-ID: <1296569082.9.0.874258670374.issue11089@psf.upfronthosting.co.za> New submission from Vasilis : The ConfigParser class in 2.7 is almost >50 times slower than in the 2.6 which for large files it renders it almost unusable. Actually the speed decrease depends on the amount of the stored data Results from test program: Python 2.7 (r27:82500, Sep 16 2010, 18:02:00) on 3.5GHz Fedora14 64bit machine ConfigParser 166.307140827 RawConfigParser 0.1887819767 Python 2.6.4 (r264:75706, Jun 4 2010, 18:20:31) on 3.0GHz Fedora13 64bit machine ConfigParser 4.24494099617 RawConfigParser 0.172905921936 ---------- components: Extension Modules files: ConfigParserTest.py messages: 127699 nosy: vlachoudis priority: normal severity: normal status: open title: ConfigParser 50x slower in 2.7 type: performance versions: Python 2.7 Added file: http://bugs.python.org/file20640/ConfigParserTest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 15:13:24 2011 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Feb 2011 14:13:24 +0000 Subject: [issue11075] Using Turtle with IDLE on Mac OS X In-Reply-To: <1296451592.7.0.220170284749.issue11075@psf.upfronthosting.co.za> Message-ID: <1296569604.21.0.131081463619.issue11075@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, in that case I think the docs could be improved on that point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 15:20:41 2011 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 01 Feb 2011 14:20:41 +0000 Subject: [issue10214] Misc/python-mode.el is out of date. In-Reply-To: <1288185188.37.0.749151956354.issue10214@psf.upfronthosting.co.za> Message-ID: <1296570041.48.0.111906735693.issue10214@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Please ignore, testing roundup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 15:21:55 2011 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Feb 2011 14:21:55 +0000 Subject: [issue11075] Using Turtle with IDLE on Mac OS X In-Reply-To: <1296451592.7.0.220170284749.issue11075@psf.upfronthosting.co.za> Message-ID: <1296570115.86.0.482362346277.issue11075@psf.upfronthosting.co.za> Ned Deily added the comment: I saw this post by Gregor: http://thread.gmane.org/gmane.comp.python.general/334881/focus=334996 I don't know applicable it still is on Windows. But it does seem to be still true on OS X. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 15:23:35 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 01 Feb 2011 14:23:35 +0000 Subject: [issue11089] ConfigParser 50x slower in 2.7 In-Reply-To: <1296569082.9.0.874258670374.issue11089@psf.upfronthosting.co.za> Message-ID: <1296570215.06.0.395666366035.issue11089@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> lukasz.langa nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 15:30:27 2011 From: report at bugs.python.org (Skip Montanaro) Date: Tue, 01 Feb 2011 14:30:27 +0000 Subject: [issue11089] ConfigParser 50x slower in 2.7 In-Reply-To: <1296569082.9.0.874258670374.issue11089@psf.upfronthosting.co.za> Message-ID: <1296570627.87.0.702137059593.issue11089@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- nosy: +skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 16:23:43 2011 From: report at bugs.python.org (Michael Foord) Date: Tue, 01 Feb 2011 15:23:43 +0000 Subject: [issue11090] Doc errors for unittest in Python 3.1 In-Reply-To: <1296573823.39.0.448811226108.issue11090@psf.upfronthosting.co.za> Message-ID: <1296573823.39.0.448811226108.issue11090@psf.upfronthosting.co.za> New submission from Michael Foord : Looks like some unittest doc changes got incorrectly backported to Python 3.1. For example the command line features using -m are new in 3.2 and don't work with 3.1: http://docs.python.org/py3k/library/unittest.html#command-line-interface ---------- assignee: michael.foord components: Documentation messages: 127703 nosy: michael.foord priority: normal severity: normal status: open title: Doc errors for unittest in Python 3.1 versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 16:48:38 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 01 Feb 2011 15:48:38 +0000 Subject: [issue11071] What's New review comments In-Reply-To: <1296394185.46.0.874389567772.issue11071@psf.upfronthosting.co.za> Message-ID: <1296575318.39.0.0127708218351.issue11071@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 18:05:48 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 01 Feb 2011 17:05:48 +0000 Subject: [issue11049] add tests for test.support In-Reply-To: <1296241531.97.0.670133219758.issue11049@psf.upfronthosting.co.za> Message-ID: <1296579948.67.0.491569029977.issue11049@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 18:41:09 2011 From: report at bugs.python.org (=?utf-8?b?0KHQtdGA0LPQtdC5INCn0YPQv9GA0LDQutC+0LI=?=) Date: Tue, 01 Feb 2011 17:41:09 +0000 Subject: [issue11091] Bug with reimport in pkg_resources In-Reply-To: <1296582069.56.0.625314817916.issue11091@psf.upfronthosting.co.za> Message-ID: <1296582069.56.0.625314817916.issue11091@psf.upfronthosting.co.za> New submission from ?????? ???????? : import pkg_resources change path of already imported module this break google appengine because It use "google.__file__" to determine sdk directory. Ubuntu 10.10 ~/lib/google_appengine$ python Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from appcfg import fix_sys_path >>> fix_sys_path() >>> import google >>> google >>> import pkg_resources >>> google >>> ls /usr/lib/pymodules/python2.6/google/ __init__.py __init__.pyc protobuf ---------- messages: 127704 nosy: ??????.???????? priority: normal severity: normal status: open title: Bug with reimport in pkg_resources type: resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 18:41:36 2011 From: report at bugs.python.org (=?utf-8?b?0KHQtdGA0LPQtdC5INCn0YPQv9GA0LDQutC+0LI=?=) Date: Tue, 01 Feb 2011 17:41:36 +0000 Subject: [issue11091] Bug with reimport in pkg_resources In-Reply-To: <1296582069.56.0.625314817916.issue11091@psf.upfronthosting.co.za> Message-ID: <1296582096.12.0.939687430025.issue11091@psf.upfronthosting.co.za> Changes by ?????? ???????? : ---------- components: +Build versions: +Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 18:41:52 2011 From: report at bugs.python.org (=?utf-8?b?0KHQtdGA0LPQtdC5INCn0YPQv9GA0LDQutC+0LI=?=) Date: Tue, 01 Feb 2011 17:41:52 +0000 Subject: [issue11091] Bug with reimport in pkg_resources In-Reply-To: <1296582069.56.0.625314817916.issue11091@psf.upfronthosting.co.za> Message-ID: <1296582112.69.0.973967490524.issue11091@psf.upfronthosting.co.za> Changes by ?????? ???????? : ---------- components: -Build _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 18:42:05 2011 From: report at bugs.python.org (=?utf-8?b?0KHQtdGA0LPQtdC5INCn0YPQv9GA0LDQutC+0LI=?=) Date: Tue, 01 Feb 2011 17:42:05 +0000 Subject: [issue11091] Bug with reimport in pkg_resources In-Reply-To: <1296582069.56.0.625314817916.issue11091@psf.upfronthosting.co.za> Message-ID: <1296582125.07.0.996939090717.issue11091@psf.upfronthosting.co.za> Changes by ?????? ???????? : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 18:42:36 2011 From: report at bugs.python.org (Julien Miotte) Date: Tue, 01 Feb 2011 17:42:36 +0000 Subject: [issue11092] Setup.cfg isn't packaged when running sdist In-Reply-To: <1296582156.21.0.82325099923.issue11092@psf.upfronthosting.co.za> Message-ID: <1296582156.21.0.82325099923.issue11092@psf.upfronthosting.co.za> New submission from Julien Miotte : Operating System: Ubuntu Maverick Version of Python: 2.6.6 Version of Distutils2: d355f123ac79 How to reproduce: Create a project bato with a setup.cfg, like this: [metadata] name = bato version = 1.0 Run: $ python -m distutils2.run sdist $ tar tf dist/bato-1.0.tar.gz What happens: The archive doesn't contain the setup.cfg file. ---------- assignee: tarek components: Distutils2 messages: 127705 nosy: Julien.Miotte, eric.araujo, tarek priority: normal severity: normal status: open title: Setup.cfg isn't packaged when running sdist versions: 3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 19:39:45 2011 From: report at bugs.python.org (Thijs Triemstra) Date: Tue, 01 Feb 2011 18:39:45 +0000 Subject: [issue4833] Explicit directories for zipfiles In-Reply-To: <1231088968.72.0.101458538333.issue4833@psf.upfronthosting.co.za> Message-ID: <1296585585.11.0.119582666165.issue4833@psf.upfronthosting.co.za> Changes by Thijs Triemstra : ---------- nosy: +thijs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 20:08:04 2011 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 01 Feb 2011 19:08:04 +0000 Subject: [issue11093] test_future - rename not-unittest files to redure regrtest.NOTTESTS an empty set In-Reply-To: <1296587284.84.0.269223815277.issue11093@psf.upfronthosting.co.za> Message-ID: <1296587284.84.0.269223815277.issue11093@psf.upfronthosting.co.za> New submission from Sandro Tosi : Hi, following up with issue10848, here's another preparatory step: - renamed test_future[12].py to future_test[12].py, to clearly identify the as not unittest files (and so facilitate the autodiscovery introduction) - adapted test_future.py for the filename change - at last, make NOTTESTS and empty set. I tested that both test_future only and the whole test suite are all ok. Let me know if you need anything more or done different :) (f.e.: David, do you want the documentation bits in issue11031 added here instead?) Cheers, Sandro ---------- assignee: sandro.tosi components: Tests files: test_future.patch keywords: patch messages: 127706 nosy: r.david.murray, sandro.tosi priority: low severity: normal stage: patch review status: open title: test_future - rename not-unittest files to redure regrtest.NOTTESTS an empty set versions: Python 3.3 Added file: http://bugs.python.org/file20641/test_future.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 20:08:20 2011 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 01 Feb 2011 19:08:20 +0000 Subject: [issue11093] test_future - rename not-unittest files to make regrtest.NOTTESTS an empty set In-Reply-To: <1296587284.84.0.269223815277.issue11093@psf.upfronthosting.co.za> Message-ID: <1296587300.62.0.174614204548.issue11093@psf.upfronthosting.co.za> Changes by Sandro Tosi : ---------- title: test_future - rename not-unittest files to redure regrtest.NOTTESTS an empty set -> test_future - rename not-unittest files to make regrtest.NOTTESTS an empty set _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 21:41:20 2011 From: report at bugs.python.org (Brett Cannon) Date: Tue, 01 Feb 2011 20:41:20 +0000 Subject: [issue11091] Bug with reimport in pkg_resources In-Reply-To: <1296582069.56.0.625314817916.issue11091@psf.upfronthosting.co.za> Message-ID: <1296592880.0.0.156797869333.issue11091@psf.upfronthosting.co.za> Brett Cannon added the comment: pkg_resources is not from Python but setuptools; you probably installed it and forgot it was there. I would suggest you do your App Engine development using virtualenv to make sure that you are working in a clean environment. ---------- nosy: +brett.cannon resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 21:43:06 2011 From: report at bugs.python.org (Brett Cannon) Date: Tue, 01 Feb 2011 20:43:06 +0000 Subject: [issue11085] expose _abcoll as collections.abc In-Reply-To: <1296503066.28.0.738947830383.issue11085@psf.upfronthosting.co.za> Message-ID: <1296592986.41.0.723830117318.issue11085@psf.upfronthosting.co.za> Brett Cannon added the comment: Importlib puts all of its ABCs in importlib.abc, so at least one package has already taken this approach. I for one support the collections.abc idea. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 23:02:59 2011 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Feb 2011 22:02:59 +0000 Subject: [issue11092] Setup.cfg isn't packaged when running sdist In-Reply-To: <1296582156.21.0.82325099923.issue11092@psf.upfronthosting.co.za> Message-ID: <1296597779.09.0.847408588488.issue11092@psf.upfronthosting.co.za> STINNER Victor added the comment: You can add it to MANIFEST.in. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 23:07:07 2011 From: report at bugs.python.org (Stefan Krah) Date: Tue, 01 Feb 2011 22:07:07 +0000 Subject: [issue11089] ConfigParser 50x slower in 2.7 In-Reply-To: <1296569082.9.0.874258670374.issue11089@psf.upfronthosting.co.za> Message-ID: <1296598027.64.0.313674385276.issue11089@psf.upfronthosting.co.za> Stefan Krah added the comment: If OrderedDict is used, the test case quickly uses 8GB of memory. With this change (I'm not suggesting this as a fix!), the timings are normal: Index: Lib/ConfigParser.py =================================================================== --- Lib/ConfigParser.py (revision 88298) +++ Lib/ConfigParser.py (working copy) @@ -92,6 +92,7 @@ except ImportError: # fallback for setup.py which hasn't yet built _collections _default_dict = dict +_default_dict = dict import re ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 1 23:33:25 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 01 Feb 2011 22:33:25 +0000 Subject: [issue11089] ConfigParser 50x slower in 2.7 In-Reply-To: <1296569082.9.0.874258670374.issue11089@psf.upfronthosting.co.za> Message-ID: <1296599605.16.0.195872973396.issue11089@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 02:46:45 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 02 Feb 2011 01:46:45 +0000 Subject: [issue11089] ConfigParser 50x slower in 2.7 In-Reply-To: <1296569082.9.0.874258670374.issue11089@psf.upfronthosting.co.za> Message-ID: <1296611205.34.0.531309667501.issue11089@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Commenting-out the ``c.set(section,"item#%d"%(i),str(i))`` calls shows that that is not where the problem lies for the ConfigParser() class. The issue seems confined to ConfigParser.get(). The RawConfigParser() class doesn't seem to have the same issue. Looking at the 2.7 code for ConfigParser.get() shows that it is doing a lot more than just getting. For example, it does a full copy of defaults dictionary on every call !? I'll look at it more shortly. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 00:57:25 2011 From: report at bugs.python.org (Brian Quinlan) Date: Tue, 01 Feb 2011 23:57:25 +0000 Subject: [issue10918] **kwargs unnecessarily restricted in concurrent.futures 'submit' API In-Reply-To: <1295192992.12.0.880697566702.issue10918@psf.upfronthosting.co.za> Message-ID: <1296604645.17.0.126840786823.issue10918@psf.upfronthosting.co.za> Brian Quinlan added the comment: Sorry for taking so long to reply - I was on holidays until today. This is an incompatible API change (since people may be providing "fn" by keyword) so we should probably hold off until 3.3. I also don't really like that the signature for submit will become less readable. And the fix is pretty trivial i.e. functools.partial. So really I'm -0 on this. But if anyone cares enough, I'll happily review and apply patches that change the submit signature to the one that Adrian proposed. def sugar(*args, **kw): return args[0].submit(args[1], args[2:], kw) ---------- resolution: wont fix -> accepted status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 00:16:24 2011 From: report at bugs.python.org (Yelena) Date: Tue, 01 Feb 2011 23:16:24 +0000 Subject: [issue11094] Runtime error In-Reply-To: <1296602184.41.0.81665541642.issue11094@psf.upfronthosting.co.za> Message-ID: <1296602184.41.0.81665541642.issue11094@psf.upfronthosting.co.za> New submission from Yelena : I've been using python to run some large database recently. I used dbfpy module to access some information stored in dbf format. However, after 20hrs of running it gave me an error of : Runtime Error! This application has requested the Runtime to terminate it in an unusual way.Please contact the application's support team for more information. The error popped out every time I ran them after 20 hrs. My prediction was that it ran over its memory usage, since it has been accumulating the memory usage when I was running the program. So I tried deleting/closing I/O immediately after they were processed. However, such changes did not make any difference in memory usage accumulation. Could you please give me some advice in fixing problems like this? Thank you. ---------- components: Windows files: test2 messages: 127711 nosy: yelenawu priority: normal severity: normal status: open title: Runtime error type: crash versions: Python 2.7 Added file: http://bugs.python.org/file20642/test2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 03:28:41 2011 From: report at bugs.python.org (kai zhu) Date: Wed, 02 Feb 2011 02:28:41 +0000 Subject: [issue11095] subprocess popen broken for bytes and backslash In-Reply-To: <1296613721.25.0.259420075945.issue11095@psf.upfronthosting.co.za> Message-ID: <1296613721.25.0.259420075945.issue11095@psf.upfronthosting.co.za> New submission from kai zhu : noticed when trying to call grep w/ backslashes in regexp, in shell mode. same behavior on python2.5 & python3.2 in shell mode: 1. bytes is broken 2. 1st character after backslash is always silently truncated (with exception of '\\') $ python3.2 Python 3.2rc1+ (py3k, Jan 24 2011, 15:00:02) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import subprocess >>> subprocess.call(b'echo aa', shell = True) ## bytes broken Traceback (most recent call last): File "", line 1, in File "/home/public/i486-pc-linux-gnu/lib/python3.2/subprocess.py", line 460, in call return Popen(*popenargs, **kwargs).wait() File "/home/public/i486-pc-linux-gnu/lib/python3.2/subprocess.py", line 736, in __init__ restore_signals, start_new_session) File "/home/public/i486-pc-linux-gnu/lib/python3.2/subprocess.py", line 1175, in _execute_child restore_signals, start_new_session, preexec_fn) TypeError: Can't convert 'int' object to str implicitly >>> subprocess.call('echo \aa', shell = True) ## backslash \ a 0 >>> subprocess.call('echo \\aa', shell = True) ## backslash \\ aa 0 >>> subprocess.call('echo \\\aa', shell = True) ## backslash \\\ a 0 >>> subprocess.call('echo \\\\aa', shell = True) ## backslash \\\\ a 0 >>> subprocess.call('echo \\\\\aa', shell = True) ## backslash \\\\\ \a 0 >>> subprocess.call('echo \\\\\\aa', shell = True) ## backslash \\\\\\ a 0 >>> subprocess.call('echo \\\\\\\\\\\\\\\\\\\\\\\\\aa', shell = True) \\\a 0 ---------- messages: 127714 nosy: kaizhu priority: normal severity: normal status: open title: subprocess popen broken for bytes and backslash type: behavior versions: Python 2.5, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 03:30:32 2011 From: report at bugs.python.org (kai zhu) Date: Wed, 02 Feb 2011 02:30:32 +0000 Subject: [issue11095] subprocess popen broken for bytes and backslash In-Reply-To: <1296613721.25.0.259420075945.issue11095@psf.upfronthosting.co.za> Message-ID: <1296613832.86.0.683451678998.issue11095@psf.upfronthosting.co.za> Changes by kai zhu : ---------- components: +IO, Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 03:43:22 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 02 Feb 2011 02:43:22 +0000 Subject: [issue11089] ConfigParser 50x slower in 2.7 In-Reply-To: <1296569082.9.0.874258670374.issue11089@psf.upfronthosting.co.za> Message-ID: <1296614602.54.0.0455158123219.issue11089@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Attaching a patch that fixes the algorithmic atrocities by using the Chainmap recipe: http://code.activestate.com/recipes/305268-chained-map-lookups ---------- keywords: +patch Added file: http://bugs.python.org/file20643/configparser.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 04:38:35 2011 From: report at bugs.python.org (Alex McNerney) Date: Wed, 02 Feb 2011 03:38:35 +0000 Subject: [issue11075] Using Turtle with IDLE on Mac OS X In-Reply-To: <1296451592.7.0.220170284749.issue11075@psf.upfronthosting.co.za> Message-ID: <1296617915.88.0.605933805176.issue11075@psf.upfronthosting.co.za> Alex McNerney added the comment: Thank you so much for pointing out the -n option! Hopefully the Tk 8.5.9 input issue will be solved soon enough. Thank you both again. I'm not sure if I'm supposed to or not, but I am marking this as closed ? seeing as the main issue has been solved. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 04:39:35 2011 From: report at bugs.python.org (Alex McNerney) Date: Wed, 02 Feb 2011 03:39:35 +0000 Subject: [issue11075] Using Turtle with IDLE on Mac OS X In-Reply-To: <1296451592.7.0.220170284749.issue11075@psf.upfronthosting.co.za> Message-ID: <1296617975.3.0.548983963549.issue11075@psf.upfronthosting.co.za> Alex McNerney added the comment: solved* or rather, a workaround has been found. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 06:02:45 2011 From: report at bugs.python.org (Alex McNerney) Date: Wed, 02 Feb 2011 05:02:45 +0000 Subject: [issue11096] Multiple turtle tracers In-Reply-To: <1296622965.34.0.0682804917272.issue11096@psf.upfronthosting.co.za> Message-ID: <1296622965.34.0.0682804917272.issue11096@psf.upfronthosting.co.za> New submission from Alex McNerney : In Python 2.7 and 2.6 (only ones I have tried), there is a bug in the turtle module's tracer() function, when applying it to multiple turtles using the same value. When two turtles are defined (to draw simultaneously), and both turtles' tracers are set to the same number, one of the turtles does not end up following its tracer value. (It's a little hard to explain...look at/try the sample code) The following script will recreate this glitch: " from turtle import * t1 = Turtle() t2 = Turtle() for t in turtles(): t.ht() t.speed(0) t.tracer(10) t1.color("black") t2.color("red") for x in range(500): t1.forward(x) t2.forward(x) t1.left(144.5) t2.right(144.5) " ---------- messages: 127718 nosy: amcnerney13 priority: normal severity: normal status: open title: Multiple turtle tracers type: behavior versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 08:40:13 2011 From: report at bugs.python.org (Ned Deily) Date: Wed, 02 Feb 2011 07:40:13 +0000 Subject: [issue11075] Using Turtle with IDLE on Mac OS X In-Reply-To: <1296451592.7.0.220170284749.issue11075@psf.upfronthosting.co.za> Message-ID: <1296632413.47.0.815255165459.issue11075@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: -> ned.deily resolution: -> works for me stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 09:12:00 2011 From: report at bugs.python.org (Georg Brandl) Date: Wed, 02 Feb 2011 08:12:00 +0000 Subject: [issue11087] Speeding up the interpreter with a few lines of code In-Reply-To: <1296547053.5.0.194611271072.issue11087@psf.upfronthosting.co.za> Message-ID: <1296634320.35.0.546065313035.issue11087@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> pitrou nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 09:12:03 2011 From: report at bugs.python.org (Alex McNerney) Date: Wed, 02 Feb 2011 08:12:03 +0000 Subject: [issue11096] Multiple turtle tracers In-Reply-To: <1296622965.34.0.0682804917272.issue11096@psf.upfronthosting.co.za> Message-ID: <1296634323.88.0.58647992257.issue11096@psf.upfronthosting.co.za> Alex McNerney added the comment: To be more clear, in the sample code, the drawing animation of the red star-spiral is smooth, whereas the drawing animation of the black star-spiral is spasmodic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 09:14:32 2011 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 02 Feb 2011 08:14:32 +0000 Subject: [issue11097] MSI: Remove win32com dependency from installer generator In-Reply-To: <1296634472.0.0.346787074034.issue11097@psf.upfronthosting.co.za> Message-ID: <1296634472.0.0.346787074034.issue11097@psf.upfronthosting.co.za> New submission from anatoly techtonik : The MSI installer is generated using msilib.py from http://svn.python.org/projects/python/branches/release27-maint/Tools/msi that is dependent from external win32com module. We also have internal 'msilib' module that is unused for some reason. Is it possible to incrementally transition from Tools/msilib.py to builtin 'msilib'? See http://codereview.appspot.com/4080047/ for the start of the thread. ---------- components: Installation messages: 127720 nosy: loewis, techtonik priority: normal severity: normal status: open title: MSI: Remove win32com dependency from installer generator versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 09:15:53 2011 From: report at bugs.python.org (Georg Brandl) Date: Wed, 02 Feb 2011 08:15:53 +0000 Subject: [issue11085] expose _abcoll as collections.abc In-Reply-To: <1296503066.28.0.738947830383.issue11085@psf.upfronthosting.co.za> Message-ID: <1296634553.62.0.397263848592.issue11085@psf.upfronthosting.co.za> Georg Brandl added the comment: And what about those "collection" ABCs that aren't collections? These are at least * Hashable * Callable * ByteString * Iterator ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 09:16:29 2011 From: report at bugs.python.org (Georg Brandl) Date: Wed, 02 Feb 2011 08:16:29 +0000 Subject: [issue10918] **kwargs unnecessarily restricted in concurrent.futures 'submit' API In-Reply-To: <1295192992.12.0.880697566702.issue10918@psf.upfronthosting.co.za> Message-ID: <1296634589.64.0.762011898179.issue10918@psf.upfronthosting.co.za> Georg Brandl added the comment: Sure, a change to 3.2 is out of the question anyway right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 09:19:51 2011 From: report at bugs.python.org (Eric Smith) Date: Wed, 02 Feb 2011 08:19:51 +0000 Subject: [issue11095] subprocess popen broken for bytes and backslash In-Reply-To: <1296613721.25.0.259420075945.issue11095@psf.upfronthosting.co.za> Message-ID: <1296634791.09.0.235254595972.issue11095@psf.upfronthosting.co.za> Eric Smith added the comment: 1: subprocess.call is documented as taking a string, not bytes. If you think it should also take bytes, I suggest opening a separate bug as a feature request. 2: You're running into both Python and the shell escaping. If you have an odd number of backslashes, then python is converting '\a' into an ascii BEL character: http://docs.python.org/py3k/reference/lexical_analysis.html#string-literals For the remaining backslashes, Python is converting every 2 into a single backslash when it does its escaping, and the shell is doing the same thing, as is echo. That accounts for 8 backslashes becoming a single backslash in the output. ---------- nosy: +eric.smith resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 09:23:33 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 02 Feb 2011 08:23:33 +0000 Subject: [issue11085] expose _abcoll as collections.abc In-Reply-To: <1296503066.28.0.738947830383.issue11085@psf.upfronthosting.co.za> Message-ID: <1296635013.63.0.517211019164.issue11085@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > And what about those "collection" ABCs that aren't collections? Guido originally thought all these should live together and I don't see much of a win in separating them from the other. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 09:36:26 2011 From: report at bugs.python.org (Georg Brandl) Date: Wed, 02 Feb 2011 08:36:26 +0000 Subject: [issue11082] ValueError: Content-Length should be specified In-Reply-To: <1296501492.73.0.362770141375.issue11082@psf.upfronthosting.co.za> Message-ID: <1296635786.4.0.46974786955.issue11082@psf.upfronthosting.co.za> Georg Brandl added the comment: Senthil, could this be a regression of the recent urllib transfer-encoding changes? ---------- assignee: -> orsenthil nosy: +georg.brandl, orsenthil priority: normal -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 09:39:48 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 02 Feb 2011 08:39:48 +0000 Subject: [issue11089] ConfigParser 50x slower in 2.7 In-Reply-To: <1296569082.9.0.874258670374.issue11089@psf.upfronthosting.co.za> Message-ID: <1296635988.25.0.402192175529.issue11089@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed for 2.7 in r88318. Will make a similar fix for 3.1.4 and for 3.2.1. ---------- assignee: lukasz.langa -> rhettinger versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 09:58:49 2011 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 02 Feb 2011 08:58:49 +0000 Subject: [issue11067] Py_LIMITED_API breaks most PySomething_Check() functions In-Reply-To: <1296336887.12.0.12161660566.issue11067@psf.upfronthosting.co.za> Message-ID: <1296637129.65.0.786752104807.issue11067@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The fast subtype checks cannot be supported in the limited API, as the layout of type objects is intentionally not exposed. It would be possible to expose a getter for the type flags; the individual flag values *are* part of the ABI. I propose the attached patch, which replaces the fast subtype check with a slow one in the limited API. The patch would need to be extended to all subtype checks. It's not strictly necessary to include this patch into the 3.2 release; users could also explicitly call PyObject_IsSubclass as a work-around. The patch could then be added for 3.2.1. As another work-around, users can also use PyUnicode_CheckExact, which is even faster and might be correct in many cases as well. ---------- keywords: +patch Added file: http://bugs.python.org/file20644/unisub.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 10:13:34 2011 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 02 Feb 2011 09:13:34 +0000 Subject: [issue11082] ValueError: Content-Length should be specified In-Reply-To: <1296635786.4.0.46974786955.issue11082@psf.upfronthosting.co.za> Message-ID: Senthil Kumaran added the comment: The POST data should be bytes. So in the attached test case, instead of request = urllib.request.Request('http://does.not.matter', 'foo=bar') it should be: request = urllib.request.Request('http://does.not.matter', b'foo=bar') And the Content-Length will be calculated using this logic. mv = memoryview(data) Content-length = len(mv) * mv.itemsize Should we emphasize further that data should be bytes? I think error message can be improved here. This issue is not a blocker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 10:21:54 2011 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 02 Feb 2011 09:21:54 +0000 Subject: [issue11067] Py_LIMITED_API breaks most PySomething_Check() functions In-Reply-To: <1296336887.12.0.12161660566.issue11067@psf.upfronthosting.co.za> Message-ID: <1296638514.41.0.462941152961.issue11067@psf.upfronthosting.co.za> Changes by Martin v. L?wis : Removed file: http://bugs.python.org/file20644/unisub.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 10:22:05 2011 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 02 Feb 2011 09:22:05 +0000 Subject: [issue11067] Py_LIMITED_API breaks most PySomething_Check() functions In-Reply-To: <1296336887.12.0.12161660566.issue11067@psf.upfronthosting.co.za> Message-ID: <1296638525.64.0.34459966375.issue11067@psf.upfronthosting.co.za> Changes by Martin v. L?wis : Added file: http://bugs.python.org/file20645/unisub.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 10:30:04 2011 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 02 Feb 2011 09:30:04 +0000 Subject: [issue11067] Py_LIMITED_API breaks most PySomething_Check() functions In-Reply-To: <1296336887.12.0.12161660566.issue11067@psf.upfronthosting.co.za> Message-ID: <1296639004.54.0.0315401931195.issue11067@psf.upfronthosting.co.za> Changes by Martin v. L?wis : Removed file: http://bugs.python.org/file20645/unisub.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 10:31:03 2011 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 02 Feb 2011 09:31:03 +0000 Subject: [issue11067] Py_LIMITED_API breaks most PySomething_Check() functions In-Reply-To: <1296336887.12.0.12161660566.issue11067@psf.upfronthosting.co.za> Message-ID: <1296639063.59.0.890463663337.issue11067@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Reconsidering: it's better to use PyType_IsSubtype, as this matches better the fast check. ---------- Added file: http://bugs.python.org/file20646/unisub.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 10:47:27 2011 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 02 Feb 2011 09:47:27 +0000 Subject: [issue11094] Runtime error In-Reply-To: <1296602184.41.0.81665541642.issue11094@psf.upfronthosting.co.za> Message-ID: <1296640047.75.0.0704742571798.issue11094@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: For this kind of question you'd better ask on the comp.lang.python newsgroup. The bug tracker is not designed to get help. A remark though: to really debug the RuntimeError a C debugger is needed (and a debug build of Python). You'd better try to know why your script consumes more and more memory. There are certainly tools for this, and people on the python newsgroup will be happy to share them with you. ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 11:42:31 2011 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Feb 2011 10:42:31 +0000 Subject: [issue11082] ValueError: Content-Length should be specified In-Reply-To: <1296501492.73.0.362770141375.issue11082@psf.upfronthosting.co.za> Message-ID: <1296643351.02.0.697901709419.issue11082@psf.upfronthosting.co.za> STINNER Victor added the comment: Since r70638, the http client encodes unicode to ISO-8859-1: << RFC 2616 says that iso-8859-1 is the default charset for HTTP entity bodies, but we encoded strings using ascii. See http://bugs.python.org/issue5314. Changed docs and code to use iso-8859-1. >> ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 12:18:55 2011 From: report at bugs.python.org (Alexey Luchko) Date: Wed, 02 Feb 2011 11:18:55 +0000 Subject: [issue11098] syntax error at end of line in interactive python -u In-Reply-To: <1296645535.22.0.821023606978.issue11098@psf.upfronthosting.co.za> Message-ID: <1296645535.22.0.821023606978.issue11098@psf.upfronthosting.co.za> New submission from Alexey Luchko : Interactive python -u produces syntax error in win2k: > python -u Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> 1+1 File "", line 1 1+1 ^ SyntaxError: invalid syntax >>> import sys File "", line 1 import sys ^ SyntaxError: invalid syntax >>> Tried Python 2.5.4, 2.7.1 and 3.1.2 on the same win2k machine. The problem does not exist under mac os x 10.5 and freebsd 8.1. ---------- components: Windows messages: 127732 nosy: luch priority: normal severity: normal status: open title: syntax error at end of line in interactive python -u versions: Python 2.5, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 14:19:06 2011 From: report at bugs.python.org (lekma) Date: Wed, 02 Feb 2011 13:19:06 +0000 Subject: [issue10271] warnings.showwarning should allow any callable object In-Reply-To: <1288551215.82.0.402250167562.issue10271@psf.upfronthosting.co.za> Message-ID: <1296652746.28.0.348338266255.issue10271@psf.upfronthosting.co.za> Changes by lekma : ---------- keywords: +patch Added file: http://bugs.python.org/file20647/Issue10271.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 15:50:49 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 02 Feb 2011 14:50:49 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1296658249.33.0.261971161238.issue10227@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Any benchmark numbers for the slice cache? Also, is the call to PyObject_INIT necessary? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 16:12:29 2011 From: report at bugs.python.org (Virgil Dupras) Date: Wed, 02 Feb 2011 15:12:29 +0000 Subject: [issue11076] Iterable argparse Namespace In-Reply-To: <1296461103.49.0.397676179483.issue11076@psf.upfronthosting.co.za> Message-ID: <1296659549.38.0.328304884387.issue11076@psf.upfronthosting.co.za> Virgil Dupras added the comment: I went ahead and created a patch (with test and doc) making argparse.Namespace iterable. ---------- keywords: +patch -easy Added file: http://bugs.python.org/file20648/issue11076.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 16:31:29 2011 From: report at bugs.python.org (Jeffrey Harper) Date: Wed, 02 Feb 2011 15:31:29 +0000 Subject: [issue11099] Bytes pickled with 3.1 not unpickled with 2.7 correctly In-Reply-To: <1296660689.12.0.256726786227.issue11099@psf.upfronthosting.co.za> Message-ID: <1296660689.12.0.256726786227.issue11099@psf.upfronthosting.co.za> New submission from Jeffrey Harper : When a bytes object is pickled with 3.1 and then unpickled with 2.7, the results are incorrect. The example below shows that pickling b'abcdefg' in 3.1 and then unpickling in 2.7 produces the string '[97L, 98L, 99L, 100L, 101L, 102L, 103L]' The unpickling operation should return 'abcdefg'. C:\decompyle\jtest>c:\Python31\python Python 3.1.3 (r313:86834, Nov 27 2010, 18:30:53) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> file = open('test.pkl', 'wb') >>> import pickle >>> pickle.dump(b'abcdefg', file, 0) >>> exit() C:\decompyle\jtest>c:\python27\python Python 2.7 Stackless 3.1b3 060516 (release27-maint, Jul 22 2010, 18:58:18) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> file = open('test.pkl', 'rb') >>> import pickle >>> pickle.load(file) '[97L, 98L, 99L, 100L, 101L, 102L, 103L]' >>> ---------- components: Library (Lib), Unicode messages: 127735 nosy: jdharper priority: normal severity: normal status: open title: Bytes pickled with 3.1 not unpickled with 2.7 correctly versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 16:42:01 2011 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Feb 2011 15:42:01 +0000 Subject: [issue11098] syntax error at end of line in interactive python -u In-Reply-To: <1296645535.22.0.821023606978.issue11098@psf.upfronthosting.co.za> Message-ID: <1296661321.97.0.77930520851.issue11098@psf.upfronthosting.co.za> R. David Murray added the comment: This is fixed in py3k rc2, and thus will be fixed in 3.2. The trick will be figuring out which update fixed it, to see if we can backport to 3.1 and 2.7. Since issue 10841 touched stdio handling in Windows, I suspect that may be the source, so I'm adding Victor and Antoine to nosy since they worked that issue. On the other hand, given how long this issue has existed without anybody running in to it, it may not even be worth backporting....what's your use case for starting the interactive interpreter with -u? ---------- nosy: +haypo, pitrou, r.david.murray type: -> behavior versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 16:47:48 2011 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Feb 2011 15:47:48 +0000 Subject: [issue11099] Bytes pickled with 3.1 not unpickled with 2.7 correctly In-Reply-To: <1296660689.12.0.256726786227.issue11099@psf.upfronthosting.co.za> Message-ID: <1296661668.87.0.159605808052.issue11099@psf.upfronthosting.co.za> R. David Murray added the comment: Duplicate of issue 6784. (If you disagree explain why here, please.) ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> byte/unicode pickle incompatibilities between python2 and python3 type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 16:48:15 2011 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Feb 2011 15:48:15 +0000 Subject: [issue6784] byte/unicode pickle incompatibilities between python2 and python3 In-Reply-To: <1251287773.44.0.222300610244.issue6784@psf.upfronthosting.co.za> Message-ID: <1296661695.19.0.116833333362.issue6784@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +jdharper _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 17:05:47 2011 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Feb 2011 16:05:47 +0000 Subject: [issue11098] syntax error at end of line in interactive python -u In-Reply-To: <1296645535.22.0.821023606978.issue11098@psf.upfronthosting.co.za> Message-ID: <1296662747.77.0.975316144289.issue11098@psf.upfronthosting.co.za> STINNER Victor added the comment: Since r7409 (14 years ago), Python does set the binary binary mode on stdin and stdout (not stderr) if the -u flag is used: ---- if (unbuffered) { #if defined(MS_WINDOWS) || defined(__CYGWIN__) _setmode(fileno(stdin), O_BINARY); _setmode(fileno(stdout), O_BINARY); #endif #ifdef HAVE_SETVBUF setvbuf(stdin, (char *)NULL, _IONBF, BUFSIZ); setvbuf(stdout, (char *)NULL, _IONBF, BUFSIZ); setvbuf(stderr, (char *)NULL, _IONBF, BUFSIZ); #else /* !HAVE_SETVBUF */ setbuf(stdin, (char *)NULL); setbuf(stdout, (char *)NULL); setbuf(stderr, (char *)NULL); #endif /* !HAVE_SETVBUF */ } ---- If you would like to check that the problem is related to the binary mode, you can set the binary mode manually without the -u flag. Add the following code at the end of your site.py file: ---- import msvcrt msvcrt.setmode (0, os.O_BINARY) # stdin = 0 msvcrt.setmode (1, os.O_BINARY) # stdout = 1 msvcrt.setmode (2, os.O_BINARY) # stderr = 2 ---- Python 3.2 does always set the binary mode for all files (opened files but also stdin, stdout and stderr), which requires a fix in the parser because the parser didn't support Windows newlines (\r\n). See issue 10841 and the commit r87824 for more information. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 17:08:44 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 02 Feb 2011 16:08:44 +0000 Subject: [issue11033] ElementTree.fromstring doesn't work with Unicode In-Reply-To: <1296173256.62.0.363094614198.issue11033@psf.upfronthosting.co.za> Message-ID: <1296662924.26.0.92491328286.issue11033@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This works in 3.x: Python 3.2rc2+ (py3k:88279:88280, Feb 1 2011, 00:01:52) .. >>> from xml.etree import ElementTree >>> ElementTree.fromstring('?') In 2.x you need to encode unicode strings before passing them to ElementTree.fromstring(). For example: ---- # encoding: utf-8 from xml.etree import ElementTree t = ElementTree.fromstring(u'?'.encode('utf-8')) print t.text ---- This is not a bug because fromstring() unlike some other ElementTree methods is not documented to support unicode strings. Since 2.x is closed for new features, this has to be rejected. ---------- assignee: -> belopolsky nosy: +belopolsky resolution: -> rejected stage: -> committed/rejected status: open -> pending type: crash -> feature request versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 17:10:52 2011 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Feb 2011 16:10:52 +0000 Subject: [issue11033] ElementTree.fromstring doesn't work with Unicode In-Reply-To: <1296173256.62.0.363094614198.issue11033@psf.upfronthosting.co.za> Message-ID: <1296663052.55.0.662529837227.issue11033@psf.upfronthosting.co.za> STINNER Victor added the comment: > Since 2.x is closed for new features, this has to be rejected. We can explain in ElementTree documentation how to pass non-ASCII unicode strings: using explicit encoding to UTF-8. ---------- nosy: +haypo status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 17:33:09 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 02 Feb 2011 16:33:09 +0000 Subject: [issue11033] ElementTree.fromstring doesn't work with Unicode In-Reply-To: <1296663052.55.0.662529837227.issue11033@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Wed, Feb 2, 2011 at 11:10 AM, STINNER Victor wrote: .. > We can explain in ElementTree documentation how to pass non-ASCII unicode strings: using > explicit encoding to UTF-8. ElementTree.fromstring() ultimately calls ElementTree.XMLParser.feed() which is documented as follows: """ feed(data) Feeds data to the parser. data is encoded data. """ Maybe we can simply add "encoded" to the description of ElementTree.fromstring() argument as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 17:41:59 2011 From: report at bugs.python.org (Erik Krauss) Date: Wed, 02 Feb 2011 16:41:59 +0000 Subject: [issue11100] test_fdopen: close failed in file object destructor In-Reply-To: <1296664919.37.0.123111264864.issue11100@psf.upfronthosting.co.za> Message-ID: <1296664919.37.0.123111264864.issue11100@psf.upfronthosting.co.za> New submission from Erik Krauss : test_fdopen (in test_os) fails on Solaris 9/sparc with Python 2.7.1. FAIL: test_fdopen (test.test_os.TestInvalidFD) ---------------------------------------------------------------------- Traceback (most recent call last): File "/p01/app/tenv6/mercator/tmp_pythonbuild/Python-2.7.1/Lib/test/test_os.py", line 550, in helper self.check(getattr(os, f)) File "/p01/app/tenv6/mercator/tmp_pythonbuild/Python-2.7.1/Lib/test/test_os.py", line 562, in check % f) AssertionError: didn't raise a OSError with a bad file descriptor ---------- components: Tests files: test_os_failure.txt messages: 127743 nosy: ekrauss priority: normal severity: normal status: open title: test_fdopen: close failed in file object destructor versions: Python 2.7 Added file: http://bugs.python.org/file20649/test_os_failure.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 18:08:19 2011 From: report at bugs.python.org (William Wu) Date: Wed, 02 Feb 2011 17:08:19 +0000 Subject: [issue11082] ValueError: Content-Length should be specified In-Reply-To: <1296501492.73.0.362770141375.issue11082@psf.upfronthosting.co.za> Message-ID: <1296666499.37.0.0569557531053.issue11082@psf.upfronthosting.co.za> William Wu added the comment: If the POST data should be bytes which I also think reasonable, should urllib.parse.urlencode return bytes instead of str? >>> urllib.parse.urlencode({'foo': 'bar'}) 'foo=bar' >>> urllib.parse.urlencode({b'foo': b'bar'}) 'foo=bar' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 19:00:40 2011 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 02 Feb 2011 18:00:40 +0000 Subject: [issue10979] setUpClass exception causes explosion with "-b" In-Reply-To: <1295669611.84.0.453494131357.issue10979@psf.upfronthosting.co.za> Message-ID: <1296669640.58.0.409562234285.issue10979@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 19:11:32 2011 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Feb 2011 18:11:32 +0000 Subject: [issue1103350] send/recv SEGMENT_SIZE should be used more in socketmodule Message-ID: <1296670292.91.0.304867417979.issue1103350@psf.upfronthosting.co.za> R. David Murray added the comment: Looks like this was closed due to lack of appropriate people reviewing it, rather than because such a review was done. ---------- nosy: +brian.curtin, r.david.murray, tim.golden resolution: out of date -> status: closed -> open versions: +Python 3.3 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 19:11:46 2011 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Feb 2011 18:11:46 +0000 Subject: [issue1103350] send/recv SEGMENT_SIZE should be used more in socketmodule Message-ID: <1296670306.48.0.250045248298.issue1103350@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 19:48:35 2011 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 02 Feb 2011 18:48:35 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1296672515.45.0.746065091536.issue10227@psf.upfronthosting.co.za> Stefan Behnel added the comment: > Any benchmark numbers for the slice cache? I ran the list tests in pybench and got this: Test minimum run-time average run-time this other diff this other diff -------------------------------------------------------------------- ListSlicing: 66ms 67ms -2.2% 67ms 68ms -2.7% SmallLists: 61ms 64ms -4.5% 61ms 65ms -5.6% -------------------------------------------------------------------- Totals: 127ms 131ms -3.3% 128ms 133ms -4.1% Repeating this gave me anything between 1.5% and 3.5% in total, with >2% for the small lists benchmark (which is the expected best case as slicing large lists obviously dominates the slice object creation). IMHO, even 2% would be pretty good for such a small change. > Also, is the call to PyObject_INIT necessary? In any case, the ref-count needs to be re-initialised to 1. A call to _Py_NewReference() would be enough, though, following the example in listobject.c. So you can replace PyObject_INIT(obj, &PySlice_Type); by _Py_NewReference((PyObject *)obj); in the patch. New patch attached. ---------- Added file: http://bugs.python.org/file20650/slice-object-cache.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 19:54:17 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 02 Feb 2011 18:54:17 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1296672515.45.0.746065091536.issue10227@psf.upfronthosting.co.za> Message-ID: <1296672852.3718.16.camel@localhost.localdomain> Antoine Pitrou added the comment: > I ran the list tests in pybench and got this: > > Test minimum run-time average run-time > this other diff this other diff > -------------------------------------------------------------------- > ListSlicing: 66ms 67ms -2.2% 67ms 68ms -2.7% > SmallLists: 61ms 64ms -4.5% 61ms 65ms -5.6% > -------------------------------------------------------------------- > Totals: 127ms 131ms -3.3% 128ms 133ms -4.1% > > Repeating this gave me anything between 1.5% and 3.5% in total, with > >2% for the small lists benchmark (which is the expected best case as > slicing large lists obviously dominates the slice object creation). > > IMHO, even 2% would be pretty good for such a small change. Well, 3% on such micro-benchmarks (and, I assume, 0% on the rest) is generally considered very small. On the other hand, I agree the patch itself is quite simple. > by > > _Py_NewReference((PyObject *)obj); > > in the patch. New patch attached. Don't you also need a _Py_ForgetReference() at the other end? Or have I missed it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 19:55:20 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 02 Feb 2011 18:55:20 +0000 Subject: [issue2733] mmap resize fails on anonymous memory In-Reply-To: <1209661457.64.0.989081565875.issue2733@psf.upfronthosting.co.za> Message-ID: <1296672920.05.0.716064134261.issue2733@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I don't see an actual crash reported. An unexpected exception is not a crash. Changing the type to "behavior". ---------- nosy: +belopolsky type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 19:59:54 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 02 Feb 2011 18:59:54 +0000 Subject: [issue10762] strftime('%f') segfault In-Reply-To: <1293098262.29.0.661167233963.issue10762@psf.upfronthosting.co.za> Message-ID: <1296673194.76.0.329799269857.issue10762@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- components: +Extension Modules, Windows -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 20:03:33 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 02 Feb 2011 19:03:33 +0000 Subject: [issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened In-Reply-To: <1289242981.94.0.545258182692.issue10365@psf.upfronthosting.co.za> Message-ID: <1296673413.19.0.0969041908124.issue10365@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Unexpected exception is not a crash. Changing the type to "behavior." ---------- nosy: +belopolsky type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 20:10:53 2011 From: report at bugs.python.org (Bob Van Zant) Date: Wed, 02 Feb 2011 19:10:53 +0000 Subject: [issue11101] plistlib has no graceful way of handing None values In-Reply-To: <1296673853.21.0.702351569168.issue11101@psf.upfronthosting.co.za> Message-ID: <1296673853.21.0.702351569168.issue11101@psf.upfronthosting.co.za> New submission from Bob Van Zant : The Apple plist format does not support None or Null values in its output. A Null value in plist is denoted by the absence of the key in the data structure. The python plist writer generates a TypeError when a None value is encoded. This issue is to track dealing with None values. A suggestion is to have a flag on the various plist write functions and methods that will allow ignoring None values. No changes are required to the plist reader. ---------- components: Library (Lib) files: plistlib.patch keywords: patch messages: 127750 nosy: bobveznat priority: normal severity: normal status: open title: plistlib has no graceful way of handing None values type: feature request versions: Python 2.7 Added file: http://bugs.python.org/file20651/plistlib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 20:11:56 2011 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 02 Feb 2011 19:11:56 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1296673916.37.0.289594410375.issue10227@psf.upfronthosting.co.za> Stefan Behnel added the comment: There's a "PyObject_Del(obj)" in all code paths. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 20:21:06 2011 From: report at bugs.python.org (Georg Brandl) Date: Wed, 02 Feb 2011 19:21:06 +0000 Subject: [issue11082] ValueError: Content-Length should be specified In-Reply-To: <1296501492.73.0.362770141375.issue11082@psf.upfronthosting.co.za> Message-ID: <1296674466.23.0.0656968435113.issue11082@psf.upfronthosting.co.za> Georg Brandl added the comment: That would seem correct to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 20:25:42 2011 From: report at bugs.python.org (Georg Brandl) Date: Wed, 02 Feb 2011 19:25:42 +0000 Subject: [issue11082] ValueError: Content-Length should be specified In-Reply-To: <1296501492.73.0.362770141375.issue11082@psf.upfronthosting.co.za> Message-ID: <1296674742.92.0.28245688739.issue11082@psf.upfronthosting.co.za> Georg Brandl added the comment: It is also a question whether to disallow str explicitly, instead of letting it go through the Iterable check. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 20:25:47 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 02 Feb 2011 19:25:47 +0000 Subject: [issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp In-Reply-To: <1274665334.09.0.561782804312.issue8797@psf.upfronthosting.co.za> Message-ID: <1296674747.03.0.753952944098.issue8797@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: fixed -> stage: committed/rejected -> patch review status: closed -> open type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 20:46:04 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 02 Feb 2011 19:46:04 +0000 Subject: [issue4724] setting f_exc_traceback aborts in debug builds In-Reply-To: <1229966419.5.0.164799717047.issue4724@psf.upfronthosting.co.za> Message-ID: <1296675964.53.0.729033742653.issue4724@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Not applicable to 3.x because the frame object does not have f_exc_traceback attribute anymore: >>> import sys;sys._getframe(0).f_exc_traceback = 23 Traceback (most recent call last): File "", line 1, in AttributeError: 'frame' object has no attribute 'f_exc_traceback' The issue is present in 2.7 but appears to be rather benign. It looks like the worst that can happen in non-debug build is a reference leak in set_exc_info(). I am not sure if this is worth fixing. If this was affecting development version, I would argue that the simplest fix is to disallow setting f_exc_traceback or f_exc_value before f_exc_type is set. In a bug-fix reliase, however this is probably not acceptable. Given that sys._getframe() screams "beware, expert use only", I am not sure anything should be done other than possibly documenting that assigning to f_exc_* attributes of a transient frame object is not a good idea. Note that the following works: >>> f = sys._getframe(0) >>> f.f_exc_traceback = 23 If there is a legitimate use for setting f_exc_traceback, the user should know to set f.f_exc_type and f.f_exc_value as well. ---------- nosy: +belopolsky -BreamoreBoy versions: -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 20:56:35 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 02 Feb 2011 19:56:35 +0000 Subject: [issue4391] use proper gettext plurals forms in argparse and optparse In-Reply-To: <1227390268.91.0.0525140101381.issue4391@psf.upfronthosting.co.za> Message-ID: <1296676595.09.0.140727201186.issue4391@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks like this will have to wait for 3.3, unfortunately. ---------- keywords: +needs review stage: -> patch review versions: +Python 3.3 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 20:56:40 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 02 Feb 2011 19:56:40 +0000 Subject: [issue6465] email.feedparser regular expression bug (NLCRE_crack) In-Reply-To: <1247342320.74.0.342668726051.issue6465@psf.upfronthosting.co.za> Message-ID: <1296676600.36.0.416871696439.issue6465@psf.upfronthosting.co.za> Sandro Tosi added the comment: I was looking at this bug and tried to reproduce it, but I can't :( I extracted this code: part1 = 'Content-Type: multipart/related; start=; boundary=----------1JBOHhxKNnWgkmE17ZJ2Cy\r\nContent-Location: http://localhost/page1.html\r\nSubject: =?utf-8?Q?test?=\r\nMIME-Version: 1.0\r\n\r\n------------1JBOHhxKNnWgkmE17ZJ2Cy\r' part2 = '\nContent-Disposition: inline; filename=page1.html\r\nContent-Type: text/html; charset=UTF-8; name=page1.html\r\nContent-Id: \r\nContent-Location: http://localhost/page1.html\r\nContent-Transfer-Encoding: 8bit\r\n\r\n\r\nPage 1

page 1

\r\n------------1JBOHhxKNnWgkmE17ZJ2Cy--\r\n' expected = '\r\nPage 1

page 1

' from email.feedparser import FeedParser feedparser = FeedParser() feedparser.feed(part1) feedparser.feed(part2) m = feedparser.close() mm = m.get_payload() mm[0].get_payload() == expected from the test attached to this bug, and tried on: * py3k * release3.1-maint * release2.7-maint * debian 2.6.6 (the first 3 recompiled just before the test) and in all of the cases the last instruction returns True, so I'm actually quite skeptical this is still a bug, or there something I'm missing. I'm not closing this bug yet, since I'd like to hear first from the people involved back then. ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 21:05:30 2011 From: report at bugs.python.org (Oren Held) Date: Wed, 02 Feb 2011 20:05:30 +0000 Subject: [issue11102] configure doesn't find "major()" on HP-UX v11.31 In-Reply-To: <1296677130.56.0.432506284039.issue11102@psf.upfronthosting.co.za> Message-ID: <1296677130.56.0.432506284039.issue11102@psf.upfronthosting.co.za> New submission from Oren Held : The effect eventually is that on HP-UX v3 there are no os.major() and os.minor() functions. I tried to dig deeper to find out what's wrong, and it seems that 'configure' script fails on 'major' check and thus disables the 'major' feature: 'configure' finds well that /usr/include/sys/sysmacros.h has makedev(), major(), minor() definitions (MAJOR_IN_SYSMACROS==1). The problem is that including sys/sysmacros.h is not enough, it depends (but doesn't #include) sys/types.h for the definition of dev_t (needed by makedev() macro). See attached config.log for configure's behavior. ---------- components: Build files: config.log messages: 127757 nosy: Oren_Held priority: normal severity: normal status: open title: configure doesn't find "major()" on HP-UX v11.31 versions: Python 2.7 Added file: http://bugs.python.org/file20652/config.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 21:28:47 2011 From: report at bugs.python.org (Oren Held) Date: Wed, 02 Feb 2011 20:28:47 +0000 Subject: [issue11102] configure doesn't find "major()" on HP-UX v11.31 In-Reply-To: <1296677130.56.0.432506284039.issue11102@psf.upfronthosting.co.za> Message-ID: <1296678527.78.0.73680277706.issue11102@psf.upfronthosting.co.za> Oren Held added the comment: Attaching a patch I've made for fixing the problem in HP-UX, simply by #including sys/types.h on the configure test.. 1. I'm not sure it'll be good for all platforms; maybe we need more 'configure' magic here to make it #include on this configure test only when needed (e.g. HP-UX v3). 2. Once 'configure' decides to enable the "os.major" feature, 'make' simply compiles it well - I didn't have to fix things in Modules/posixmodule.c (apparently sys/types.h is already loaded). I'm not sure it's smart to count on it. ---------- keywords: +patch Added file: http://bugs.python.org/file20653/python-configure-hpux-major-fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 21:34:05 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 02 Feb 2011 20:34:05 +0000 Subject: [issue11092] Setup.cfg isn't packaged when running sdist In-Reply-To: <1296582156.21.0.82325099923.issue11092@psf.upfronthosting.co.za> Message-ID: <1296678845.91.0.855798615311.issue11092@psf.upfronthosting.co.za> ?ric Araujo added the comment: No, because setup.cfg should always be included. That?s a real bug. In distutils1, test/*.py and README[.txt] were also included; the commit that changed that (374f93ab103c) introduced this bug: - optional = ['test/test*.py', 'setup.cfg'] - for pattern in optional: - files = filter(os.path.isfile, glob(pattern)) - if files: - self.filelist.extend(files) I think setup.cfg should always be included if it exists; I?m not sure about setup.py, you may want to ask on the ML. ---------- nosy: +gotcha _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 22:01:55 2011 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 02 Feb 2011 21:01:55 +0000 Subject: [issue11102] configure doesn't find "major()" on HP-UX v11.31 In-Reply-To: <1296677130.56.0.432506284039.issue11102@psf.upfronthosting.co.za> Message-ID: <1296680515.91.0.656718861641.issue11102@psf.upfronthosting.co.za> Martin v. L?wis added the comment: AFAICT, including sys/types.h by default in the test should be fine. It's a standard header file (atleast for Posixish systems), so it should always be present, and including it shouldn't cause harm even if it's not needed. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 22:02:37 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 02 Feb 2011 21:02:37 +0000 Subject: [issue6818] remove/delete method for zipfile/tarfile objects In-Reply-To: <1251866532.69.0.504306670253.issue6818@psf.upfronthosting.co.za> Message-ID: <1296680557.06.0.42565232703.issue6818@psf.upfronthosting.co.za> Changes by Sandro Tosi : ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 22:02:50 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 02 Feb 2011 21:02:50 +0000 Subject: [issue6818] remove/delete method for zipfile/tarfile objects In-Reply-To: <1251866532.69.0.504306670253.issue6818@psf.upfronthosting.co.za> Message-ID: <1296680570.36.0.670043943545.issue6818@psf.upfronthosting.co.za> Changes by Sandro Tosi : ---------- keywords: -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 22:19:07 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 02 Feb 2011 21:19:07 +0000 Subject: [issue11089] ConfigParser 50x slower in 2.7 In-Reply-To: <1296569082.9.0.874258670374.issue11089@psf.upfronthosting.co.za> Message-ID: <1296681547.17.0.664643584086.issue11089@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Attaching patch for Python 3.2. Georg, I was think of waiting for 3.2.1 for this one, but it can go into 3.2.0 RC2 if you prefer. ---------- assignee: rhettinger -> georg.brandl nosy: +georg.brandl Added file: http://bugs.python.org/file20654/configparser.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 22:23:01 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 02 Feb 2011 21:23:01 +0000 Subject: [issue6501] Fatal error on startup with invalid PYTHONIOENCODING In-Reply-To: <1247826105.17.0.941734297485.issue6501@psf.upfronthosting.co.za> Message-ID: <1296681781.68.0.185211338239.issue6501@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The issue is not Windows specific, so I am changing the title to reflect that. On OSX, for example, I get $ PYTHONIOENCODING=xyz ./python.exe Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: xyz Abort trap I agree that abort() is too drastic for a typo in the environment variable setting, but ignoring it silently is not a good option either. Someone setting PYTHONIOENCODING most likely does it for a reason and giving him or her some sort of default behavior for mistyped encoding is not helpful. (Note that this is how many C libraries treat TZ environment variable setting and this is often very frustrating.) I think errors in environment variables that can be detected on startup should be treated the same way as the command line typos: a descriptive message on C stderr and exit(1). Currently different environment variables are treated differently. For example, mistakes in PYTHONHOME and PYTHONIOENCODING cause fatal error while an error in PYTHONSTARTUP is reported but does not terminate python: $ PYTHONSTARTUP=xyz.py ./python.exe Python 3.2rc2+ (py3k:88320, Feb 2 2011, 14:07:18) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. Could not open PYTHONSTARTUP IOError: [Errno 2] No such file or directory: 'xyz.py' >>> ---------- nosy: +belopolsky title: Fatal LookupError: unknown encoding: cp0 on Windows embedded startup. -> Fatal error on startup with invalid PYTHONIOENCODING _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 22:23:15 2011 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Feb 2011 21:23:15 +0000 Subject: [issue6465] email.feedparser regular expression bug (NLCRE_crack) In-Reply-To: <1247342320.74.0.342668726051.issue6465@psf.upfronthosting.co.za> Message-ID: <1296681795.0.0.73529264437.issue6465@psf.upfronthosting.co.za> R. David Murray added the comment: My notes say that this bug is "similar to issue 5610", the fix for which made it in to 2.6. I meant to come back and see if that fix fixed this bug, but I forgot. The fix is different, so it is worth verifying that this test case fails in 2.5 but works subsequently. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 22:29:22 2011 From: report at bugs.python.org (Georg Brandl) Date: Wed, 02 Feb 2011 21:29:22 +0000 Subject: [issue11089] ConfigParser 50x slower in 2.7 In-Reply-To: <1296569082.9.0.874258670374.issue11089@psf.upfronthosting.co.za> Message-ID: <1296682162.23.0.949001847044.issue11089@psf.upfronthosting.co.za> Georg Brandl added the comment: 3.2.1 should be fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 22:34:26 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 02 Feb 2011 21:34:26 +0000 Subject: [issue6465] email.feedparser regular expression bug (NLCRE_crack) In-Reply-To: <1247342320.74.0.342668726051.issue6465@psf.upfronthosting.co.za> Message-ID: <1296682466.88.0.315315338239.issue6465@psf.upfronthosting.co.za> Sandro Tosi added the comment: Lucky as I can be, I have 2.5.5 here and I can confirm that with this version the code above fails - so I think this issue can be closed as fixed by issue5610 (I hope I correctly set all the fields, if not please let me know :)). ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 22:37:49 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 02 Feb 2011 21:37:49 +0000 Subject: [issue11089] ConfigParser 50x slower in 2.7 In-Reply-To: <1296569082.9.0.874258670374.issue11089@psf.upfronthosting.co.za> Message-ID: <1296682669.28.0.484295271385.issue11089@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed 3.1 in r88323. ---------- assignee: georg.brandl -> rhettinger resolution: -> later versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 22:39:26 2011 From: report at bugs.python.org (Darren) Date: Wed, 02 Feb 2011 21:39:26 +0000 Subject: [issue11103] Python 3.2 installer doesn't register file extensions on Windows 7 In-Reply-To: <1296682766.55.0.843230930362.issue11103@psf.upfronthosting.co.za> Message-ID: <1296682766.55.0.843230930362.issue11103@psf.upfronthosting.co.za> New submission from Darren : The python installer should register the proper file type extensions. Files with .py extensions should have an "open" action associated with the python interpreter and there should also be an "Edit with IDLE" action associated with .py files as well. I was able to configure both of these things manually on Windows XP but can not figure out how setup the "Edit with IDLE" action on Windows 7. FWIW: I can run this command from a dos box and get the desired effect. "C:\Python32\pythonw.exe" "C:\Python32\Lib\idlelib\idle.pyw" -n -e "Test.py" and I expect the command to be registered with the .py file extension would be "C:\Python32\pythonw.exe" "C:\Python32\Lib\idlelib\idle.pyw" -n -e "%1" pythondb The installer should just do this so python files have reasonable actions associated with them as soon as the install is complete. ---------- components: IDLE, Installation messages: 127767 nosy: darren priority: normal severity: normal status: open title: Python 3.2 installer doesn't register file extensions on Windows 7 type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 22:41:36 2011 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Feb 2011 21:41:36 +0000 Subject: [issue6465] email.feedparser regular expression bug (NLCRE_crack) In-Reply-To: <1247342320.74.0.342668726051.issue6465@psf.upfronthosting.co.za> Message-ID: <1296682896.9.0.996502210845.issue6465@psf.upfronthosting.co.za> R. David Murray added the comment: Looks good to me. I've added the #6510 as superseder, though I doubt we'll ever make use of that info :) ---------- superseder: -> email feedparser.py CRLFLF bug: $ vs \Z _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 22:51:04 2011 From: report at bugs.python.org (Brian Curtin) Date: Wed, 02 Feb 2011 21:51:04 +0000 Subject: [issue11103] Python 3.2 installer doesn't register file extensions on Windows 7 In-Reply-To: <1296682766.55.0.843230930362.issue11103@psf.upfronthosting.co.za> Message-ID: <1296683464.88.0.866735133882.issue11103@psf.upfronthosting.co.za> Brian Curtin added the comment: Works for me. Just ran the 3.2 RC2 installer and did the following: (type is like a Windows equivalent of `cat` on *nix) >type test.py import sys print(sys.version_info) >test.py sys.version_info(major=3, minor=2, micro=0, releaselevel='candidate', serial=2) Additionally, "Edit with IDLE" shows up when right clicking on the file. Did you get any errors when running the installer? What permissions does your account have? ---------- components: +Windows nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 23:08:52 2011 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Feb 2011 22:08:52 +0000 Subject: [issue10951] gcc 4.6 warnings In-Reply-To: <1295474318.57.0.129834114348.issue10951@psf.upfronthosting.co.za> Message-ID: <1296684532.25.0.745392470916.issue10951@psf.upfronthosting.co.za> STINNER Victor added the comment: gcc 4.6 bug has been fixed (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47271). So setup.py can compile extensions using gcc 4.6, and here are new warnings: --- building dbm using bdb /home/haypo/prog/GIT/py3k/Modules/_pickle.c: In function 'load': /home/haypo/prog/GIT/py3k/Modules/_pickle.c:5267:9: warning: case value '0' not in enumerated type 'enum opcode' [-Wswitch] /home/haypo/prog/GIT/py3k/Modules/_csv.c: In function 'parse_grow_buff': /home/haypo/prog/GIT/py3k/Modules/_csv.c:537:21: warning: operation on 'self->field' may be undefined [-Wsequence-point] /home/haypo/prog/GIT/py3k/Modules/_csv.c: In function 'join_check_rec_size': /home/haypo/prog/GIT/py3k/Modules/_csv.c:1058:23: warning: operation on 'self->rec' may be undefined [-Wsequence-point] /home/haypo/prog/GIT/py3k/Modules/_posixsubprocess.c:4:0: warning: "_GNU_SOURCE" redefined [enabled by default] ./pyconfig.h:1151:0: note: this is the location of the previous definition /home/haypo/prog/GIT/py3k/Modules/socketmodule.c: In function 'socket_gethostbyname_ex': /home/haypo/prog/GIT/py3k/Modules/socketmodule.c:3318:9: warning: variable 'result' set but not used [-Wunused-but-set-variable] /home/haypo/prog/GIT/py3k/Modules/socketmodule.c: In function 'socket_gethostbyaddr': /home/haypo/prog/GIT/py3k/Modules/socketmodule.c:3396:9: warning: variable 'result' set but not used [-Wunused-but-set-variable] /home/haypo/prog/GIT/py3k/Modules/_sqlite/connection.c: In function '_pysqlite_final_callback': /home/haypo/prog/GIT/py3k/Modules/_sqlite/connection.c:676:15: warning: variable 'aggregate_class' set but not used [-Wunused-but-set-variable] /home/haypo/prog/GIT/py3k/Modules/_sqlite/cursor.c: In function 'pysqlite_cursor_dealloc': /home/haypo/prog/GIT/py3k/Modules/_sqlite/cursor.c:129:9: warning: variable 'rc' set but not used [-Wunused-but-set-variable] /home/haypo/prog/GIT/py3k/Modules/_sqlite/statement.c: In function 'pysqlite_statement_dealloc': /home/haypo/prog/GIT/py3k/Modules/_sqlite/statement.c:372:9: warning: variable 'rc' set but not used [-Wunused-but-set-variable] /home/haypo/prog/GIT/py3k/Modules/_tkinter.c: In function 'PythonCmd': /home/haypo/prog/GIT/py3k/Modules/_tkinter.c:2008:15: warning: variable 'self' set but not used [-Wunused-but-set-variable] /home/haypo/prog/GIT/py3k/Modules/tkappinit.c: In function 'Tcl_AppInit': /home/haypo/prog/GIT/py3k/Modules/tkappinit.c:29:15: warning: variable 'main_window' set but not used [-Wunused-but-set-variable] (...) /home/haypo/prog/GIT/py3k/Modules/_ctypes/cfield.c: In function 'PyCField_FromDesc': /home/haypo/prog/GIT/py3k/Modules/_ctypes/cfield.c:55:29: warning: variable 'length' set but not used [-Wunused-but-set-variable] /home/haypo/prog/GIT/py3k/Modules/_ctypes/libffi/src/dlmalloc.c: In function 'mmap_resize': /home/haypo/prog/GIT/py3k/Modules/_ctypes/libffi/src/dlmalloc.c:3193:5: warning: implicit declaration of function 'mremap' [-Wimplicit-function-declaration] /home/haypo/prog/GIT/py3k/Modules/_ctypes/libffi/src/dlmalloc.c:3193:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /home/haypo/prog/GIT/py3k/Modules/_ctypes/libffi/src/dlmalloc.c: In function 'sys_trim': /home/haypo/prog/GIT/py3k/Modules/_ctypes/libffi/src/dlmalloc.c:3612:62: warning: comparison between pointer and integer [enabled by default] --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 23:16:42 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 02 Feb 2011 22:16:42 +0000 Subject: [issue6253] optparse.OptionParser.get_usage uses wrong formatter In-Reply-To: <1244644097.18.0.346116774289.issue6253@psf.upfronthosting.co.za> Message-ID: <1296685002.89.0.942289719994.issue6253@psf.upfronthosting.co.za> Sandro Tosi added the comment: Jan, are you still interested in this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 23:19:41 2011 From: report at bugs.python.org (Darren) Date: Wed, 02 Feb 2011 22:19:41 +0000 Subject: [issue11103] Python 3.2 installer doesn't register file extensions on Windows 7 In-Reply-To: <1296682766.55.0.843230930362.issue11103@psf.upfronthosting.co.za> Message-ID: <1296685181.23.0.273231804476.issue11103@psf.upfronthosting.co.za> Darren added the comment: Perhaps it was just fixed in RC2? I did my install last week with RC1. My account has admin privileges and UAC is disabled on my machine. There were no errors when I ran the installer. Tomorrow I will try uninstalling RC1 and reinstalling RC2 to see if that makes a difference. I definitely have no Edit with Idle option when I right click files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 23:25:31 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 02 Feb 2011 22:25:31 +0000 Subject: [issue7111] abort when stderr is moved In-Reply-To: <1255335800.65.0.921782203194.issue7111@psf.upfronthosting.co.za> Message-ID: <1296685531.24.0.409974950135.issue7111@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > If we want to allow for closed {stdin, stdout, stderr}, I'm not sure > what the semantics should be. Should sys.std{in, out, err} be None? Or a > file object which always throws an error? I would say it should be a *pseudo*-file object which always throws a *descriptive* error. Note that setting sys.stdout to None makes print() do nothing rather than report an error: >>> sys.stdout = None >>> print('abc') See also issue6501. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 23:30:50 2011 From: report at bugs.python.org (Brian Curtin) Date: Wed, 02 Feb 2011 22:30:50 +0000 Subject: [issue11103] Python 3.2 installer doesn't register file extensions on Windows 7 In-Reply-To: <1296682766.55.0.843230930362.issue11103@psf.upfronthosting.co.za> Message-ID: <1296685850.03.0.949165461432.issue11103@psf.upfronthosting.co.za> Brian Curtin added the comment: I don't think any changes were made around that feature, and it has always worked for the last few installations I've done. Please do follow up with your RC2 experience when you have a chance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 2 23:36:39 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 02 Feb 2011 22:36:39 +0000 Subject: [issue7111] abort when stderr is closed In-Reply-To: <1255335800.65.0.921782203194.issue7111@psf.upfronthosting.co.za> Message-ID: <1296686199.53.0.506854452646.issue7111@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: On the second thought, as long as python used fd 2 as the "message stream of last resort", we should probably not allow it to run with fd 2 closed. The problem is that in this case fd 2 may become associated with a very important file contents of which you don't want to see replaced with a python error message. ---------- title: abort when stderr is moved -> abort when stderr is closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 00:01:03 2011 From: report at bugs.python.org (Brett Cannon) Date: Wed, 02 Feb 2011 23:01:03 +0000 Subject: [issue10951] gcc 4.6 warnings In-Reply-To: <1295474318.57.0.129834114348.issue10951@psf.upfronthosting.co.za> Message-ID: <1296687663.05.0.964852451032.issue10951@psf.upfronthosting.co.za> Brett Cannon added the comment: Just a comment on those warnings about unused assignments; think about commenting them out instead of flat-out deleting them. When I ran clang over Python 2.7 I got some blow-back from deleting some assignments as some found them to be like documentation. In instances where the assignment helps explain what is going on it is best to just comment the code out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 00:15:34 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 02 Feb 2011 23:15:34 +0000 Subject: [issue9592] Limitations in objects returned by multiprocessing Pool In-Reply-To: <1281726168.11.0.648826556363.issue9592@psf.upfronthosting.co.za> Message-ID: <1296688534.93.0.864759720112.issue9592@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 01:05:44 2011 From: report at bugs.python.org (John Dennis) Date: Thu, 03 Feb 2011 00:05:44 +0000 Subject: [issue11104] distutils sdist ignores MANIFEST In-Reply-To: <1296691544.53.0.327829038157.issue11104@psf.upfronthosting.co.za> Message-ID: <1296691544.53.0.327829038157.issue11104@psf.upfronthosting.co.za> New submission from John Dennis : The behaviour of sdist has changed dramatically in Python 2.7. Some projects prefer to maintain their own manifest file instead of utilizing automatic manifest generation from a template. The defined behaviour of sdist is to check for the presence of both a template and a manifest, if the template is absent but a manifest exists sdist is supposed to read the existing manifest, it no longer does this. Instead it creates a default file list with the catastrophic result of omitting the bulk of a projects files. It appears this bug was introduced in r81255 and is discussed in #8688. Unfortunately #8688 contained a number of different issues and was closed addressing only a subset of the problems. Changeset r83996 was introduced to prevent sdist from overwriting a project maintained manifest by testing for a comment at the head of the manifest file. It's not clear to me this was necessary because the write_manifest() should never have been called if the template was absent but a manifest existed. Even after the application of changeset r83996 one of the fundamental problems in #8688 remained, the manifest is not read. The solution is to check for both the manifest and template (as was formerly done) and if the template is absent but the manifest exists then the manifest should be read. I have made modifications to get_file_list() to reintroduce the defined behaviour. With the introduction of r83996 it is now legal syntax to have comments in the manifest however read_manifest() was not enhanced to account for the possible presence of comments. I also modified read_manifest() to handle comments. These suggested fixes are attached as a patch against the current 2.7 maintenance branch. I've also attached a file with the two modified methods because sometimes it's difficult to comprehend a patch. ---------- assignee: tarek components: Distutils messages: 127777 nosy: eric.araujo, jdennis, tarek priority: normal severity: normal status: open title: distutils sdist ignores MANIFEST type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 01:06:49 2011 From: report at bugs.python.org (John Dennis) Date: Thu, 03 Feb 2011 00:06:49 +0000 Subject: [issue11104] distutils sdist ignores MANIFEST In-Reply-To: <1296691544.53.0.327829038157.issue11104@psf.upfronthosting.co.za> Message-ID: <1296691609.36.0.445847885145.issue11104@psf.upfronthosting.co.za> Changes by John Dennis : ---------- keywords: +patch Added file: http://bugs.python.org/file20655/sdist.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 01:08:20 2011 From: report at bugs.python.org (John Dennis) Date: Thu, 03 Feb 2011 00:08:20 +0000 Subject: [issue11104] distutils sdist ignores MANIFEST In-Reply-To: <1296691544.53.0.327829038157.issue11104@psf.upfronthosting.co.za> Message-ID: <1296691700.95.0.0778936208513.issue11104@psf.upfronthosting.co.za> Changes by John Dennis : Added file: http://bugs.python.org/file20656/sdist_new _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 01:13:38 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Feb 2011 00:13:38 +0000 Subject: [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1296692018.64.0.656659405111.issue9264@psf.upfronthosting.co.za> ?ric Araujo added the comment: Backported in r88324 and r88328. ---------- resolution: accepted -> fixed stage: patch review -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 01:25:22 2011 From: report at bugs.python.org (Michael Foord) Date: Thu, 03 Feb 2011 00:25:22 +0000 Subject: [issue11090] Doc errors for unittest in Python 3.1 In-Reply-To: <1296573823.39.0.448811226108.issue11090@psf.upfronthosting.co.za> Message-ID: <1296692722.75.0.195460117289.issue11090@psf.upfronthosting.co.za> Michael Foord added the comment: This incorrect section on unittest command line features was added by Eric according to svn blame. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 01:34:34 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Feb 2011 00:34:34 +0000 Subject: [issue11090] Doc errors for unittest in Python 3.1 In-Reply-To: <1296573823.39.0.448811226108.issue11090@psf.upfronthosting.co.za> Message-ID: <1296693274.13.0.923402070011.issue11090@psf.upfronthosting.co.za> ?ric Araujo added the comment: Patch to remove the section about command-line usage + other things new in 3.2. ---------- keywords: +patch Added file: http://bugs.python.org/file20657/fix-11090.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 01:43:57 2011 From: report at bugs.python.org (John Dennis) Date: Thu, 03 Feb 2011 00:43:57 +0000 Subject: [issue11104] distutils sdist ignores MANIFEST In-Reply-To: <1296691544.53.0.327829038157.issue11104@psf.upfronthosting.co.za> Message-ID: <1296693837.29.0.636403720553.issue11104@psf.upfronthosting.co.za> Changes by John Dennis : Removed file: http://bugs.python.org/file20655/sdist.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 01:44:03 2011 From: report at bugs.python.org (John Dennis) Date: Thu, 03 Feb 2011 00:44:03 +0000 Subject: [issue11104] distutils sdist ignores MANIFEST In-Reply-To: <1296691544.53.0.327829038157.issue11104@psf.upfronthosting.co.za> Message-ID: <1296693843.46.0.357518745936.issue11104@psf.upfronthosting.co.za> Changes by John Dennis : Removed file: http://bugs.python.org/file20656/sdist_new _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 01:44:40 2011 From: report at bugs.python.org (John Dennis) Date: Thu, 03 Feb 2011 00:44:40 +0000 Subject: [issue11104] distutils sdist ignores MANIFEST In-Reply-To: <1296691544.53.0.327829038157.issue11104@psf.upfronthosting.co.za> Message-ID: <1296693880.33.0.842739524108.issue11104@psf.upfronthosting.co.za> Changes by John Dennis : Added file: http://bugs.python.org/file20658/sdist.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 01:45:17 2011 From: report at bugs.python.org (John Dennis) Date: Thu, 03 Feb 2011 00:45:17 +0000 Subject: [issue11104] distutils sdist ignores MANIFEST In-Reply-To: <1296691544.53.0.327829038157.issue11104@psf.upfronthosting.co.za> Message-ID: <1296693917.44.0.636430320318.issue11104@psf.upfronthosting.co.za> Changes by John Dennis : Added file: http://bugs.python.org/file20659/sdist_new _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 03:27:30 2011 From: report at bugs.python.org (Brett Cannon) Date: Thu, 03 Feb 2011 02:27:30 +0000 Subject: [issue8914] Run clang's static analyzer In-Reply-To: <1275795174.58.0.536949662024.issue8914@psf.upfronthosting.co.za> Message-ID: <1296700050.04.0.652933791102.issue8914@psf.upfronthosting.co.za> Brett Cannon added the comment: Here is a patch that covers all of the relevant dead assignments that were detected. ---------- keywords: +patch Added file: http://bugs.python.org/file20660/clang_analyzer.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 03:47:05 2011 From: report at bugs.python.org (David-Sarah Hopwood) Date: Thu, 03 Feb 2011 02:47:05 +0000 Subject: [issue1602] windows console doesn't print or input Unicode In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1296701225.14.0.911893689499.issue1602@psf.upfronthosting.co.za> David-Sarah Hopwood added the comment: Feedback from Julie Solon of Microsoft: > These console functions share a per-process heap that is 64K. There is some overhead, the heap can get fragmented, and calls from multiple threads all affect how much is available for this buffer. > I am working to update the documentation for this function [WriteConsoleW] and other affected functions with information along these lines, and will post it within the next week or two. I replied thanking her and asking for clarification: When you say that the heap can get fragmented, is this true only when there are concurrent calls to the console functions, or can it occur even with single-threaded use? I'm trying to determine whether acquiring a process-global lock while calling these functions would be sufficient to ensure that the available heap space will not be unexpectedly low. (This assumes that the functions not used outside the lock by other libraries in the same process.) ReadConsoleW seems also to be affected, incidentally. I've asked for clarification about whether acquiring a process-global lock when using these functions ... Julie ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 04:25:50 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Feb 2011 03:25:50 +0000 Subject: [issue11071] What's New review comments In-Reply-To: <1296394185.46.0.874389567772.issue11071@psf.upfronthosting.co.za> Message-ID: <1296703550.1.0.649773826841.issue11071@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 06:02:40 2011 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 03 Feb 2011 05:02:40 +0000 Subject: [issue11105] Compiling evil ast crashes interpreter In-Reply-To: <1296709360.51.0.0254918555785.issue11105@psf.upfronthosting.co.za> Message-ID: <1296709360.51.0.0254918555785.issue11105@psf.upfronthosting.co.za> New submission from Benjamin Peterson : You don't want to know why I was thinking about this... $ ./python Python 3.2rc2+ (py3k:88302, Feb 1 2011, 19:02:10) [GCC 4.4.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ast >>> e = ast.UnaryOp(op=ast.Not(), lineno=0, col_offset=0) >>> e.operand = e >>> compile(ast.Expression(e), "", "eval") Segmentation fault ---------- messages: 127783 nosy: benjamin.peterson priority: low severity: normal status: open title: Compiling evil ast crashes interpreter type: crash versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 06:14:40 2011 From: report at bugs.python.org (Ross Lagerwall) Date: Thu, 03 Feb 2011 05:14:40 +0000 Subject: [issue9127] subprocess.Popen.communicate() and SIGCHLD handlers In-Reply-To: <1277913297.34.0.963310724242.issue9127@psf.upfronthosting.co.za> Message-ID: <1296710080.42.0.44898963839.issue9127@psf.upfronthosting.co.za> Ross Lagerwall added the comment: This has been fixed in 2.7 and 3.2 so I think that this issue can be closed. ---------- nosy: +rosslagerwall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 08:26:49 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 03 Feb 2011 07:26:49 +0000 Subject: [issue8914] Run clang's static analyzer In-Reply-To: <1275795174.58.0.536949662024.issue8914@psf.upfronthosting.co.za> Message-ID: <1296718009.8.0.390933445162.issue8914@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Nice work. I'm surprised there wasn't more dead code. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 08:55:02 2011 From: report at bugs.python.org (Ned Deily) Date: Thu, 03 Feb 2011 07:55:02 +0000 Subject: [issue9127] subprocess.Popen.communicate() and SIGCHLD handlers In-Reply-To: <1277913297.34.0.963310724242.issue9127@psf.upfronthosting.co.za> Message-ID: <1296719702.57.0.49759247432.issue9127@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the problem report. And thanks for noticing the fix. ---------- nosy: +ned.deily resolution: -> out of date stage: -> committed/rejected status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 11:01:32 2011 From: report at bugs.python.org (Ross Lagerwall) Date: Thu, 03 Feb 2011 10:01:32 +0000 Subject: [issue7678] subprocess.Popen pipeline example code in the documentation is lacking In-Reply-To: <1263245210.2.0.116487607425.issue7678@psf.upfronthosting.co.za> Message-ID: <1296727292.25.0.826363818484.issue7678@psf.upfronthosting.co.za> Ross Lagerwall added the comment: The docs should be updated. This has been noted in msg54949 and http://www.enricozini.org/2009/debian/python-pipes/ Perhaps this example will make it clear: import subprocess p1 = subprocess.Popen(["yes"], stdout=subprocess.PIPE) p2 = subprocess.Popen(["head"], stdin=p1.stdout, stdout=subprocess.PIPE) #p1.stdout.close() p1.wait() This example hangs. "yes" writes to "head" and head reads the first 10 lines and then exits. But, "yes" does not receive a SIGPIPE because the python process still has a p1.stdout open. Thus, p1.stdout should be closed after being passed to p2. ---------- nosy: +rosslagerwall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 12:57:37 2011 From: report at bugs.python.org (Alexey Luchko) Date: Thu, 03 Feb 2011 11:57:37 +0000 Subject: [issue11098] syntax error at end of line in interactive python -u In-Reply-To: <1296645535.22.0.821023606978.issue11098@psf.upfronthosting.co.za> Message-ID: <1296734257.89.0.952468979645.issue11098@psf.upfronthosting.co.za> Alexey Luchko added the comment: I reported the issue just because I didn't find it is already known. I don't think it is worth backporting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 13:30:48 2011 From: report at bugs.python.org (Ned Deily) Date: Thu, 03 Feb 2011 12:30:48 +0000 Subject: [issue11079] Make OS X entry in Applications like that in Windows In-Reply-To: <1296490743.96.0.234780831636.issue11079@psf.upfronthosting.co.za> Message-ID: <1296736248.84.0.378386159538.issue11079@psf.upfronthosting.co.za> Ned Deily added the comment: After discussions with Raymond, I now agree that it would be better to not copy the Tools into the Applications/Python 3.x directory since everything else there is of the double-clickable nature, i.e. aimed at the user more comfortable with a GUI interface. Since the Tools files may be of interest to advanced command-line users, a better place for them is within the framework share directory as many other UNIX-like distributions install them in /usr/share. The following two patches implement the following changes from 3.2rc2 OS X installer behavior. issue11079_extras_py3k.patch: 1. modifies the Mac Makefile installextras target to put a copy of Tools/ in the framework at share/doc/pythonm.n/examples rather than in /Applications/Python m.n 2. updates the installer ReadMe file accordingly. issue11079_doc_links.patch 3. places a link named "Python Documentation.html" in /Applications/Python m.n to the top-level index.html file of the installed documentation set. 4. places a link to the documentation directory in the framework at share/doc/pythonm.n/html Summary of installed file differences: /Applications/Python m.s/ Extras/ 2.7/3.1: contained ReadMe and old Demo directories 3.2rc2: contained Tools directory (note 1 below) 3.2: no longer created Python Documentation.html 2.7/3.1/3.2rc2: not created 3.2: symlink to index page of standard documentation: /Library/Frameworks/Python.framework/Versions/3.2/\ Resources/English.lproj/Documentation/index.html /Library/Frameworks/Python.framework/Versions/m.n/ share/doc/pythonm.n/examples 2.7/3.1/3.2rc2: not created 3.2: contains Tools directory share/doc/pythonm.n/html 2.7/3.1/3.2rc1: not created 3.2: relative symlink to standard documentation location: ../../../Resources/English.lproj/Documentation The included changes affect only the Mac installer script and the Mac Makefile. Both variants of the installer were built with these fixes and tested on 10.5 and 10.6 as appropriate. If after review, the patches meet expectations, I ask for release manager approval to apply for 3.2final. Note 1: If the user had installed one of the Python 3.2rc installers, the Extras directory and its contents will not be removed by the 3.2final installer. Note 2: The additional documentation links should also be backported to 2.7. ---------- keywords: +after moratorium, buildbot, easy, gsoc, needs review, patch nosy: +georg.brandl priority: normal -> critical stage: -> commit review Added file: http://bugs.python.org/file20661/issue11079_doc_links.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 13:31:27 2011 From: report at bugs.python.org (Ned Deily) Date: Thu, 03 Feb 2011 12:31:27 +0000 Subject: [issue11079] Make OS X entry in Applications like that in Windows In-Reply-To: <1296490743.96.0.234780831636.issue11079@psf.upfronthosting.co.za> Message-ID: <1296736287.16.0.696138515155.issue11079@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file20662/issue11079_extras_py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 13:34:06 2011 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 03 Feb 2011 12:34:06 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1296736446.82.0.125917468057.issue10227@psf.upfronthosting.co.za> Stefan Behnel added the comment: Here are some real micro benchmarks (note that the pybench benchmarks actually do lots of other stuff besides slicing): base line: $ ./python -m timeit -s 'l = list(range(100)); s=slice(None)' 'l[s]' 1000000 loops, best of 3: 0.464 usec per loop $ ./python -m timeit -s 'l = list(range(10)); s=slice(None)' 'l[s]' 10000000 loops, best of 3: 0.149 usec per loop $ ./python -m timeit -s 'l = list(range(10)); s=slice(None,1)' 'l[s]' 10000000 loops, best of 3: 0.135 usec per loop patched: $ ./python -m timeit -s 'l = list(range(100))' 'l[:1]' 10000000 loops, best of 3: 0.158 usec per loop $ ./python -m timeit -s 'l = list(range(100))' 'l[:]' 1000000 loops, best of 3: 0.49 usec per loop $ ./python -m timeit -s 'l = list(range(100))' 'l[1:]' 1000000 loops, best of 3: 0.487 usec per loop $ ./python -m timeit -s 'l = list(range(100))' 'l[1:3]' 10000000 loops, best of 3: 0.184 usec per loop $ ./python -m timeit -s 'l = list(range(10))' 'l[:]' 10000000 loops, best of 3: 0.185 usec per loop $ ./python -m timeit -s 'l = list(range(10))' 'l[1:]' 10000000 loops, best of 3: 0.181 usec per loop original: $ ./python -m timeit -s 'l = list(range(100))' 'l[:1]' 10000000 loops, best of 3: 0.171 usec per loop $ ./python -m timeit -s 'l = list(range(100))' 'l[:]' 1000000 loops, best of 3: 0.499 usec per loop $ ./python -m timeit -s 'l = list(range(100))' 'l[1:]' 1000000 loops, best of 3: 0.509 usec per loop $ ./python -m timeit -s 'l = list(range(100))' 'l[1:3]' 10000000 loops, best of 3: 0.198 usec per loop $ ./python -m timeit -s 'l = list(range(10))' 'l[:]' 10000000 loops, best of 3: 0.188 usec per loop $ ./python -m timeit -s 'l = list(range(10))' 'l[1:]' 1000000 loops, best of 3: 0.196 usec per loop So the maximum impact seems to be 8% for very short slices (<10) and it quickly goes down for longer slices where the copy impact clearly dominates. There's still some 2% for 100 items, though. I find it interesting that the base line is way below the other timings. That makes me think it's actually worth caching constant slice instances, as CPython already does for tuples. Cython also caches both now. I would expect that constant slices like [:], [1:] or [:-1] are extremely common. As you can see above, caching them could speed up slicing by up to 30% for short lists, and still some 7% for a list of length 100. Stefan ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 13:39:39 2011 From: report at bugs.python.org (Ned Deily) Date: Thu, 03 Feb 2011 12:39:39 +0000 Subject: [issue11079] Make OS X entry in Applications like that in Windows In-Reply-To: <1296490743.96.0.234780831636.issue11079@psf.upfronthosting.co.za> Message-ID: <1296736779.02.0.309198673878.issue11079@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- keywords: -after moratorium, buildbot, easy, gsoc, patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 14:22:02 2011 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 03 Feb 2011 13:22:02 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1296739322.67.0.744997494009.issue10227@psf.upfronthosting.co.za> Stefan Behnel added the comment: Here's another base line test: slicing an empty list patched: $ ./python -m timeit -s 'l = []' 'l[:]' 10000000 loops, best of 3: 0.0847 usec per loop original: $ ./python -m timeit -s 'l = []' 'l[:]' 10000000 loops, best of 3: 0.0977 usec per loop That's about 13% less overhead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 14:32:51 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Feb 2011 13:32:51 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1296736446.82.0.125917468057.issue10227@psf.upfronthosting.co.za> Message-ID: <1296739968.3705.5.camel@localhost.localdomain> Antoine Pitrou added the comment: > I find it interesting that the base line is way below the other > timings. That makes me think it's actually worth caching constant > slice instances, as CPython already does for tuples. Indeed. I have never touched it, but I suppose it needs an upgrade of the marshal format to support slices. (of course, this will not help for other common cases such as l[x:x+2]). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 14:53:03 2011 From: report at bugs.python.org (=?utf-8?q?Ernst_Sj=C3=B6strand?=) Date: Thu, 03 Feb 2011 13:53:03 +0000 Subject: [issue1757072] Zipfile robustness Message-ID: <1296741183.16.0.517710034995.issue1757072@psf.upfronthosting.co.za> Changes by Ernst Sj?strand : ---------- nosy: +Ernst.Sj?strand _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 15:32:14 2011 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Feb 2011 14:32:14 +0000 Subject: [issue11098] syntax error at end of line in interactive python -u In-Reply-To: <1296645535.22.0.821023606978.issue11098@psf.upfronthosting.co.za> Message-ID: <1296743534.86.0.267749319652.issue11098@psf.upfronthosting.co.za> R. David Murray added the comment: Great. Thanks for reporting it, and I'm glad we managed to already have it fixed :) ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 15:58:34 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Feb 2011 14:58:34 +0000 Subject: [issue11087] Speeding up the interpreter with a few lines of code In-Reply-To: <1296547053.5.0.194611271072.issue11087@psf.upfronthosting.co.za> Message-ID: <1296745114.09.0.111607428639.issue11087@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, things are at best 3-4% faster here (often unchanged). ---------- versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 16:32:15 2011 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 03 Feb 2011 15:32:15 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1296747135.41.0.791099215238.issue10227@psf.upfronthosting.co.za> Stefan Behnel added the comment: > of course, this will not help for other common cases such as l[x:x+2] ... which is exactly what this slice caching patch is there for. ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 16:50:46 2011 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 03 Feb 2011 15:50:46 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1296748246.02.0.475197395616.issue10227@psf.upfronthosting.co.za> Stefan Behnel added the comment: A quick test against the py3k stdlib: find -name "*.py" | while read file; do egrep '\[[-0-9]*:[-0-9]*\]' "$file"; done | wc -l This finds 2096 lines in 393 files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 18:00:33 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 03 Feb 2011 17:00:33 +0000 Subject: [issue11105] Compiling evil ast crashes interpreter In-Reply-To: <1296709360.51.0.0254918555785.issue11105@psf.upfronthosting.co.za> Message-ID: <1296752433.45.0.101254250853.issue11105@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Looks like a stack overflow caused by an infinite recursion. I am not sure if it is possible to add cycle detection code without sacrificing performance or setting some arbitrary limits. I wonder: Why ast nodes need to be mutable? ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 18:08:02 2011 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 03 Feb 2011 17:08:02 +0000 Subject: [issue11105] Compiling evil ast crashes interpreter In-Reply-To: <1296752433.45.0.101254250853.issue11105@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: 2011/2/3 Alexander Belopolsky : > > Alexander Belopolsky added the comment: > > Looks like a stack overflow caused by an infinite recursion. ?I am not sure if it is possible to add cycle detection code without sacrificing performance or setting some arbitrary limits. Yes, it's definitely low priority. It's probably easier to crash the interpreter by producing differently malformed ast anyway. > > I wonder: Why ast nodes need to be mutable? So people can change them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 18:21:43 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 03 Feb 2011 17:21:43 +0000 Subject: [issue11105] Compiling evil ast crashes interpreter In-Reply-To: Message-ID: Alexander Belopolsky added the comment: On Thu, Feb 3, 2011 at 12:08 PM, Benjamin Peterson wrote: .. >> I wonder: Why ast nodes need to be mutable? > > So people can change them. Well, they are hashable, so this needs to be done carefully. Is this necessary for AST-based optimizations? Does Python actually change AST after it has been created? Note that for some optimizations it may be more appropriate to build a new tree rather than mutate the old one. Depending on the algorithm, you may or may not need to change the nodes after they have been created in the process. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 18:27:15 2011 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 03 Feb 2011 17:27:15 +0000 Subject: [issue11105] Compiling evil ast crashes interpreter In-Reply-To: Message-ID: Benjamin Peterson added the comment: 2011/2/3 Alexander Belopolsky : > > Alexander Belopolsky added the comment: > > On Thu, Feb 3, 2011 at 12:08 PM, Benjamin Peterson > wrote: > .. >>> I wonder: Why ast nodes need to be mutable? >> >> So people can change them. > > Well, they are hashable, so this needs to be done carefully. ?Is this > necessary for AST-based optimizations? ?Does Python actually change > AST after it has been created? ?Note that for some optimizations it > may be more appropriate to build a new tree rather than mutate the old > one. ?Depending on the algorithm, you may or may not need to change > the nodes after they have been created in the process. Other people are, though. The hash is by identity anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 18:28:07 2011 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 03 Feb 2011 17:28:07 +0000 Subject: [issue11105] Compiling evil ast crashes interpreter In-Reply-To: Message-ID: Benjamin Peterson added the comment: 2011/2/3 Alexander Belopolsky : > > Alexander Belopolsky added the comment: > > On Thu, Feb 3, 2011 at 12:08 PM, Benjamin Peterson > wrote: > .. >>> I wonder: Why ast nodes need to be mutable? >> >> So people can change them. > > Well, they are hashable, so this needs to be done carefully. ?Is this > necessary for AST-based optimizations? ?Does Python actually change > AST after it has been created? ?Note that for some optimizations it > may be more appropriate to build a new tree rather than mutate the old > one. ?Depending on the algorithm, you may or may not need to change > the nodes after they have been created in the process. Other people are, though. The hash is by identity anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 18:31:11 2011 From: report at bugs.python.org (H Xu) Date: Thu, 03 Feb 2011 17:31:11 +0000 Subject: [issue11106] python 2.6.6 and python 2.7.1 cannot be built successfully because of an segment fault on NetBSD-5.1-sparc In-Reply-To: <1296754271.48.0.967126521261.issue11106@psf.upfronthosting.co.za> Message-ID: <1296754271.48.0.967126521261.issue11106@psf.upfronthosting.co.za> New submission from H Xu : Build python 2.6.6 and python 2.7.1 on a NetBSD-5.1-sparc machine. 1. Run './configure'; 2. Run 'make'; 3. Run 'make install'. There will be a problem after run 'make install'. The last few lines of error messages are like the following: Compiling /usr/local/lib/python2.6/test/test_binop.py ... Compiling /usr/local/lib/python2.6/test/test_bisect.py ... Compiling /usr/local/lib/python2.6/test/test_bool.py ... Compiling /usr/local/lib/python2.6/test/test_bsddb.py ... Compiling /usr/local/lib/python2.6/test/test_bsddb185.py ... Compiling /usr/local/lib/python2.6/test/test_bsddb3.py ... Compiling /usr/local/lib/python2.6/test/test_buffer.py ... Compiling /usr/local/lib/python2.6/test/test_bufio.py ... Compiling /usr/local/lib/python2.6/test/test_builtin.py ... [1] Segmentation fault (core dumped) PYTHONPATH=/usr/... *** Error code 139 Stop. make: stopped in /home/xuh/src/Python-2.6.6 Same thing with python 2.7.1. ---------- components: Build messages: 127802 nosy: H.Xu priority: normal severity: normal status: open title: python 2.6.6 and python 2.7.1 cannot be built successfully because of an segment fault on NetBSD-5.1-sparc type: compile error versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 19:33:03 2011 From: report at bugs.python.org (Daniel Stutzbach) Date: Thu, 03 Feb 2011 18:33:03 +0000 Subject: [issue7111] abort when stderr is closed In-Reply-To: <1255335800.65.0.921782203194.issue7111@psf.upfronthosting.co.za> Message-ID: <1296757983.24.0.472289612168.issue7111@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: That's an interesting point. Do you know of places where we use fd 2 instead of sys.stderr? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 20:25:21 2011 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 03 Feb 2011 19:25:21 +0000 Subject: [issue11107] Cache constant "slice" instances In-Reply-To: <1296761121.69.0.66743926851.issue11107@psf.upfronthosting.co.za> Message-ID: <1296761121.69.0.66743926851.issue11107@psf.upfronthosting.co.za> New submission from Stefan Behnel : Follow-up to ticket 10227. The following facts seem to indicate that it would be worth caching constant instances of the slice type, such as in [:] or [:-1]. with cached slice instance: $ ./python -m timeit -s 'l = list(range(100)); s=slice(None)' 'l[s]' 1000000 loops, best of 3: 0.464 usec per loop $ ./python -m timeit -s 'l = list(range(10)); s=slice(None)' 'l[s]' 10000000 loops, best of 3: 0.149 usec per loop $ ./python -m timeit -s 'l = list(range(10)); s=slice(None,1)' 'l[s]' 10000000 loops, best of 3: 0.135 usec per loop uncached normal usage: $ ./python -m timeit -s 'l = list(range(100))' 'l[:]' 1000000 loops, best of 3: 0.499 usec per loop $ ./python -m timeit -s 'l = list(range(100))' 'l[:1]' 10000000 loops, best of 3: 0.171 usec per loop Timings based on Python 3.2 rc2. A quick grep against the py3k stdlib finds 2096 lines in 393 files that use constant slices. ---------- components: Interpreter Core messages: 127804 nosy: scoder priority: normal severity: normal status: open title: Cache constant "slice" instances type: performance versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 20:26:34 2011 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 03 Feb 2011 19:26:34 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1296761194.72.0.323725978773.issue10227@psf.upfronthosting.co.za> Stefan Behnel added the comment: Created follow-up issue 11107 for caching constant slice objects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 20:27:21 2011 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 03 Feb 2011 19:27:21 +0000 Subject: [issue11107] Cache constant "slice" instances In-Reply-To: <1296761121.69.0.66743926851.issue11107@psf.upfronthosting.co.za> Message-ID: <1296761241.79.0.5924970085.issue11107@psf.upfronthosting.co.za> Stefan Behnel added the comment: Erm, issue 10227. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 20:28:08 2011 From: report at bugs.python.org (Brett Cannon) Date: Thu, 03 Feb 2011 19:28:08 +0000 Subject: [issue8914] Run clang's static analyzer In-Reply-To: <1275795174.58.0.536949662024.issue8914@psf.upfronthosting.co.za> Message-ID: <1296761288.1.0.928940670556.issue8914@psf.upfronthosting.co.za> Brett Cannon added the comment: This was just dead assignments. I have not tackled Idempotent operations, dead increments, dead initializations, dead nested assignments, possible deref of NULL, deref of unassigned pointer, division by zero, undefined/garbage results, or undefined alloc of 0 bytes. IOW I tackled 36 out of 164 reported issues. =) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 20:35:39 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 03 Feb 2011 19:35:39 +0000 Subject: [issue11107] Cache constant "slice" instances In-Reply-To: <1296761121.69.0.66743926851.issue11107@psf.upfronthosting.co.za> Message-ID: <1296761739.06.0.473789532089.issue11107@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Similar idea has been rejected in issue2268 because the win was too small to justify the number of changes that had to be made. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 20:44:48 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Feb 2011 19:44:48 +0000 Subject: [issue7111] abort when stderr is closed In-Reply-To: <1296757983.24.0.472289612168.issue7111@psf.upfronthosting.co.za> Message-ID: <1296762284.3925.4.camel@localhost.localdomain> Antoine Pitrou added the comment: > That's an interesting point. > > Do you know of places where we use fd 2 instead of sys.stderr? We normally don't. One reason is that buffering inside sys.stderr can make ordering of output incorrect. There are some places in C code where we do "fprintf(stderr, ...)" but that's for specialized debugging (disabled in normal builds) or fatal error messages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 20:47:03 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Feb 2011 19:47:03 +0000 Subject: [issue11107] Cache constant "slice" instances In-Reply-To: <1296761121.69.0.66743926851.issue11107@psf.upfronthosting.co.za> Message-ID: <1296762423.61.0.371349720367.issue11107@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 20:48:57 2011 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 03 Feb 2011 19:48:57 +0000 Subject: [issue11107] Cache constant "slice" instances In-Reply-To: <1296761121.69.0.66743926851.issue11107@psf.upfronthosting.co.za> Message-ID: <1296762537.96.0.525531898123.issue11107@psf.upfronthosting.co.za> Stefan Behnel added the comment: Hmm, ok, but AFAICT, your patch was rejected rather because of the way it approached the problem, not so much because of the issue itself. Plus, the fact that Python 3 requires slices in more places than Python 2 (which had the lower level getslice protocol) makes this a bigger issue now than it was three years ago. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 20:56:37 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 03 Feb 2011 19:56:37 +0000 Subject: [issue7111] abort when stderr is closed In-Reply-To: <1296762284.3925.4.camel@localhost.localdomain> Message-ID: Alexander Belopolsky added the comment: On Thu, Feb 3, 2011 at 2:44 PM, Antoine Pitrou wrote: .. >> Do you know of places where we use fd 2 instead of sys.stderr? > > We normally don't. One reason is that buffering inside sys.stderr can > make ordering of output incorrect. There are some places in C code where > we do "fprintf(stderr, ...)" but that's for specialized debugging > (disabled in normal builds) or fatal error messages. This is the case that I had in mind. What does non-debug build do on a fatal error? Also, can we be sure that Python does not call C library functions that write to stderr behind the scenes? If vanilla Python is safe to run with closed fd 2, that may not be the case for 3rd party extensions. What is the use case for "python >&-"? Is it important enough to justify the risk of accidental data loss? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 20:59:26 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 03 Feb 2011 19:59:26 +0000 Subject: [issue7111] abort when stderr is closed In-Reply-To: Message-ID: Alexander Belopolsky added the comment: > On Thu, Feb 3, 2011 at 2:44 PM, Antoine Pitrou wrote: > .. >> Do you know of places where we use fd 2 instead of sys.stderr? > > We normally don't. Hmm, grep "fprintf(stderr," returned 122 hits in the py3k branch. Are you sure these are all debug-build only? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 21:05:09 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Feb 2011 20:05:09 +0000 Subject: [issue7111] abort when stderr is closed In-Reply-To: <1255335800.65.0.921782203194.issue7111@psf.upfronthosting.co.za> Message-ID: <1296763509.56.0.825887747326.issue7111@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +exarkun, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 21:06:46 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Feb 2011 20:06:46 +0000 Subject: [issue7111] abort when stderr is closed In-Reply-To: Message-ID: <1296763603.3925.9.camel@localhost.localdomain> Antoine Pitrou added the comment: > > We normally don't. One reason is that buffering inside sys.stderr can > > make ordering of output incorrect. There are some places in C code where > > we do "fprintf(stderr, ...)" but that's for specialized debugging > > (disabled in normal builds) or fatal error messages. > > This is the case that I had in mind. What does non-debug build do on > a fatal error? It uses fprintf(stderr, ...). That's the only thing it can do (there's no way sys.stderr is guaranteed to be usable at that point). If C stderr is invalid, then too bad. > Also, can we be sure that Python does not call C > library functions that write to stderr behind the scenes? I think you can guess the answer :) > What is the use case for "python >&-"? Is > it important enough to justify the risk of accidental data loss? I don't think so. One more important use case is when running a Unix daemon, which has (AFAIK) to close all std handles. I don't know how that interacts with using C stderr, especially if the handle closing is done in Python (and therefore only calls C close() and not fclose()!). Perhaps we should provide a sys function to fclose() C std{in,out,err}. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 21:07:11 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Feb 2011 20:07:11 +0000 Subject: [issue7111] abort when stderr is closed In-Reply-To: Message-ID: <1296763628.3925.10.camel@localhost.localdomain> Antoine Pitrou added the comment: Le jeudi 03 f?vrier 2011 ? 19:59 +0000, Alexander Belopolsky a ?crit : > Alexander Belopolsky added the comment: > > > On Thu, Feb 3, 2011 at 2:44 PM, Antoine Pitrou wrote: > > .. > >> Do you know of places where we use fd 2 instead of sys.stderr? > > > > We normally don't. > > Hmm, grep "fprintf(stderr," returned 122 hits in the py3k branch. > Are you sure these are all debug-build only? "grep -C2" seems to say most of them are. I haven't done a survey. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 21:12:57 2011 From: report at bugs.python.org (Daniel Stutzbach) Date: Thu, 03 Feb 2011 20:12:57 +0000 Subject: [issue7111] abort when stderr is closed In-Reply-To: Message-ID: Daniel Stutzbach added the comment: On Thu, Feb 3, 2011 at 11:56 AM, Alexander Belopolsky wrote: > 3rd party extensions. ? ?What is the use case for "python >&-"? ? ?Is > it important enough to justify the risk of accidental data loss? I don't think closing stderr via the command line is an important use case, but pythonw.exe and Unix daemon processes are important use cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 21:14:55 2011 From: report at bugs.python.org (Georg Brandl) Date: Thu, 03 Feb 2011 20:14:55 +0000 Subject: [issue11105] Compiling evil ast crashes interpreter In-Reply-To: <1296709360.51.0.0254918555785.issue11105@psf.upfronthosting.co.za> Message-ID: <1296764095.93.0.263935553917.issue11105@psf.upfronthosting.co.za> Georg Brandl added the comment: Alex: If the node attributes were not mutable, it would be extremely awkward, not to say inefficient, to mutate an already existing AST as returned by ast.parse(). The AST objects in the _ast module aren't what Python works with internally, anyway. When calling ast.parse(), the AST is converted to Python objects (these are defined in Python-ast.c), and compile()ing such an object converts them back to the internal tree representation. This conversion is where recursions would need to be handled. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 21:18:49 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Feb 2011 20:18:49 +0000 Subject: [issue7111] abort when stderr is closed In-Reply-To: <1296763603.3925.9.camel@localhost.localdomain> Message-ID: <1296764326.3925.15.camel@localhost.localdomain> Antoine Pitrou added the comment: > I don't think so. One more important use case is when running a Unix > daemon, which has (AFAIK) to close all std handles. I just took a look at http://pypi.python.org/pypi/python-daemon/, and it uses dup2() to redirect standard streams, which is far nicer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 21:20:16 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Feb 2011 20:20:16 +0000 Subject: [issue11107] Cache constant "slice" instances In-Reply-To: <1296762537.96.0.525531898123.issue11107@psf.upfronthosting.co.za> Message-ID: <1296764413.3925.17.camel@localhost.localdomain> Antoine Pitrou added the comment: > Hmm, ok, but AFAICT, your patch was rejected rather because of the way > it approached the problem, not so much because of the issue itself. I would be rather for the patch myself. The bytecode currently generated for sliced indexing is awfully suboptimal. > Plus, the fact that Python 3 requires slices in more places than > Python 2 (which had the lower level getslice protocol) makes this a > bigger issue now than it was three years ago. True. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 21:34:08 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 03 Feb 2011 20:34:08 +0000 Subject: [issue8914] Run clang's static analyzer In-Reply-To: <1275795174.58.0.536949662024.issue8914@psf.upfronthosting.co.za> Message-ID: <1296765248.21.0.956081212226.issue8914@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Am looking forward to the rest. This will be a nice cleanup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 21:34:18 2011 From: report at bugs.python.org (Brett Cannon) Date: Thu, 03 Feb 2011 20:34:18 +0000 Subject: [issue8914] Run clang's static analyzer In-Reply-To: <1275795174.58.0.536949662024.issue8914@psf.upfronthosting.co.za> Message-ID: <1296765258.85.0.699841477127.issue8914@psf.upfronthosting.co.za> Changes by Brett Cannon : Removed file: http://bugs.python.org/file20660/clang_analyzer.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 21:34:52 2011 From: report at bugs.python.org (Brett Cannon) Date: Thu, 03 Feb 2011 20:34:52 +0000 Subject: [issue8914] Run clang's static analyzer In-Reply-To: <1275795174.58.0.536949662024.issue8914@psf.upfronthosting.co.za> Message-ID: <1296765292.25.0.674942729141.issue8914@psf.upfronthosting.co.za> Brett Cannon added the comment: New patch which covers dead assignments and increments. ---------- Added file: http://bugs.python.org/file20663/clang_analyzer.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 21:49:11 2011 From: report at bugs.python.org (Daniel Stutzbach) Date: Thu, 03 Feb 2011 20:49:11 +0000 Subject: [issue7111] abort when stderr is closed In-Reply-To: <1296764326.3925.15.camel@localhost.localdomain> Message-ID: Daniel Stutzbach added the comment: On Thu, Feb 3, 2011 at 12:18 PM, Antoine Pitrou wrote: > I just took a look at http://pypi.python.org/pypi/python-daemon/, and it > uses dup2() to redirect standard streams, which is far nicer. I'm more worried about the case where a daemon launches python. At startup, could we check that 2 and 3 are valid file descriptors, and, if not, open /dev/null? That way, they cannot later be inadvertently assigned to some other file? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 22:08:09 2011 From: report at bugs.python.org (Carlos Corbacho) Date: Thu, 03 Feb 2011 21:08:09 +0000 Subject: [issue11108] Intermittent AttributeError when using time.strptime in threads In-Reply-To: <1296767289.19.0.293158150558.issue11108@psf.upfronthosting.co.za> Message-ID: <1296767289.19.0.293158150558.issue11108@psf.upfronthosting.co.za> New submission from Carlos Corbacho : time.strptime() intermittently (and I mean _really_ intermittently) throws an AttributeError. Steps to reproduce: Run the attached script (you may have to do this quite a lot of times; in an evening of trying, I could only trigger this bug once...) - this just starts lots of threads so that we have lots of time.strptime()'s running in parallel. Expected: It just keeps running every time. Actual: On one run, the script bailed out almost immediately - ccorbacho at valkyrie:~/chroots/trunk/home/ccorbacho/scratch/ccorbacho$ python test_time.py Exception in thread Thread-2: Traceback (most recent call last): File "/usr/lib64/python2.6/threading.py", line 532, in __bootstrap_inner self.run() File "test_time.py", line 13, in run time.strptime("30 Nov 00", "%d %b %y") AttributeError: _strptime_time --- This is with Python 2.6.6. However, at work we have been seeing this very intermittently with Python 2.5 in threaded code doing time.strptime() as well (though we just get AttributeError: strptime, but I don't have any code I can provide to reproduce on 2.5), hence I'm raising the bug. ---------- components: None files: test_time.py messages: 127822 nosy: ccorbacho priority: normal severity: normal status: open title: Intermittent AttributeError when using time.strptime in threads type: crash versions: Python 2.6 Added file: http://bugs.python.org/file20664/test_time.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 22:20:17 2011 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 03 Feb 2011 21:20:17 +0000 Subject: [issue11106] python 2.6.6 and python 2.7.1 cannot be built successfully because of an segment fault on NetBSD-5.1-sparc In-Reply-To: <1296754271.48.0.967126521261.issue11106@psf.upfronthosting.co.za> Message-ID: <1296768017.08.0.4919969037.issue11106@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you debug this, e.g. by inspecting the core file? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 22:24:04 2011 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Feb 2011 21:24:04 +0000 Subject: [issue11106] python 2.6.6 and python 2.7.1 cannot be built successfully because of an segment fault on NetBSD-5.1-sparc In-Reply-To: <1296754271.48.0.967126521261.issue11106@psf.upfronthosting.co.za> Message-ID: <1296768244.68.0.101608482865.issue11106@psf.upfronthosting.co.za> STINNER Victor added the comment: Can you try to get a backtrace? Use make install SHELL="bash -x" to display executed shell commands. And then rerun the last command in gdb: after the crash, the "where" command will give you a backtrace. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 23:01:14 2011 From: report at bugs.python.org (Justin) Date: Thu, 03 Feb 2011 22:01:14 +0000 Subject: [issue11109] socketserver.ForkingMixIn leaves zombies In-Reply-To: <1296770474.15.0.807802878959.issue11109@psf.upfronthosting.co.za> Message-ID: <1296770474.15.0.807802878959.issue11109@psf.upfronthosting.co.za> New submission from Justin : This is the same issue as was reported here: http://bugs.python.org/issue1954. It is still a problem in Python 3.1. I'm writing a server that will be receiving a massive number of requests and I'd like to eliminate the zombie problem. Once I figured out what was going on, I tried adding a call to collect_children() in the serve_forever() loop. It worked very well. I've included a patch of what I did, however, I obviously can't leave this change in my socketserver.py because we will be deploying this on a lot of servers. Is there any reason not to collect_children() in the serve_forever() loop? It seems like the place to do it to me. The patch will only collect children if there are any, so it doesn't have to call it every time through the loop. ---------- components: Library (Lib) files: collect_children.patch keywords: patch messages: 127825 nosy: jwark priority: normal severity: normal status: open title: socketserver.ForkingMixIn leaves zombies type: behavior versions: Python 3.1 Added file: http://bugs.python.org/file20665/collect_children.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 23:28:52 2011 From: report at bugs.python.org (Stefan Krah) Date: Thu, 03 Feb 2011 22:28:52 +0000 Subject: [issue11106] python 2.6.6 and python 2.7.1 cannot be built successfully because of an segment fault on NetBSD-5.1-sparc In-Reply-To: <1296754271.48.0.967126521261.issue11106@psf.upfronthosting.co.za> Message-ID: <1296772132.79.0.110341374969.issue11106@psf.upfronthosting.co.za> Stefan Krah added the comment: This seems to be a duplicate of #7424. ---------- nosy: +skrah resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> segmentation fault in listextend during install _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 23:28:58 2011 From: report at bugs.python.org (Stefan Krah) Date: Thu, 03 Feb 2011 22:28:58 +0000 Subject: [issue7424] segmentation fault in listextend during install In-Reply-To: <1259729838.45.0.563962594728.issue7424@psf.upfronthosting.co.za> Message-ID: <1296772138.04.0.56286267516.issue7424@psf.upfronthosting.co.za> Stefan Krah added the comment: See also: http://gnats.netbsd.org/42627 ---------- nosy: +H.Xu, haypo, loewis, skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 23:48:54 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 03 Feb 2011 22:48:54 +0000 Subject: [issue9045] 2.7rc1: 64-bit OSX installer is not built with 64-bit tkinter In-Reply-To: <1277143341.0.0.74848452771.issue9045@psf.upfronthosting.co.za> Message-ID: <1296773334.46.0.518970973186.issue9045@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- components: +Build type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 23:56:45 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Feb 2011 22:56:45 +0000 Subject: [issue1038909] pydoc method documentation lookup enhancement Message-ID: <1296773805.59.0.479548492586.issue1038909@psf.upfronthosting.co.za> ?ric Araujo added the comment: Note that similar (duplicate?) #426740 was rejected, so maybe the discussion here is moot. FWIW, I believe using a decorator or a custom metaclass to explicitly inherit a docstring is a good way of achieving what you want. ---------- nosy: +calvin versions: +Python 3.3 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 23:59:31 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Feb 2011 22:59:31 +0000 Subject: =?utf-8?b?W2lzc3VlODg4N10g4oCccHlkb2Mgc3Ry4oCdIHdvcmtzIGJ1dCBub3Qg4oCc?= =?utf-8?q?pydoc_str=2Etranslate=E2=80=9D?= In-Reply-To: <1275565374.87.0.956319261544.issue8887@psf.upfronthosting.co.za> Message-ID: <1296773971.99.0.17157614566.issue8887@psf.upfronthosting.co.za> ?ric Araujo added the comment: Yep, same bug. Possibly related: #410336 (I have to read it again to make sure). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 00:50:53 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Feb 2011 23:50:53 +0000 Subject: [issue9364] some problems with the documentation of pydoc In-Reply-To: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> Message-ID: <1296777053.67.0.310167453376.issue9364@psf.upfronthosting.co.za> ?ric Araujo added the comment: >> In the Python interpreter, do "from pydoc import help" to provide online >> help. Calling help(thing) on a Python object documents the object. > Which is no longer accurate, because the help() function has long ago > become a built-in. To be pedantic, help is not available if python was started with -S. (The docs for site and -S are cross-linked, so that should be discoverable easily enough.) +1 on removing the outdated piece of advice. > 1. The output from help(help) could be made more clear. Agreed. > Why should help special-case itself (with a slightly garbled line?) > This would be a code patch to pydoc.help I haven?t found any special-casing code. Quick testing shows it?s just how pydoc displays help for instances of Python classes. I think making the docstring of site._Helper better (i.e. explain what the class is for + tell people to call help() to access the doc system) would be enough, nothing to change in pydoc.py unless I?ve missed something. (BTW, pydoc code is quite intricated, reminds me a bit of distutils! Who wants to make a graph explaining how help works?) > "This is a wrapper around pydoc.help" good so far "(with a twist)" thanks a lot. > I think the comment should be either removed or explained. Agreed. I think the ?twist? is that the import is lazy and that help has a useful repr (wow, talk about a twist!). Those details need not be alluded to, just remove the comment (?wrapper? is IMO enough to raise curiosity, the source is here to find what?s the wrapping). > Replace "Define the built-in 'help'." with something clearer and more accurate, > such as "The name 'help' is injected in module builtins after being bound > to an instance of this class.". I think that?s too much detail. ?Class used to implement the built-in help function? is enough for my taste. > 2. Improve manual chapter for site module. +1 on better explaining behavior where needed, -1 on documenting implementation details starting with underscores. > Add "inject 'help' into builtins and " after append. -1. help is documented in http://docs.python.org/dev/library/functions#help ; quit, exit, license, copyright and credits are documented in http://docs.python.org/dev/library/constants#constants-added-by-the-site-module (see #652749). To prevent duplication, let?s just add a link from site to constants. (You don?t want to know how much time the previous paragraph has cost me.) > "This module contains a class (_Helper) that wraps function pydoc.help. > An instance of the class is bound to name 'help' in the builtins module." -1. Counter-proposal: Add a link to library/functions#help from library/constants; add a link from library/site to library/constants. > A recent discussion on pydev or maybe python-list (in the thread mentioned > above?) implied that one could usefully make another instance of _Helper or maybe a > subclass thereof. I did not pay enough attention, though, to really get it. I?m curious about the use cases. Eli, can you give us the date of the private email from Terry so that someone can dig up the thread? > "XXX Update documentation" This comment refers to new functions in site to support PEP 370. > "XXX document python -m site --user-base --user-site" We can reuse the example written by Raymond for the whatsnew/3.2 document. To sum up: needs one patch for Lib/site.py, one to add cross-links in Doc/library, one to add missing functions/data from PEP 370 in Doc/library/site.rst, another one to the same file to document the command-line interface of site (those last two may be one, if the contributor is motivated). I suggest to wait for replies to my points above, and if there is consensus or lack of disagreement, someone can turn my suggestions into patches. ---------- nosy: +eric.araujo versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:03:52 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 00:03:52 +0000 Subject: [issue1613479] pydoc info for a package doesn't list all package contents Message-ID: <1296777832.67.0.0902072432265.issue1613479@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?ve just tested that the behavior is now correct. I reproduced the tree structure, set PYTHONPATH, ran ?pydoc foo? to get only ?one? listed, added the pkgutil call in first/path/foo/__init__.py, re-ran ?pydoc foo?, got ?one? and ?two? listed. I can also import both submodules. The pydoc code now uses pkgutil.iter_modules. Someone must have fixed that before 2.6, closing. Thanks for the report nonetheless! ---------- nosy: +eric.araujo -BreamoreBoy resolution: -> out of date stage: unit test needed -> committed/rejected status: open -> closed versions: -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:05:42 2011 From: report at bugs.python.org (Carsten Klein) Date: Fri, 04 Feb 2011 00:05:42 +0000 Subject: [issue2193] Cookie Colon Name Bug In-Reply-To: <1203992843.27.0.867127322082.issue2193@psf.upfronthosting.co.za> Message-ID: <1296777942.18.0.054237192216.issue2193@psf.upfronthosting.co.za> Carsten Klein added the comment: if you'd take a close look at the following lines accepted as part of the patch for stripping out unwanted/non standard cookies over trac: + try: + old_set(key, real_value, coded_value) + except CookieError: + bad_cookies.append(key) then you will find that trac actually behaves just like what is requested in the "original" RFC, namely that the colon is part of the reserved or special characters not meant for inclusion with the cookie name or, as it was stated in the referred rfc, the token. Please do not fix. ---------- nosy: +carsten.klein at axn-software.de _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:08:25 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 00:08:25 +0000 Subject: [issue3835] tkinter goes into an infinite loop (pydoc.gui) In-Reply-To: <1221139272.34.0.29160759745.issue3835@psf.upfronthosting.co.za> Message-ID: <1296778105.53.0.674115961367.issue3835@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Tkinter versions: +Python 3.3 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:09:28 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 00:09:28 +0000 Subject: [issue8637] pydoc should respect MANPAGER over PAGER. In-Reply-To: <1273160026.83.0.741000260603.issue8637@psf.upfronthosting.co.za> Message-ID: <1296778168.93.0.575580865205.issue8637@psf.upfronthosting.co.za> ?ric Araujo added the comment: Is there a standard documenting MANPAGER somewhere? ---------- nosy: +eric.araujo versions: +Python 3.3 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:11:08 2011 From: report at bugs.python.org (Brett Cannon) Date: Fri, 04 Feb 2011 00:11:08 +0000 Subject: [issue8914] Run clang's static analyzer In-Reply-To: <1275795174.58.0.536949662024.issue8914@psf.upfronthosting.co.za> Message-ID: <1296778268.33.0.146368752417.issue8914@psf.upfronthosting.co.za> Brett Cannon added the comment: Here is a new patch which includes setting the noreturn attribute on Py_FatalError() and Py_Exit() in order to make the null pointer deref analysis results more tractable. ---------- Added file: http://bugs.python.org/file20666/analyzer_fixes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:12:52 2011 From: report at bugs.python.org (Brett Cannon) Date: Fri, 04 Feb 2011 00:12:52 +0000 Subject: [issue8914] Run clang's static analyzer In-Reply-To: <1275795174.58.0.536949662024.issue8914@psf.upfronthosting.co.za> Message-ID: <1296778372.76.0.0548635582006.issue8914@psf.upfronthosting.co.za> Brett Cannon added the comment: This is a new set of results with the analyzer_fixes.diff file applied using the latest analyzer. ---------- Added file: http://bugs.python.org/file20667/checker_254_2011-02-03.tar.xz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:15:38 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Feb 2011 00:15:38 +0000 Subject: [issue8637] pydoc should respect MANPAGER over PAGER. In-Reply-To: <1296778168.93.0.575580865205.issue8637@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Thu, Feb 3, 2011 at 7:09 PM, ?ric Araujo wrote: > > ?ric Araujo added the comment: > > Is there a standard documenting MANPAGER somewhere? > Not really a standard, but man page for man on my OSX laptop says: """ -P pager Specify which pager to use. This option overrides the MANPAGER environment variable, which in turn overrides the PAGER variable. """ POSIX only mandates PAGER. See . As I said before, since pydoc is not man, if we want a pydoc-specific variable to override PAGER, it should be callled PYDOCPAGER. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:24:08 2011 From: report at bugs.python.org (Carsten Klein) Date: Fri, 04 Feb 2011 00:24:08 +0000 Subject: [issue2193] Cookie Colon Name Bug In-Reply-To: <1203992843.27.0.867127322082.issue2193@psf.upfronthosting.co.za> Message-ID: <1296779048.85.0.677071186958.issue2193@psf.upfronthosting.co.za> Carsten Klein added the comment: Besides that, BM is wrong in the assumption that *who ever he is* Davi M. Kristol states that the colon is a valid character. There is no such notion in the article. In fact, DMK repeats the definition found in the original RFC on cookies, which also was referred to in the follow up RFC and then again referred to in the current RFC which seeks to get rid of the set-cookie2 directive, combining the two RFCs into a single RFC/pseudo standard. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:26:42 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Feb 2011 00:26:42 +0000 Subject: [issue3367] Uninitialized value read in parsetok.c In-Reply-To: <1216153264.95.0.467111480464.issue3367@psf.upfronthosting.co.za> Message-ID: <1296779202.06.0.89880180178.issue3367@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I don't have a working valgrind or purify, but I was able to reproduce the problem using a poor man's solution of adding assert(0xcbcbcbcbcbcbcbcb != tok->line_start); before if (a >= tok->line_start) With that assert the debug build indeed crashes once I hit Ctrl-D. Attached patch fixes that. I have also added tok->line_start in a few tok constructors for which I don't have a test case demonstrating access to uninitialized value, but it seems to be good defensive programming. ---------- nosy: +belopolsky Added file: http://bugs.python.org/file20668/issue3367.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:27:15 2011 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 04 Feb 2011 00:27:15 +0000 Subject: [issue11108] Intermittent AttributeError when using time.strptime in threads In-Reply-To: <1296767289.19.0.293158150558.issue11108@psf.upfronthosting.co.za> Message-ID: <1296779235.09.0.746198727455.issue11108@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It's a duplicate of issue7980. One workaround is to call strptime() once in the main thread. ---------- nosy: +amaury.forgeotdarc resolution: -> duplicate status: open -> closed superseder: -> time.strptime not thread safe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:32:47 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 00:32:47 +0000 Subject: [issue940286] pydoc.Helper.help() ignores input/output init parameters Message-ID: <1296779567.02.0.0960866739971.issue940286@psf.upfronthosting.co.za> ?ric Araujo added the comment: I just added another comment on Rietveld because I thought this was not fixed :) Demo session: $ pydoc3.2 nonlocal # will launch my pager, then print to stdout Related help topics: global, NAMESPACES Kevin Le, would you like to write a failing test to confirm my bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:39:33 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 00:39:33 +0000 Subject: [issue8637] Add PYDOCPAGER envvar to specify pager for pydoc In-Reply-To: <1273160026.83.0.741000260603.issue8637@psf.upfronthosting.co.za> Message-ID: <1296779973.78.0.289297806126.issue8637@psf.upfronthosting.co.za> ?ric Araujo added the comment: My man(1) also respects MANPAGER (it?s the one from http://man-db.nongnu.org/), but given the lack of a standard, I agree with you. However, I?m reluctant to add another env variable. There are workarounds, for example using a shell alias like ?docpy="PAGER=most pydoc"?. I think this warrants a python-ideas discussion. Justin: what exactly is a pager that does not support man pages? ---------- stage: unit test needed -> title: pydoc should respect MANPAGER over PAGER. -> Add PYDOCPAGER envvar to specify pager for pydoc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:45:27 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Feb 2011 00:45:27 +0000 Subject: [issue3367] Uninitialized value read in parsetok.c In-Reply-To: <1216153264.95.0.467111480464.issue3367@psf.upfronthosting.co.za> Message-ID: <1296780327.82.0.407098803243.issue3367@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: George, This is not really important enough to get into the 3.2 release, but uninitialized variable bugs tend to be nasty when they bite you, so I'll ask your opinion before bumping the version. ---------- assignee: -> georg.brandl nosy: +georg.brandl stage: unit test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:51:49 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Feb 2011 00:51:49 +0000 Subject: [issue8637] Add PYDOCPAGER envvar to specify pager for pydoc In-Reply-To: <1296779973.78.0.289297806126.issue8637@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Thu, Feb 3, 2011 at 7:39 PM, ?ric Araujo wrote: .. > Justin: what exactly is a pager that does not support man pages? I may know the answer to this one. A common PAGER setting is "less -rs" which makes less skip whitespace lines and passes through terminal control chars. Nether of these options are needed for pydoc, but I don't know if they cause any harm. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:52:19 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 00:52:19 +0000 Subject: [issue9523] Improve dbm modules In-Reply-To: <1281021837.96.0.764638089257.issue9523@psf.upfronthosting.co.za> Message-ID: <1296780739.93.0.637434779052.issue9523@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thank you for working on a patch, especially with such comprehensive tests. > The object returned by :func:`.open` supports the same basic functionality as > -dictionaries > +:mod:`collection`.MutableMapping The previous text was okay, I wouldn?t have changed it. > def items(self): >+ return set([(key, self[key]) for key in self._index.keys()]) I don?t know if you should use a plain set or a collections.ItemsView here. In dict objects, KeysView and ValuesView are set-like objects with added behavior, for example they yield their elements in the same order. Raymond, can you comment? Style remarks: you can iter without calling _index.keys(); you can avoid the intermediary list (IOW, remove enclosing [ and ]). In the tests, you can use specialized methods like assertIn and assertIsNone, they remove some boilerplate and can give better error output. I can?t review the C code. :) ---------- nosy: +rhettinger versions: +Python 3.3 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:56:41 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 00:56:41 +0000 Subject: [issue6045] Add more dict methods to dbm interfaces In-Reply-To: <1242549989.17.0.48305033807.issue6045@psf.upfronthosting.co.za> Message-ID: <1296781001.55.0.285369317747.issue6045@psf.upfronthosting.co.za> ?ric Araujo added the comment: I believe this is now superseded by #9523, which has less discussion but a patch. ---------- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> Improve dbm modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 01:58:08 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 00:58:08 +0000 Subject: [issue9523] Improve dbm modules In-Reply-To: <1281021837.96.0.764638089257.issue9523@psf.upfronthosting.co.za> Message-ID: <1296781088.88.0.113891048494.issue9523@psf.upfronthosting.co.za> ?ric Araujo added the comment: See #5736 for a patch adding iteration support. If the patch attached to his report supersedes the other one, I?ll close the other bug as duplicate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 02:04:09 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 01:04:09 +0000 Subject: [issue11104] distutils sdist ignores MANIFEST In-Reply-To: <1296691544.53.0.327829038157.issue11104@psf.upfronthosting.co.za> Message-ID: <1296781449.89.0.288091337692.issue11104@psf.upfronthosting.co.za> ?ric Araujo added the comment: This behavior change is actually present in 2.7.1, 3.1.3 and 3.2. I?m concerned that you?ve found a bug with it (thanks for the report), and that we may have to change behavior again. First, could you open another report about comment handling in read_manifest? I overlooked that, and it should be fixed as quickly as possible, although there?s very little change this will make it into 3.2.0 (we?ll have 3.2.1 though). Second, can you give us a test script (shell or Python) or a set of instructions we can reproduce to observe the behavior you say is defective? Thanks in advance. ---------- components: +Distutils2 versions: +3rd party, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 02:07:32 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 01:07:32 +0000 Subject: [issue9189] Improve CFLAGS handling In-Reply-To: <1278517873.84.0.191654592449.issue9189@psf.upfronthosting.co.za> Message-ID: <1296781652.09.0.271837819928.issue9189@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think this report can be closed now. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 02:12:02 2011 From: report at bugs.python.org (Brett Cannon) Date: Fri, 04 Feb 2011 01:12:02 +0000 Subject: [issue9189] Improve CFLAGS handling In-Reply-To: <1278517873.84.0.191654592449.issue9189@psf.upfronthosting.co.za> Message-ID: <1296781922.97.0.208829851132.issue9189@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 02:12:16 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 01:12:16 +0000 Subject: [issue10847] Distutils drops -fno-strict-aliasing when CFLAGS are set In-Reply-To: <1294348917.86.0.0652237323155.issue10847@psf.upfronthosting.co.za> Message-ID: <1296781936.58.0.738517091273.issue10847@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. It came up on the debian-python ML recently too, and is actually already reported. Following up on the other report. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> BASECFLAGS are not passed to module build line _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 02:16:14 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 01:16:14 +0000 Subject: [issue969718] BASECFLAGS are not passed to module build line Message-ID: <1296782174.02.0.444358560707.issue969718@psf.upfronthosting.co.za> ?ric Araujo added the comment: Pythons in Debian seem to be immune to this problem, thanks to this patch: http://deb.li/3ku1g (via http://lists.debian.org/debian-python/2010/12/msg00005.html). I haven?t had time to learn the intricacies of make variables yet, so I can?t approve a patch. I?m adding people from the nosy lists of other make variables bugs, hopefully someone will be able to review. ---------- nosy: +brett.cannon, georg.brandl, jyasskin, lemburg, lukasz.langa, mark.dickinson, pitrou, ronaldoussoren, skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 02:18:19 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 01:18:19 +0000 Subject: [issue969718] BASECFLAGS are not passed to module build line Message-ID: <1296782299.2.0.606040475156.issue969718@psf.upfronthosting.co.za> ?ric Araujo added the comment: Duplicate report from Stephan Krah: When CFLAGS are set, distutils drops -fno-strict-aliasing (among other flags): $ python2.7 setup.py build ... gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/usr/local/include -I/usr/local/include/python2.7 -c src/gmpy.c -o build/temp.linux-x86_64-2.7/src/gmpy.o ... $ CFLAGS="-fomit-frame-pointer" python2.7 setup.py build ... gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fomit-frame-pointer -fPIC -I./src -I/usr/local/include -I/usr/local/include/python2.7 -c src/gmpy.c -o build/temp.linux-x86_64-2.7/src/gmpy.o src/gmpy.c: In function ?_cmp_to_object?: src/gmpy.c:4692: warning: dereferencing type-punned pointer will break strict-aliasing rules ... I'm not sure if this is intentional. The documentation says: "Compiler flags can also be supplied through setting the CFLAGS environment variable. If set, the contents of CFLAGS will be added to the compiler flags specified in the Setup file." To me, this sounds as if they should be appended to the regular flags. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 02:21:19 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 01:21:19 +0000 Subject: [issue9168] setuid in smtp.py sheds privileges before binding port In-Reply-To: <1278346841.06.0.147409219565.issue9168@psf.upfronthosting.co.za> Message-ID: <1296782479.75.0.223818981012.issue9168@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +needs review stage: -> patch review type: crash -> behavior versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 02:23:35 2011 From: report at bugs.python.org (Brett Cannon) Date: Fri, 04 Feb 2011 01:23:35 +0000 Subject: [issue8914] Run clang's static analyzer In-Reply-To: <1275795174.58.0.536949662024.issue8914@psf.upfronthosting.co.za> Message-ID: <1296782615.39.0.835842931473.issue8914@psf.upfronthosting.co.za> Brett Cannon added the comment: OK, done going through the results. Attached is a patch with all of the fixes (only one actual bug which I file an issue for separately; everything else is removing a little bit of dead code here and there). ---------- Added file: http://bugs.python.org/file20669/wheres_my_pony.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 02:26:08 2011 From: report at bugs.python.org (Brett Cannon) Date: Fri, 04 Feb 2011 01:26:08 +0000 Subject: [issue11110] Py_DECREF->Py_XDECREF in Module/_sqlite/module.c In-Reply-To: <1296782768.85.0.000422256440074.issue11110@psf.upfronthosting.co.za> Message-ID: <1296782768.85.0.000422256440074.issue11110@psf.upfronthosting.co.za> New submission from Brett Cannon : Pretty straight forward change, but could potentially cause a NULL pointer deref in a rare situation. diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c --- a/Modules/_sqlite/module.c +++ b/Modules/_sqlite/module.c @@ -329,7 +329,7 @@ (pysqlite_statement_setup_types() < 0) || (pysqlite_prepare_protocol_setup_types() < 0) ) { - Py_DECREF(module); + Py_XDECREF(module); return NULL; } ---------- components: Extension Modules files: fix_sqlite.diff keywords: patch messages: 127853 nosy: brett.cannon, georg.brandl priority: release blocker severity: normal stage: commit review status: open title: Py_DECREF->Py_XDECREF in Module/_sqlite/module.c versions: Python 3.2 Added file: http://bugs.python.org/file20670/fix_sqlite.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 02:27:34 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 01:27:34 +0000 Subject: [issue8933] Invalid detection of metadata version In-Reply-To: <1275927761.19.0.897367518837.issue8933@psf.upfronthosting.co.za> Message-ID: <1296782854.79.0.698050057802.issue8933@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +easy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 02:38:16 2011 From: report at bugs.python.org (Ron Adam) Date: Fri, 04 Feb 2011 01:38:16 +0000 Subject: [issue1038909] pydoc method documentation lookup enhancement Message-ID: <1296783496.78.0.0109037944048.issue1038909@psf.upfronthosting.co.za> Ron Adam added the comment: I agree. It is close enough to be a duplicate. I suggest closing it. As Ka-Ping noted in the other issue: "There's a link to the base class provided if you want to find out what the base class does." This is easy to do if your viewing pydoc output in a web browser. And you can also look at the source code to see any comments. At some point we can consider enhancing the command line help mode to make it easier to do the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 02:47:13 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 01:47:13 +0000 Subject: [issue9399] Provide a 'print' action for argparse In-Reply-To: <1280329840.94.0.288179215378.issue9399@psf.upfronthosting.co.za> Message-ID: <1296784033.87.0.914652059317.issue9399@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the new patch. It does not apply cleanly to the py3k branch, but that?s very easily corrected. self.file.write(self.message) self.file.write('\n') Could be replaced by print(self.message, file=self.file) print will use the right EOL for the platform and is just coooler. By the way, self.file should not be rebound in __call__: if self.file is None: self.file = _sys.stdout ? file = (self.file if self.file is not None else _sys.stdout) > Second, there are cases where you want whitespaces to be preserved, > like printing out the license of your program (as I mentioned in my > first post) Just look at this BSD license: [...] > This is just plain ugly. Agreed, but I did not suggest that the output be like that. In my previous message, I suggested that argparse could replace \n with spaces and do its own line wrapping, to adapt to terminal length while avoiding chunking ugliness. That?s Steven?s call anyway, I don?t have any strong feeling in favor of preserving whitespace or rewrapping. If argparse wraps lines to the terminal width in other cases (like with epilog text), I think it should do so here too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 02:50:05 2011 From: report at bugs.python.org (reynaldo) Date: Fri, 04 Feb 2011 01:50:05 +0000 Subject: [issue11111] See "Gmail" on your Google homepage In-Reply-To: <000e0cd215a2adb38b049b6b1962@google.com> Message-ID: <000e0cd215a2adb38b049b6b1962@google.com> New submission from reynaldo : Your friend, renben77 at gmail.com, has sent you the following Google Gadget. See "Gmail" on your Google homepage ?? screenshot ---------- files: unnamed messages: 127856 nosy: renben priority: normal severity: normal status: open title: See "Gmail" on your Google homepage Added file: http://bugs.python.org/file20671/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Your friend, renben77 at gmail.com, has sent you the following Google Gadget.



screenshot From report at bugs.python.org Fri Feb 4 02:51:18 2011 From: report at bugs.python.org (John Dennis) Date: Fri, 04 Feb 2011 01:51:18 +0000 Subject: [issue11104] distutils sdist ignores MANIFEST In-Reply-To: <1296691544.53.0.327829038157.issue11104@psf.upfronthosting.co.za> Message-ID: <1296784278.57.0.380904421065.issue11104@psf.upfronthosting.co.za> John Dennis added the comment: $ tar xzf distutils_bug.tar.gz $ cd distutils_bug $ ./setup.py sdist $ ./setup.py sdist running sdist running check warning: sdist: manifest template 'MANIFEST.in' does not exist (using default file list) not writing to manually maintained manifest file 'MANIFEST' creating foobar-1.0 making hard links in foobar-1.0... hard linking README -> foobar-1.0 hard linking setup.py -> foobar-1.0 creating dist Creating tar archive removing 'foobar-1.0' (and everything under it) $ cat MANIFEST README setup.py my_special_file Note, the MANIFEST should have been read and the resulting tar file should have had my_special_file in it. sdist complains about a missing MANIFEST.in template which it shouldn't, it should use the existing MANIFEST, it also emits a warning about not overwriting a manually maintained MANIFEST which it shouldn't. It should just use the existing MANIFEST. ---------- Added file: http://bugs.python.org/file20672/distutils_bug.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 03:11:38 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Feb 2011 02:11:38 +0000 Subject: [issue11111] See "Gmail" on your Google homepage In-Reply-To: <000e0cd215a2adb38b049b6b1962@google.com> Message-ID: <1296785498.68.0.147871353188.issue11111@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Spam. ---------- nosy: +belopolsky -renben status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 03:21:37 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Feb 2011 02:21:37 +0000 Subject: [issue11110] Py_DECREF->Py_XDECREF in Module/_sqlite/module.c In-Reply-To: <1296782768.85.0.000422256440074.issue11110@psf.upfronthosting.co.za> Message-ID: <1296786097.38.0.394659083351.issue11110@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It may be clearer and match Python coding style better to fix it as follows: Index: Modules/_sqlite/module.c =================================================================== --- Modules/_sqlite/module.c (revision 88320) +++ Modules/_sqlite/module.c (working copy) @@ -321,14 +321,16 @@ module = PyModule_Create(&_sqlite3module); - if (!module || - (pysqlite_row_setup_types() < 0) || - (pysqlite_cursor_setup_types() < 0) || - (pysqlite_connection_setup_types() < 0) || - (pysqlite_cache_setup_types() < 0) || - (pysqlite_statement_setup_types() < 0) || - (pysqlite_prepare_protocol_setup_types() < 0) - ) { + if (module == NULL) + return NULL; + + if (pysqlite_row_setup_types() < 0 || + pysqlite_cursor_setup_types() < 0 || + pysqlite_connection_setup_types() < 0 || + pysqlite_cache_setup_types() < 0 || + pysqlite_statement_setup_types() < 0 || + pysqlite_prepare_protocol_setup_types() < 0) + { Py_DECREF(module); return NULL; } ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 03:46:52 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 02:46:52 +0000 Subject: [issue11045] shutil._make_tarball In-Reply-To: <1296222490.15.0.786706157889.issue11045@psf.upfronthosting.co.za> Message-ID: <1296787612.4.0.697063971755.issue11045@psf.upfronthosting.co.za> ?ric Araujo added the comment: Arg, #9173 had a patch including a test. Not sure which bug is superseded by the other. ---------- nosy: +fdrake, paulsmith, v_peter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 03:49:12 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 02:49:12 +0000 Subject: [issue9173] logger statement not guarded in shutil._make_tarball In-Reply-To: <1278374700.0.0.888108186461.issue9173@psf.upfronthosting.co.za> Message-ID: <1296787752.46.0.968155220509.issue9173@psf.upfronthosting.co.za> ?ric Araujo added the comment: Duplicate report #11045 was opened recently; I didn?t remember this report and committed a one-line fix without a test. Should we try to get a test into 3.2.0? ---------- nosy: +georg.brandl, kelseyhightower, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 04:04:09 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 03:04:09 +0000 Subject: [issue6142] distutils2 clean command: Remove extension modules built in-place In-Reply-To: <1243612271.53.0.396822187567.issue6142@psf.upfronthosting.co.za> Message-ID: <1296788649.05.0.0696882450942.issue6142@psf.upfronthosting.co.za> ?ric Araujo added the comment: Discussion summary: - clean is supposed to remove the products of build - build_ext is a subcommand of build - build_ext with the inplace option writes files that are not removed by clean - removing .pyc files is out of scope (they?re products of normal Python behavior, not related to distutils) ? I?m reclassifying this as a distutils2 feature request concerning the products of build_ext --inplace. I?m not sure whether we should remove those products when the --all option is given to clean, or add a new option that we could enable by default. ---------- assignee: tarek -> components: +Distutils2 -Distutils stage: -> needs patch title: Distutils doesn't remove .pyc files -> distutils2 clean command: Remove extension modules built in-place versions: +3rd party -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 04:06:03 2011 From: report at bugs.python.org (rmtew) Date: Fri, 04 Feb 2011 03:06:03 +0000 Subject: [issue11112] UDPTimeoutTest derives from SocketTCPTest In-Reply-To: <1296788763.68.0.867412797858.issue11112@psf.upfronthosting.co.za> Message-ID: <1296788763.68.0.867412797858.issue11112@psf.upfronthosting.co.za> New submission from rmtew : File: Lib\test\test_socket.py Code: class UDPTimeoutTest(SocketTCPTest): Problem: This test is intended to test UDP sockets, but derives from SocketTCPTest. Logic dictates this should derive from SocketUDPTest. I've searched for UDP (with differing case, as that seems to matter) in several different fields on this site, and found no relevant matches. ---------- components: Tests messages: 127863 nosy: rmtew priority: normal severity: normal status: open title: UDPTimeoutTest derives from SocketTCPTest versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 04:12:26 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 03:12:26 +0000 Subject: [issue9691] sdist includes files that are not in MANIFEST.in In-Reply-To: <1282822249.86.0.974734126224.issue9691@psf.upfronthosting.co.za> Message-ID: <1296789146.11.0.97964053408.issue9691@psf.upfronthosting.co.za> ?ric Araujo added the comment: Can?t reproduce on POSIX (linux2) either. Have you tested with 3.1, 3.2 and distutils2? ---------- components: +Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 04:43:55 2011 From: report at bugs.python.org (Brian Jones) Date: Fri, 04 Feb 2011 03:43:55 +0000 Subject: [issue11113] html.entities mapping dicts need updating? In-Reply-To: <1296791035.1.0.458454998569.issue11113@psf.upfronthosting.co.za> Message-ID: <1296791035.1.0.458454998569.issue11113@psf.upfronthosting.co.za> New submission from Brian Jones : In Python 3.2b2, html.entities.codepoint2name and name2codepoint only support the 252 HTML entity names defined in the HTML 4 spec from 1997. I'm wondering if there's a reason not to support W3C Recommendation 'XML Entity Definitions for Characters' http://www.w3.org/TR/xml-entity-names/ This standard contains significantly more characters, and it is noted in that spec that the HTML 5 drafts use that spec's entities. You can see the current HTML 5 'Named character references' here: http://www.w3.org/TR/html5/named-character-references.html#named-character-references If this is just a matter of somebody going in to do the grunt work, let me know. If startup costs associated with importing a huge dictionary are a concern, perhaps a more efficient type that enables the same lookup interface can be defined. If other reasons exist to not move in this direction, please do let me know! ---------- components: Library (Lib), Unicode, XML messages: 127865 nosy: Brian.Jones priority: normal severity: normal status: open title: html.entities mapping dicts need updating? type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 04:44:00 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Feb 2011 03:44:00 +0000 Subject: [issue10419] distutils command build_scripts fails with UnicodeDecodeError In-Reply-To: <1289766753.91.0.865805184241.issue10419@psf.upfronthosting.co.za> Message-ID: <1296791040.31.0.357322558878.issue10419@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 04:46:07 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Feb 2011 03:46:07 +0000 Subject: [issue2437] Distutils runtime_library_dirs broken on Windows In-Reply-To: <1206044595.46.0.100105317073.issue2437@psf.upfronthosting.co.za> Message-ID: <1296791167.11.0.528081827215.issue2437@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 04:47:39 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 03:47:39 +0000 Subject: [issue8688] distutils sdist is too lazy w.r.t. recalculating MANIFEST In-Reply-To: <1273581168.94.0.337026684583.issue8688@psf.upfronthosting.co.za> Message-ID: <1296791259.84.0.373020685064.issue8688@psf.upfronthosting.co.za> ?ric Araujo added the comment: There is a bug in the new code. See #11104. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 04:47:41 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Feb 2011 03:47:41 +0000 Subject: [issue7100] test_xmlrpc: global name 'stop_serving' is not defined In-Reply-To: <1255207170.52.0.845543632042.issue7100@psf.upfronthosting.co.za> Message-ID: <1296791261.27.0.620219885786.issue7100@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 04:51:50 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 03:51:50 +0000 Subject: [issue11104] distutils sdist ignores MANIFEST In-Reply-To: <1296691544.53.0.327829038157.issue11104@psf.upfronthosting.co.za> Message-ID: <1296791510.86.0.970214765374.issue11104@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thank you, the bug is clear now. To fix this regression, the first step is to turn your tarball and instructions into a unit test and then fix the logic in the code. If you want to do it, there are some process guidelines at http://wiki.python.org/moin/Distutils/FixingBugs ---------- assignee: tarek -> eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 05:16:44 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 04:16:44 +0000 Subject: [issue10860] Handle empty port after port delimiter in httplib In-Reply-To: <1294427670.55.0.855321383674.issue10860@psf.upfronthosting.co.za> Message-ID: <1296793004.9.0.406385978952.issue10860@psf.upfronthosting.co.za> ?ric Araujo added the comment: >From RFC 3986, section 6.2.3 ?Scheme-Based Normalization?: The syntax and semantics of URIs vary from scheme to scheme, as described by the defining specification for each scheme. Implementations may use scheme-specific rules, at further processing cost, to reduce the probability of false negatives. For example, because the "http" scheme makes use of an authority component, has a default port of "80", and defines an empty path to be equivalent to "/", the following four URIs are equivalent: http://example.com http://example.com/ http://example.com:/ http://example.com:80/ IOW, the empty string is not an invalid port. The patch fixes that. It includes tests but lacks a doc update. I think it works for https URIs too, but I?d like a test to make sure. ---------- resolution: invalid -> stage: needs patch -> patch review status: pending -> open versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 05:54:19 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Feb 2011 04:54:19 +0000 Subject: [issue9756] Crash with custom __getattribute__ In-Reply-To: <1283515984.36.0.673218996521.issue9756@psf.upfronthosting.co.za> Message-ID: <1296795259.01.0.739948825072.issue9756@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Here is a somewhat more straightforward way to reproduce the problem: >>> class X: ... __class__ = int ... [55910 refs] >>> isinstance(X(), int) True [55914 refs] >>> int.bit_length(X()) Assertion failed: (PyLong_Check(v)), function long_bit_length, file ../py3k-commit/Objects/longobject.c, line 4413. Abort trap The place to implement a stricter check would be in methoddescr_call() function defined in Objects/descrobject.c, but it may affect legitimate tricks. On the other hand, requiring that every C implemented method checks the type of self in a type-specific way is probably not feasible either. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 06:18:08 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Feb 2011 05:18:08 +0000 Subject: [issue10042] total_ordering stack overflow In-Reply-To: <1286440012.74.0.624864175042.issue10042@psf.upfronthosting.co.za> Message-ID: <1296796688.99.0.0678104726857.issue10042@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- type: crash -> behavior versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 06:43:12 2011 From: report at bugs.python.org (H Xu) Date: Fri, 04 Feb 2011 05:43:12 +0000 Subject: [issue11106] python 2.6.6 and python 2.7.1 cannot be built successfully because of an segment fault on NetBSD-5.1-sparc In-Reply-To: <1296754271.48.0.967126521261.issue11106@psf.upfronthosting.co.za> Message-ID: <1296798192.7.0.306427812326.issue11106@psf.upfronthosting.co.za> H Xu added the comment: The result of 'make install SHELL="bash -x"' seems nothing different with the "make install". Could there be any other way to debug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 08:38:38 2011 From: report at bugs.python.org (Ned Deily) Date: Fri, 04 Feb 2011 07:38:38 +0000 Subject: [issue10736] test_ttk_guionly fails on OS X using ActiveState Tcl 8.5.9 (Cocoa) In-Reply-To: <1292765395.17.0.260810328922.issue10736@psf.upfronthosting.co.za> Message-ID: <1296805118.19.0.677110018298.issue10736@psf.upfronthosting.co.za> Ned Deily added the comment: After looking into these two test failures a bit more, it looks like both are due to regressions and/or bugs in the ActiveState Tk 8.5.9 Cocoa behavior versus the Apple Cocoa Tk 8.5.7, with which neither test fails. The test_tab_identifiers failure may be a test case error where the test is making unwarranted assumptions about how the Notebook widget lays out its tabs. The test_traversal failure may need to be modified to use a different key modifier for OS X ( ->