From report at bugs.python.org Sun Feb 1 00:04:31 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 31 Jan 2009 23:04:31 +0000 Subject: [issue5104] getsockaddrarg() casts port number from int to short without any warning In-Reply-To: <1233271436.92.0.964920785544.issue5104@psf.upfronthosting.co.za> Message-ID: <1233443071.5.0.436504367774.issue5104@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Fixed in trunk (2.7) r69156. All places in socketmodule that called htons and silently truncated values that were too large have been changed to raise OverflowError. Unit tests included. I'm leaving this open until it is merged into the py3k branch for 3.1. ---------- keywords: +easy priority: low -> normal versions: +Python 3.1 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 00:30:46 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 31 Jan 2009 23:30:46 +0000 Subject: [issue4718] wsgiref package totally broken In-Reply-To: <1229945457.69.0.495711258596.issue4718@psf.upfronthosting.co.za> Message-ID: <1233444646.96.0.516232863417.issue4718@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I assume the buildbots were placated? ---------- nosy: +benjamin.peterson resolution: accepted -> fixed status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 00:39:12 2009 From: report at bugs.python.org (Mark Hammond) Date: Sat, 31 Jan 2009 23:39:12 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233445152.98.0.929881174119.issue4804@psf.upfronthosting.co.za> Mark Hammond added the comment: I believe your new patch suffers the same problem. Consider the blocks like: + /* turn off crt asserts on windows since we have no control over fd */ + Py_BEGIN_CRT_ERROR_HANDLING Py_BEGIN_ALLOW_THREADS size = write(fd, pbuf.buf, (size_t)pbuf.len); Py_END_ALLOW_THREADS + Py_END_CRT_ERROR_HANDLING And consider Martin's comments in msg80191: Here you have T1 setting a global mode, then releasing the GIL. Other threads are then free to run and may do the same and depending on the order the threads do things, the global setting may not end up where it started. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 00:39:23 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jan 2009 23:39:23 +0000 Subject: [issue4704] Update pybench for python 3.0 In-Reply-To: <1229770440.73.0.84111592631.issue4704@psf.upfronthosting.co.za> Message-ID: <1233445163.83.0.895708189545.issue4704@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch changes results a lot compared to the previous version (BuiltinFunctionCalls is 3x slower). I propose the following patch, which gives roughly the same runtimes as before (I use divmod() and max() rather than complex() and pow()). Added file: http://bugs.python.org/file12909/pybench3.0-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 00:54:17 2009 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 31 Jan 2009 23:54:17 +0000 Subject: [issue5119] wide character parameter handling in ctypes In-Reply-To: <1233435219.37.0.934884464449.issue5119@psf.upfronthosting.co.za> Message-ID: <1233446057.56.0.961453817495.issue5119@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I've confirmed that my original assumption was quite false, and that even if the parameters are the correct width, WNetAddConnection2W behaves differently in 64-bit windows versus 32-bit windows, so it made a bad test case. So I've changed the title of this issue, because I still would like to know if it is proper for ctypes to accept a narrow string but treat it as a wide string without converting it. ---------- title: inconsistent wide character parameter handling in 64-bit python -> wide character parameter handling in ctypes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 01:16:23 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 01 Feb 2009 00:16:23 +0000 Subject: [issue4903] binascii.crc32() - document signed vs unsigned results In-Reply-To: <1231556278.06.0.571264691147.issue4903@psf.upfronthosting.co.za> Message-ID: <1233447383.44.0.626775841524.issue4903@psf.upfronthosting.co.za> Gregory P. Smith added the comment: wording updated in r69159, thanks. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 01:31:25 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 01 Feb 2009 00:31:25 +0000 Subject: [issue4903] binascii.crc32() - document signed vs unsigned results In-Reply-To: <1231556278.06.0.571264691147.issue4903@psf.upfronthosting.co.za> Message-ID: <1233448285.8.0.938086896562.issue4903@psf.upfronthosting.co.za> Gregory P. Smith added the comment: and r69161, r69160, r69162, r69163, r69164. ---------- resolution: -> fixed status: open -> closed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 01:33:37 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 01 Feb 2009 00:33:37 +0000 Subject: [issue4448] should socket readline() use default_bufsize instead of _rbufsize? In-Reply-To: <1227819431.06.0.748604307582.issue4448@psf.upfronthosting.co.za> Message-ID: <1233448417.83.0.542308371685.issue4448@psf.upfronthosting.co.za> Gregory P. Smith added the comment: unassigning, i don't have time to look at this one right now. ---------- assignee: gregory.p.smith -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 03:20:40 2009 From: report at bugs.python.org (Zooko O'Whielacronx) Date: Sun, 01 Feb 2009 02:20:40 +0000 Subject: [issue4706] try to build a C module, but don't worry if it doesn't work In-Reply-To: <1229782192.75.0.491587462854.issue4706@psf.upfronthosting.co.za> Message-ID: <1233454840.44.0.825329744806.issue4706@psf.upfronthosting.co.za> Zooko O'Whielacronx added the comment: Hey check it out -- simplejson can try to build its extension module, and when it fails to compile (in this case because there is no Python.h), then it prints out a warning message and finishes a successful build: Added file: http://bugs.python.org/file12910/build-with-no-Python.h.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 03:21:44 2009 From: report at bugs.python.org (Zooko O'Whielacronx) Date: Sun, 01 Feb 2009 02:21:44 +0000 Subject: [issue4706] try to build a C module, but don't worry if it doesn't work In-Reply-To: <1229782192.75.0.491587462854.issue4706@psf.upfronthosting.co.za> Message-ID: <1233454904.03.0.798804846091.issue4706@psf.upfronthosting.co.za> Zooko O'Whielacronx added the comment: Oh! And simplejson is able to cleanly fall back to pure Python when gcc is not found, as well. Perhaps Twisted http://twistedmatrix.com/trac/ticket/3586 could use simplejson's approach. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 03:21:52 2009 From: report at bugs.python.org (Zooko O'Whielacronx) Date: Sun, 01 Feb 2009 02:21:52 +0000 Subject: [issue4706] try to build a C module, but don't worry if it doesn't work In-Reply-To: <1229782192.75.0.491587462854.issue4706@psf.upfronthosting.co.za> Message-ID: <1233454912.36.0.176072958938.issue4706@psf.upfronthosting.co.za> Changes by Zooko O'Whielacronx : Added file: http://bugs.python.org/file12911/build-with-no-gcc.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 03:28:01 2009 From: report at bugs.python.org (Zooko O'Whielacronx) Date: Sun, 01 Feb 2009 02:28:01 +0000 Subject: [issue4706] try to build a C module, but don't worry if it doesn't work In-Reply-To: <1229782192.75.0.491587462854.issue4706@psf.upfronthosting.co.za> Message-ID: <1233455281.0.0.126814335669.issue4706@psf.upfronthosting.co.za> Zooko O'Whielacronx added the comment: Here's Twisted failing to build when gcc is not installed: Added file: http://bugs.python.org/file12912/Twisted-build-with-no-gcc.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 03:59:10 2009 From: report at bugs.python.org (Zooko O'Whielacronx) Date: Sun, 01 Feb 2009 02:59:10 +0000 Subject: [issue4706] try to build a C module, but don't worry if it doesn't work In-Reply-To: <1229782192.75.0.491587462854.issue4706@psf.upfronthosting.co.za> Message-ID: <1233457150.8.0.919558806294.issue4706@psf.upfronthosting.co.za> Zooko O'Whielacronx added the comment: Here's Twisted failing to build because Python.h isn't found: Added file: http://bugs.python.org/file12913/Twisted-build-no-Python.h.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 04:07:01 2009 From: report at bugs.python.org (Ben Kuhn) Date: Sun, 01 Feb 2009 03:07:01 +0000 Subject: [issue5121] PyRun_InteractiveLoop disagrees with documentation? In-Reply-To: <1233457621.0.0.661616898289.issue5121@psf.upfronthosting.co.za> Message-ID: <1233457621.0.0.661616898289.issue5121@psf.upfronthosting.co.za> New submission from Ben Kuhn : The description of PyRun_InteractiveLoop(FILE * file, const char * filename) states that if filename is NULL, "???" will be used instead. In actuality, if the method is called with a NULL filename, it will segfault after the first command is entered. Example: //main.c #include int main(int argc, char * argv[]) { Py_Initialize(); PyRun_InteractiveLoop(stdin, NULL); } //stdin >>>import math results in a segfault. Python 3.0, Windows 7 beta, MinGW -LC:\Python30\libs -lpython30, 32-bit Intel. ---------- components: Interpreter Core messages: 80900 nosy: bkuhn severity: normal status: open title: PyRun_InteractiveLoop disagrees with documentation? type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 04:07:50 2009 From: report at bugs.python.org (Ben Kuhn) Date: Sun, 01 Feb 2009 03:07:50 +0000 Subject: [issue5121] PyRun_InteractiveLoop disagrees with documentation? In-Reply-To: <1233457621.0.0.661616898289.issue5121@psf.upfronthosting.co.za> Message-ID: <1233457670.35.0.691650334235.issue5121@psf.upfronthosting.co.za> Changes by Ben Kuhn : ---------- versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 05:45:09 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 01 Feb 2009 04:45:09 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> New submission from Guilherme Polo : Recently I've added this test named test_ttk_guionly, and I noticed some buildslaves went red, like amd64 gentoo trunk and x86 FreeBSD trunk (I though there were others for the reason I'm going to say next, but didn't found on a quick look). amd 64 gentoo trunk is failing with: . . test_ttk_guionly test_ttk_guionly skipped -- ttk not available: no display name and no $DISPLAY environment variable . . test_tcl remoteFailed: [Failure instance: Traceback (failure with no frames): twisted.internet.error.ConnectionLost: Connection to the other side was lost in a non-clean fashion. ] When it is not test_tcl, it is test_ttk_guionly. I tried duplicating the issue here by creating a buildmaster and a buildslave, used same options to build and to run tests, also tried enabling and disabling pty (I've found some old emails about problems involving pty), but couldn't duplicate it. So I followed a build on this buildslave "amd 64 gentoo trunk" and noticed it took a long time from the time it started running test_tcl till when the error appeared, which makes me imagine there is some problem regarding X server authorization. Now this is when I started checking how many other slaves were failing with the same error, and then I found this "x86 FreeBSD trunk" which failed with the following message: . . test_ttk_guionly test_ttk_guionly skipped -- ttk not available: can't find package tile . . test_tcl XIO: fatal IO error 9 (Bad file descriptor) on X server ":0.0" after 25 requests (23 known processed) with 1 events remaining. *** Error code 1 This second bot had DISPLAY set, while the first didn't (although its TERM is set to xterm). I wonder if the first error ends up being the same as this second one. I'm asking myself if test_ttk_guionly is so wrong that it should be disabled everywhere, and even if it gets disabled, what if in the future another test comes in and "conflicts" with test_tcl ? ---------- components: Tkinter messages: 80901 nosy: gpolo severity: normal status: open title: test_tcl and test_ttk_guionly don't like each other versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 07:26:50 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 01 Feb 2009 06:26:50 +0000 Subject: [issue4428] make io.BufferedWriter observe max_buffer_size limits In-Reply-To: <1227616500.52.0.902847325707.issue4428@psf.upfronthosting.co.za> Message-ID: <1233469610.21.0.925281909499.issue4428@psf.upfronthosting.co.za> Changes by Gregory P. Smith : Added file: http://bugs.python.org/file12914/issue4428-io-bufwrite-gps05.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 07:29:50 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 01 Feb 2009 06:29:50 +0000 Subject: [issue4428] make io.BufferedWriter observe max_buffer_size limits In-Reply-To: <1227616500.52.0.902847325707.issue4428@psf.upfronthosting.co.za> Message-ID: <1233469790.98.0.466547378099.issue4428@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I've uploaded a new patch set with more extensive unit tests. It also handles the case of writing array.array objects (or anything with a memoryview itemsize > 1). The previous code would buffer by item rather than by byte. it has been updated in codereview as well. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 07:30:56 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 01 Feb 2009 06:30:56 +0000 Subject: [issue4428] make io.BufferedWriter observe max_buffer_size limits In-Reply-To: <1227616500.52.0.902847325707.issue4428@psf.upfronthosting.co.za> Message-ID: <1233469856.49.0.00408071536858.issue4428@psf.upfronthosting.co.za> Gregory P. Smith added the comment: fwiw, I decided Guido and Antoine were right and took out the support for input that did not support len() to keep things a bit simpler. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 08:41:43 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 01 Feb 2009 07:41:43 +0000 Subject: [issue5117] os.path.relpath problem with root drive directory on windows In-Reply-To: <1233386752.72.0.952122419494.issue5117@psf.upfronthosting.co.za> Message-ID: <1233474103.53.0.537129296194.issue5117@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- versions: +Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 10:52:23 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 01 Feb 2009 09:52:23 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233481943.83.0.187632101441.issue4804@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Ah, but I think you missed the main point of the new patch. There is a counter incremented and decremented. So, the State is set only when the first thread enters a guarded section, and then restored when the final thread leaves the section. There is no per-thread storage of the previous state anymore, only static variables storing the "unmodified state" to restore to when the last thread leaves a guarded section. As long as some thread is in a guarded section, assertions and stuff is turned off, otherwise, we keep the old ones. This is similar in some ways to the special version of Py_BEGIN_ALLOW_THREADS (FILE_BEGIN_ALLOW_THREADS, was it?) used in fileio.c. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 10:55:09 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 01 Feb 2009 09:55:09 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233482109.1.0.0982554229648.issue4804@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: The important function is _Py_SetCRTErrorHandler() in errors.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 11:56:43 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 01 Feb 2009 10:56:43 +0000 Subject: [issue5117] os.path.relpath problem with root directory In-Reply-To: <1233386752.72.0.952122419494.issue5117@psf.upfronthosting.co.za> Message-ID: <1233485803.27.0.503936259286.issue5117@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- title: os.path.relpath problem with root drive directory on windows -> os.path.relpath problem with root directory _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 12:01:19 2009 From: report at bugs.python.org (Mark Hammond) Date: Sun, 01 Feb 2009 11:01:19 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233486079.41.0.480347232493.issue4804@psf.upfronthosting.co.za> Mark Hammond added the comment: Fair enough - but assertions are still disabled while your "reference count" is >0, which is still while other arbitrary code is running. While I agree this is an improvement, I'm afraid I'm not playing close enough attention to understand why your patch is better than, eg, simply disabling such assertions globally during the test run. Given the patch in issue5116, this could be implemented in far less lines of code - certainly less intrusive lines. Would this not achieve the same result? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 13:35:21 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 01 Feb 2009 12:35:21 +0000 Subject: [issue1717] Get rid of more references to __cmp__ In-Reply-To: <1199205565.64.0.0495465164968.issue1717@psf.upfronthosting.co.za> Message-ID: <1233491721.31.0.409032388132.issue1717@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for the review, Antoine. Stage 2 applied to py3k in r69181, merged to 3.0 in r69182. cmp, PyObject_Cmp and PyObject_Compare removed in r69184 (py3k) and r69185 (release30-maint). There's still the rename of the tp_compare slot to deal with, and a fair amount of cleaning up and documentation fixing to do. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 13:55:19 2009 From: report at bugs.python.org (johan de taeye) Date: Sun, 01 Feb 2009 12:55:19 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1233492919.55.0.227501466735.issue4120@psf.upfronthosting.co.za> johan de taeye added the comment: Is the report posted in: http://groups.google.com/group/comp.lang.python/browse_thread/thread/3ec 6af1279a162ca# also a symptom of the same problem? Johan ---------- nosy: +jdetaeye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 14:29:58 2009 From: report at bugs.python.org (hlqyq) Date: Sun, 01 Feb 2009 13:29:58 +0000 Subject: [issue5123] Virus found in python-3.0.msi Message-ID: <1233494998.76.0.590591282424.issue5123@psf.upfronthosting.co.za> Changes by hlqyq : ---------- components: Windows nosy: hlqyq severity: normal status: open title: Virus found in python-3.0.msi type: security versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 14:38:25 2009 From: report at bugs.python.org (Koen van de Sande) Date: Sun, 01 Feb 2009 13:38:25 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1233495505.91.0.856058666081.issue4120@psf.upfronthosting.co.za> Koen van de Sande added the comment: @johan: no it is not a symptom of the same problem. The problem you are having is that the executable which is embedding Python does not have a manifest. If you add a manifest with a dependency on the VC90 runtimes to the main executable, then it should work AFAIK. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 16:49:45 2009 From: report at bugs.python.org (johan de taeye) Date: Sun, 01 Feb 2009 15:49:45 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1233503385.06.0.956587628462.issue4120@psf.upfronthosting.co.za> johan de taeye added the comment: @koen: You're aboslutely right. The issue is solved indeed by adding a dependency in the manifest. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 18:53:22 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 01 Feb 2009 17:53:22 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233510802.54.0.135518746324.issue4804@psf.upfronthosting.co.za> Martin v. L?wis added the comment: FWIW, I'm also -1 on the proposed patch. While it does achieve what it wants to achieve, I believe that the goal of the patch is undesirable. It makes things worse, not better, by introducing the risk of race conditions against other (native) threads - where currently, we would get reproducable behavior. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 19:02:03 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 01 Feb 2009 18:02:03 +0000 Subject: [issue5114] 2.5.4.3 / test_threading hangs In-Reply-To: <1233347094.1.0.608806299681.issue5114@psf.upfronthosting.co.za> Message-ID: <1233511323.67.0.928745298947.issue5114@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +gps priority: -> normal type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 19:07:14 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 01 Feb 2009 18:07:14 +0000 Subject: [issue5123] Virus found in python-3.0.msi In-Reply-To: <1233511634.03.0.537354059865.issue5123@psf.upfronthosting.co.za> Message-ID: <1233511634.03.0.537354059865.issue5123@psf.upfronthosting.co.za> New submission from Martin v. L?wis : Do you have any proof for that claim? What specific binary, what virus, what virus checker? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 19:09:30 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 01 Feb 2009 18:09:30 +0000 Subject: [issue5113] 2.5.4.3 / test_posix failing on HPUX systems In-Reply-To: <1233346333.57.0.365853135308.issue5113@psf.upfronthosting.co.za> Message-ID: <1233511770.01.0.654511906978.issue5113@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If you try "chown root foobar", with being a valid file you own, does it succeed? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 19:52:14 2009 From: report at bugs.python.org (Weeble) Date: Sun, 01 Feb 2009 18:52:14 +0000 Subject: [issue5124] IDLE - pasting text doesn't delete selection In-Reply-To: <1233514334.85.0.801099495729.issue5124@psf.upfronthosting.co.za> Message-ID: <1233514334.85.0.801099495729.issue5124@psf.upfronthosting.co.za> New submission from Weeble : Steps to reproduce: 1. Start IDLE. 2. Enter some text: spam eggs 3. Select the first line ("spam") and press control+c to copy. 4. Select the second line ("eggs") and press control+v to paste. Expected result: spam spam (With the caret at the end of the second line and no selection.) Actual result (IDLE 2.6, Tk/Tcl 8.4, Linux): spam eggsspam (With "eggs" selected and the caret at the end of the second line.) I don't think this happens to me on Windows. It might be deliberate; I know that Tk has slightly different behaviour on Windows and Linux. But it doesn't seem to be consistent with other behaviour: for example, if instead of pasting I start typing, the selected text is erased and the typed text replaces it. I can look into this myself, but I would appreciate if someone else can confirm that this is not the expected behaviour, since perhaps it is only my Windows background that leads me to expect this. ---------- components: IDLE messages: 80914 nosy: weeble severity: normal status: open title: IDLE - pasting text doesn't delete selection _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 20:04:39 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 01 Feb 2009 19:04:39 +0000 Subject: [issue5124] IDLE - pasting text doesn't delete selection In-Reply-To: <1233514334.85.0.801099495729.issue5124@psf.upfronthosting.co.za> Message-ID: <1233515079.02.0.0434611896416.issue5124@psf.upfronthosting.co.za> Guilherme Polo added the comment: This is not really related to IDLE, it is how the Text widget behaves under Linux, you will notice the same with tcl/tk 8.5. Nevertheless, I would prefer to have the same results under Windows and Linux. ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 20:25:09 2009 From: report at bugs.python.org (Alex Willmer) Date: Sun, 01 Feb 2009 19:25:09 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1233516309.9.0.71891341839.issue2636@psf.upfronthosting.co.za> Alex Willmer added the comment: I've been trying, and failing to understand the state of play with this bug. The most recent upload is issue2636+01+09-02+17+18+19+20+21+24+26_speedup.diff, but I can't seem to apply that to anything. Nearly every hunk fails when I try against 25-maint, 26-maint or trunk. How does one apply this? Do I need to apply mrabarnett's patches from bug 3825? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 20:48:30 2009 From: report at bugs.python.org (=?utf-8?q?Reto_Sch=C3=BCttel?=) Date: Sun, 01 Feb 2009 19:48:30 +0000 Subject: [issue5125] Strange locale problem with Python 3 In-Reply-To: <1233517710.32.0.869509955584.issue5125@psf.upfronthosting.co.za> Message-ID: <1233517710.32.0.869509955584.issue5125@psf.upfronthosting.co.za> New submission from Reto Sch?ttel : Hi While helping Brandon Rhodes to port PyEphem[1] to Python 3 we struggled over a strange locale-related problem on OS X. PyEphem is a library which can do astronomical computations like tracking the position of stars, planets and earth satellites relative to the earth's position. When testing out the Python 3 release of PyEphem I noticed that on my OS X laptop a lot of calculations were wrong (not completely wrong, but clearly not accurate) compared to Python 2.5. We (well mostly Brandon) were able to track down the problem to the TLE parser (TLE are data file containing the orbital elements of an object) which appears to read most values wrong with python 3. In fact it cut of the decimal parts of all floats (1.123232 got 1, etc). Manually setting LANG and LC_ALL to C solved the problem. It turns out that some parts of Python 3 got more locale dependent on some platforms. The only platform I am aware of is OS X, on Linux Python 3 appears to behave like Python 2.x did. In case of PyEphem the problem was in the C extension which got more locale dependent, for example atof() or scanf() with Python 3 now expected the german decimal-delimiter ',' instead of the '.' in floats (3.14 vs. 3,14). On the other hand the constructor of float still expects '.' all the time. But the built-in function strptime() honors locales with Python 3 and expects german week day. I've written a simple script and a simple C extension which illustrates the problem. Both the extension and the script run python 2.x and python 3, so you can easily compare the result while executing the script in different environments. I was only able to reproduce the problem on OS X (10.5) and using a german locale like "de_CH.UTF-8". When manually setting LC_ALL=C, the differences disappears. I can't imagine that his behavior was really intended, and I hope the test case helps you guys to identify/fix this problem. Download the test case from: http://github.com/retoo/py3k-locale-problem/tarball/master or get it using git: git://github.com/retoo/py3k-locale-problem.git You can use the following steps to build it: $ python2.5 setup.py build $ python3.0 setup.py build To run the tests with python 2.5, enter: $ (cd build/lib*-2.5; python2.5 py3k_locale_problem.py) ... for 3.0 ... $ (cd build/lib*-3.0; python3.0 py3k_locale_problem.py) In the file 'results.txt' you can see the output from my OS X system. Cheers, Reto Sch?ttel [1] http://rhodesmill.org/pyephem/ ---------- components: Interpreter Core messages: 80917 nosy: retoo severity: normal status: open title: Strange locale problem with Python 3 type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 21:53:39 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 01 Feb 2009 20:53:39 +0000 Subject: [issue5084] unpickling does not intern attribute names In-Reply-To: <1233093140.55.0.0122548653801.issue5084@psf.upfronthosting.co.za> Message-ID: <1233521619.85.0.216569964288.issue5084@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Why do you call PyString_AsString() followed by PyString_FromString()? Strings are immutable so you shouldn't neek to take a copy. Besides, it would be nice to add a test. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 22:11:57 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 01 Feb 2009 21:11:57 +0000 Subject: [issue5126] Space character returns false from isprintable() method In-Reply-To: <1233522128.92.0.321891922918.issue5126@psf.upfronthosting.co.za> Message-ID: <1233522717.73.0.6146052526.issue5126@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Confirmed here. ---------- nosy: +georg.brandl, ishimoto, pitrou priority: -> high stage: -> test needed versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 22:46:45 2009 From: report at bugs.python.org (David W. Lambert) Date: Sun, 01 Feb 2009 21:46:45 +0000 Subject: [issue5126] Space character returns false from isprintable() method In-Reply-To: <1233522128.92.0.321891922918.issue5126@psf.upfronthosting.co.za> Message-ID: <1233524805.84.0.183608920979.issue5126@psf.upfronthosting.co.za> David W. Lambert added the comment: Python 3.0rc1+ (py3k, Nov 5 2008, 14:44:46) [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> ' '.isprintable() # probably no surprise: False >>> import sys >>> sys.getdefaultencoding() 'utf-8' ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 22:02:10 2009 From: report at bugs.python.org (dlfjessup) Date: Sun, 01 Feb 2009 21:02:10 +0000 Subject: [issue5126] Space character returns false from isprintable() method In-Reply-To: <1233522128.92.0.321891922918.issue5126@psf.upfronthosting.co.za> Message-ID: <1233522128.92.0.321891922918.issue5126@psf.upfronthosting.co.za> New submission from dlfjessup : I am running IDLE on Windows XP. The version information when IDLE boots is: Python 3.0 (r30:67507, Dec 3 2008, 20:14:27) [MSC v.1500 32 bit (Intel)] on win32 I ran the following test case: >>> ' '.isprintable() False However, according to http://docs.python.org/3.0/library/stdtypes.htm#str.isprintable, "...the ASCII space (0x20) ... is considered printable." This seems pretty broken to me. ---------- messages: 80919 nosy: dlfjessup severity: normal status: open title: Space character returns false from isprintable() method type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 22:31:53 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 01 Feb 2009 21:31:53 +0000 Subject: [issue5126] Space character returns false from isprintable() method In-Reply-To: <1233522128.92.0.321891922918.issue5126@psf.upfronthosting.co.za> Message-ID: <1233523913.5.0.0625855220291.issue5126@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 23:11:40 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 01 Feb 2009 22:11:40 +0000 Subject: [issue5126] Space character returns false from isprintable() method In-Reply-To: <1233522128.92.0.321891922918.issue5126@psf.upfronthosting.co.za> Message-ID: <1233526300.16.0.973924062209.issue5126@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This was introduced in r64701, which failed to include the space into PRINTABLE_MASK (issue 3282); it was excluded from NONPRINTABLE_MASK before. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 01:38:56 2009 From: report at bugs.python.org (hlqyq) Date: Mon, 02 Feb 2009 00:38:56 +0000 Subject: [issue5123] Virus found in python-3.0.msi In-Reply-To: <1233511634.03.0.537354059865.issue5123@psf.upfronthosting.co.za> Message-ID: <1233535136.14.0.93545092877.issue5123@psf.upfronthosting.co.za> hlqyq added the comment: There is a virus named "Trojan.Win32.Nodef.uy" in Msi.2b.exe file,I try to download more than one computer and get the same result.I use the "rising" killer in China(http://www.rising.com.cn) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 02:31:46 2009 From: report at bugs.python.org (Venusaur) Date: Mon, 02 Feb 2009 01:31:46 +0000 Subject: [issue5127] UnicodeEncodeError - I can't even see license In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> New submission from Venusaur : >>> license Traceback (most recent call last): File "", line 1, in File "C:\Python30\lib\site.py", line 372, in __repr__ self.__setup() File "C:\Python30\lib\site.py", line 359, in __setup data = fp.read() File "C:\Python30\lib\io.py", line 1724, in read decoder.decode(self.buffer.read(), final=True)) File "C:\Python30\lib\io.py", line 1295, in decode output = self.decoder.decode(input, final=final) UnicodeDecodeError: 'cp949' codec can't decode bytes in position 15164- 15165: il legal multibyte sequence >>> chr(0x10000) '\U00010000' >>> chr(0x11000) Traceback (most recent call last): File "", line 1, in File "C:\Python30\lib\io.py", line 1491, in write b = encoder.encode(s) UnicodeEncodeError: 'cp949' codec can't encode character '\ud804' in position 1: illegal multibyte sequence >>> I also can't understand why chr(0x10000) and chr(0x11000) has different behavior ---------- components: Unicode messages: 80924 nosy: bupjae severity: normal status: open title: UnicodeEncodeError - I can't even see license versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 02:42:15 2009 From: report at bugs.python.org (hlqyq) Date: Mon, 02 Feb 2009 01:42:15 +0000 Subject: [issue5123] Virus found in python-3.0.msi In-Reply-To: <1233511634.03.0.537354059865.issue5123@psf.upfronthosting.co.za> Message-ID: <1233538935.97.0.506252588596.issue5123@psf.upfronthosting.co.za> hlqyq added the comment: Sorry. There is no virus in python-3.0.msi. The rising checker mistake.when I use other checker such as kaspersky(www.kaspersky.com.cn),there all show no virus. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 02:44:16 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 02 Feb 2009 01:44:16 +0000 Subject: [issue5123] Virus found in python-3.0.msi In-Reply-To: <1233511634.03.0.537354059865.issue5123@psf.upfronthosting.co.za> Message-ID: <1233539056.3.0.328867552788.issue5123@psf.upfronthosting.co.za> Guilherme Polo added the comment: Thanks for verifying, closing as invalid. ---------- nosy: +gpolo resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 02:55:25 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 02 Feb 2009 01:55:25 +0000 Subject: [issue5120] Disabling test_ttk_guionly on mac In-Reply-To: <1233437150.39.0.445953575427.issue5120@psf.upfronthosting.co.za> Message-ID: <1233539725.21.0.340187099586.issue5120@psf.upfronthosting.co.za> Guilherme Polo added the comment: It seems to be good now after a recent modification in how tests are performed, closing. Sorry for the fuss. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 02:56:56 2009 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 02 Feb 2009 01:56:56 +0000 Subject: [issue5127] UnicodeEncodeError - I can't even see license In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1233539816.04.0.865880973678.issue5127@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here (winxpsp2, Py3, cp850-terminal) the license works fine: >>> license Type license() to see the full license text and license() works as well. I get this output for the chr()s: >>> chr(0x10000) '\U00010000' >>> chr(0x11000) Traceback (most recent call last): File "", line 1, in File "C:\Programs\Python30\lib\io.py", line 1491, in write b = encoder.encode(s) File "C:\Programs\Python30\lib\encodings\cp850.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_map)[0] UnicodeEncodeError: 'charmap' codec can't encode characters in position 1-2: character maps to I believe that chr(0x10000) and chr(0x11000) should have the opposite behavior. U+10000 (LINEAR B SYLLABLE B008 A) belongs to the 'Lo' category and should be printed (and possibly raise a UnicodeError, see issue5110 [1]), U+11000 belongs to the 'Cn' category and should be escaped[2]. On Linux with Py3 and a UTF-8 terminal, chr(0x10000) prints '\U00010000' and chr(0x11000) prints the char (actually I see two boxes, but it shouldn't be a problem of Python). The license() works fine too. Also note that with cp850 the error message is 'character maps to ' and with cp949 is 'illegal multibyte sequence'. [1]: http://bugs.python.org/issue5110 [2]: http://www.python.org/dev/peps/pep-3138/#specification ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 05:32:42 2009 From: report at bugs.python.org (Atsuo Ishimoto) Date: Mon, 02 Feb 2009 04:32:42 +0000 Subject: [issue5126] Space character returns false from isprintable() method In-Reply-To: <1233522128.92.0.321891922918.issue5126@psf.upfronthosting.co.za> Message-ID: <1233549162.74.0.739662292257.issue5126@psf.upfronthosting.co.za> Atsuo Ishimoto added the comment: I'm sorry, looks like my fault. I attached a patch to fix issue. This patch contains re-generated unicodetype_db.h. I downloaded Unicode 5.1.0 and Unicode 3.2.0 files from unicode.org to re-generate. ---------- keywords: +patch Added file: http://bugs.python.org/file12915/5126.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 09:49:15 2009 From: report at bugs.python.org (Kandalintsev Alexandre) Date: Mon, 02 Feb 2009 08:49:15 +0000 Subject: [issue5097] asyncore.dispatcher_with_send undocumented In-Reply-To: <1233235235.33.0.24123597522.issue5097@psf.upfronthosting.co.za> Message-ID: <1233564555.27.0.913405880803.issue5097@psf.upfronthosting.co.za> Kandalintsev Alexandre added the comment: Ok, I'll try :). I'll send it today or tomorrow. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 10:20:10 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 02 Feb 2009 09:20:10 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233566410.64.0.0036102285387.issue4804@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Mark, I have two concerns: 1) Python shouldn't (IMHO) crahs, even if you give bogus input to python functions. Making sure that it doesn't crash in the test suite is not enough, I think. 2) It shouldn't disable assertions and other runtime tests for other code just because of this, as I know you are in agreement with. My patch achieves the former, and also the latter in most cases. That is to say, yes, assertions will be disabled for the whole program during the time some thread is running one of the "fd" functions in the os module, but left alone otherwise. For the most part, a typical windows application (where this issue exists) will not be using those functions much anyway. If you want, we can split my patch in two: The fixes for the strftime and fopen() (checkable by us) and the fixes for invalid file desctiptors. The workaround for the latter seems more contentious. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 10:35:07 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 02 Feb 2009 09:35:07 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233567307.87.0.258661075042.issue4804@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Martin, your reproducable behaviour involves consistently disabling functionality that those threads you mention may rely on (and since this i is a global state that no one messes with, they are unlikely to be doing so) If the alternative is then just to live with invalid file descriptors causing crashes, except for the test suite, as Mark suggests, I can also live with that, I suppose. But then we would want the additional tests in my patch for strftime and fopen() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 10:37:18 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 02 Feb 2009 09:37:18 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233567438.62.0.868674916764.issue4804@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Btw, I am going to use our contact at MS to pressure them to expose a validation function for file descriptors to avoid this bloody mess. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 11:21:37 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 02 Feb 2009 10:21:37 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233570097.8.0.05178880523.issue4804@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Sorry for interruption. Maybe is _CrtSetReportHook useful? http://msdn.microsoft.com/en-us/library/0yysf5e6(VS.80).aspx 1. Call _CrtSetReportHook on startup 2. Py_BEGIN_CRT_ERROR_HANDLING sets flag in thread local storage. 3. In hook function, look at above flag and change return value of hook function. This is just impression from MSDN document, I didn't try yet. ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 11:26:28 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 02 Feb 2009 10:26:28 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233570388.12.0.282379533598.issue4804@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Of course, this won't work someone else altered hook function. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 11:30:58 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 02 Feb 2009 10:30:58 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233570658.33.0.460645412357.issue4804@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Interesting idea, but perhaps even more convoluted than my (admittedly) cumbersome patch. fyi, I've added this issue with MS: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx? FeedbackID=409955 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 12:16:53 2009 From: report at bugs.python.org (Mark Hammond) Date: Mon, 02 Feb 2009 11:16:53 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233573413.81.0.638764927551.issue4804@psf.upfronthosting.co.za> Mark Hammond added the comment: > Python shouldn't (IMHO) crahs, even if you give bogus input to > python functions. But it doesn't actually crash does it? It throws an assertion dialog, which sucks when the machine is unattended - which is why it is a problem for the buildbots - but otherwise if you hit 'ignore', things keep working IIUC? > Making sure that it doesn't crash in the test suite is > not enough, I think. I think it is enough. The tests are explicitly checking insane input to these functions but "in the real world" such assertions blowing would almost certainly be demonstrating a real bug. pywin32 has a similar issue - one or 2 tests cause such an assertion failure, but outside of the test suite, such assertions should always be enabled IMO. I'd even advocate the assertions are disabled only for the individual tests known to throw such errors and enabled for the rest. Hirokazu Yamamoto's suggestion sounds reasonable too, but still doesn't change my mind that it *is* reasonable to leave these assertions enabled in the general case, and thus the idea isn't really necessary IMO. Martin has the final say on what actually gets accepted though :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 12:36:23 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 02 Feb 2009 11:36:23 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233574583.08.0.479547073298.issue4804@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Well, as long as you think that an assertion is fine for the fd functions, I am fine with that too. I attach a limited patch to the fopen() and strftime() functions that avoids the assertions for those functions without messing with the runtime state. Added file: http://bugs.python.org/file12916/fopen.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 14:11:09 2009 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Mon, 02 Feb 2009 13:11:09 +0000 Subject: [issue4111] Add DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1233580269.01.0.432531303335.issue4111@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 15:19:36 2009 From: report at bugs.python.org (Martin von Gagern) Date: Mon, 02 Feb 2009 14:19:36 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233584376.51.0.787053739937.issue5128@psf.upfronthosting.co.za> Message-ID: <1233584376.51.0.787053739937.issue5128@psf.upfronthosting.co.za> New submission from Martin von Gagern : When trying to decide whether or not a given file needs to be recompiled, the inode creation time should be taken into account along with the file modification time. Scenario: Suppose you have three times, A < B < C < D. At time A, you package version 1 of foo.py. At time B, you package version 2. At time C you install version 1 onto some system, and byte-compile it for all users. Therefore foo.py has mtime A and ctime C, and foo.pyc has both mtime C. At time D you delete foo.py from version 1 and install version 2. Then you byte-compile it without force. At that time, foo.py has mtime B (because that was when it was packaged) but ctime D (because that was when the file was created). foo.pyc has mtime C (because that was when it was last modified). The current comparison compares only mtimes, sees C > B, and skips foo.py. With this patch in place, it will check for C > max(B, D), which is not the case, and thus recompile foo.c. In other words, max(st_mtime, st_ctime) can be interpreted as the last time a file at a given path was changed, either through modification of its contents (mtime) or deletion followed by recreation (ctime). Installation systems that overwrite files without deleting them before still are in the same trouble as before, but all others will benefit from this. See also: http://bugs.gentoo.org/256953 ---------- components: Library (Lib) messages: 80939 nosy: gagern severity: normal status: open title: compileall: consider ctime type: feature request versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 15:21:13 2009 From: report at bugs.python.org (Martin von Gagern) Date: Mon, 02 Feb 2009 14:21:13 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233584376.51.0.787053739937.issue5128@psf.upfronthosting.co.za> Message-ID: <1233584473.87.0.503570652463.issue5128@psf.upfronthosting.co.za> Changes by Martin von Gagern : ---------- keywords: +patch Added file: http://bugs.python.org/file12917/compileall-ctime.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 15:32:05 2009 From: report at bugs.python.org (Kandalintsev Alexandre) Date: Mon, 02 Feb 2009 14:32:05 +0000 Subject: [issue5097] asyncore.dispatcher_with_send undocumented In-Reply-To: <1233235235.33.0.24123597522.issue5097@psf.upfronthosting.co.za> Message-ID: <1233585125.84.0.575604944093.issue5097@psf.upfronthosting.co.za> Kandalintsev Alexandre added the comment: This is my explanation of dispatcher_with_send. As my english is far from perfect and I'm not expirienced writing documentation you need to review it and fix my mistakes. class asyncore.dispatcher_with_send This is class based on asyncore.dispatcher. The only difference that unlike dispatcher.send which is direct mean to the socket.send() send() of this class uses buffered io. At first all outgoing data saved to the buffer and later it will send when socket becomes avaliable for write. Thus dispatcher_with_send.send() will never return EWOULDBLOCK error. Also you shuldn't overrdie writable() method as in this dispatcher it will automatically return convient value depending weither output buffer empty or not. ---------- versions: +Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 15:36:16 2009 From: report at bugs.python.org (sy12) Date: Mon, 02 Feb 2009 14:36:16 +0000 Subject: [issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim In-Reply-To: <1233585376.12.0.459695435706.issue5129@psf.upfronthosting.co.za> Message-ID: <1233585376.12.0.459695435706.issue5129@psf.upfronthosting.co.za> New submission from sy12 : platform: Windows XP In a file (cf attached file) with mixed tabs and spaces, the line following "else:" appears at the same level than "else:", while the file probably still works with Python 2.6. At least, IDLE 2.5 or IDLE 2.4 or vim don't have this problem. ---------- components: IDLE files: bug.py messages: 80941 nosy: sy12 severity: normal status: open title: indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file12918/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 16:34:28 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Feb 2009 15:34:28 +0000 Subject: [issue4494] Python 2.6 fails to build with Py_NO_ENABLE_SHARED In-Reply-To: <1228250858.27.0.203382984925.issue4494@psf.upfronthosting.co.za> Message-ID: <1233588868.25.0.0896314750323.issue4494@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the patch. Committed as r69205, r69206, r69207, r69208. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 16:36:00 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Feb 2009 15:36:00 +0000 Subject: [issue2897] include structmember.h in Python.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1233588960.15.0.84568439077.issue2897@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- assignee: loewis -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 16:43:12 2009 From: report at bugs.python.org (Mitchell Model) Date: Mon, 02 Feb 2009 15:43:12 +0000 Subject: [issue5130] Obsolete reference to "unicode" in glossary In-Reply-To: <1233589391.96.0.438188518405.issue5130@psf.upfronthosting.co.za> Message-ID: <1233589391.96.0.438188518405.issue5130@psf.upfronthosting.co.za> New submission from Mitchell Model : The glossary entry for "sequence" mentions the type "unicode", but that's gone. ---------- assignee: georg.brandl components: Documentation messages: 80943 nosy: MLModel, georg.brandl severity: normal status: open title: Obsolete reference to "unicode" in glossary versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 16:47:38 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Feb 2009 15:47:38 +0000 Subject: [issue1581476] Text search gives bad count if called from variable trace Message-ID: <1233589658.64.0.312664981661.issue1581476@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch looks fine, please apply. We should come up with a deprecation strategy for GlobalCall, though, since that function is now mostly redundant. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 16:47:46 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Feb 2009 15:47:46 +0000 Subject: [issue1581476] Text search gives bad count if called from variable trace Message-ID: <1233589666.71.0.418203309786.issue1581476@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- assignee: loewis -> gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 16:58:13 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 02 Feb 2009 15:58:13 +0000 Subject: [issue4448] should socket readline() use default_bufsize instead of _rbufsize? In-Reply-To: <1227819431.06.0.748604307582.issue4448@psf.upfronthosting.co.za> Message-ID: <1233590293.19.0.669028207783.issue4448@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: I have looked at this for py3k. the behaviour of HTTPResponse.fp.read() is the same, wheter fp is buffered or not: a read() will read to EOF for HTTP/1.1, which means blocking indefinetely. So, read() is forbidden for HTTP/1.1. For fp.read(n), buffered IO won't attempt to read more than is on the stream, if n bytes are avalible (SocketIO.read(N) will return a _______________________________________ From report at bugs.python.org Mon Feb 2 17:04:57 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 02 Feb 2009 16:04:57 +0000 Subject: [issue4879] Allow buffering for HTTPResponse In-Reply-To: <1231411436.11.0.236061918484.issue4879@psf.upfronthosting.co.za> Message-ID: <1233590697.12.0.290907369042.issue4879@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Checked in r69209 to py3k _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 17:06:41 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Feb 2009 16:06:41 +0000 Subject: [issue1731706] tkinter memory leak problem Message-ID: <1233590801.02.0.981212450433.issue1731706@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think the patch is correct. gpolo, what's your opinion? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 17:34:02 2009 From: report at bugs.python.org (Nick Craig-Wood) Date: Mon, 02 Feb 2009 16:34:02 +0000 Subject: [issue5131] pprint doesn't know how to print a set or a defaultdict In-Reply-To: <1233592442.21.0.0563262599933.issue5131@psf.upfronthosting.co.za> Message-ID: <1233592442.21.0.0563262599933.issue5131@psf.upfronthosting.co.za> New submission from Nick Craig-Wood : I noticed this the other day when debugging a program that neither set() nor defaultdict() pprint() properly Same under 3.1 and 2.5 (Not tried 2.6/2.7 but I assume it is the same) >>> pprint(set(range(100))) set([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]) >>> from collections import defaultdict >>> pprint(defaultdict(int).fromkeys(range(100))) defaultdict(None, {0: None, 1: None, 2: None, 3: None, 4: None, 5: None, 6: None, 7: None, 8: None, 9: None, 10: None, 11: None, 12: None, 13: None, 14: None, 15: None, 16: None, 17: None, 18: None, 19: None, 20: None, 21: None, 22: None, 23: None, 24: None, 25: None, 26: None, 27: None, 28: None, 29: None, 30: None, 31: None, 32: None, 33: None, 34: None, 35: None, 36: None, 37: None, 38: None, 39: None, 40: None, 41: None, 42: None, 43: None, 44: None, 45: None, 46: None, 47: None, 48: None, 49: None, 50: None, 51: None, 52: None, 53: None, 54: None, 55: None, 56: None, 57: None, 58: None, 59: None, 60: None, 61: None, 62: None, 63: None, 64: None, 65: None, 66: None, 67: None, 68: None, 69: None, 70: None, 71: None, 72: None, 73: None, 74: None, 75: None, 76: None, 77: None, 78: None, 79: None, 80: None, 81: None, 82: None, 83: None, 84: None, 85: None, 86: None, 87: None, 88: None, 89: None, 90: None, 91: None, 92: None, 93: None, 94: None, 95: None, 96: None, 97: None, 98: None, 99: None}) >>> ---------- components: Library (Lib) messages: 80948 nosy: ncw severity: normal status: open title: pprint doesn't know how to print a set or a defaultdict type: feature request versions: Python 2.5, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 17:35:04 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Feb 2009 16:35:04 +0000 Subject: [issue1759169] clean up Solaris port and allow C99 extension modules Message-ID: <1233592504.01.0.506204671036.issue1759169@psf.upfronthosting.co.za> Martin v. L?wis added the comment: If the Sun guy only commented on _XOPEN_SOURCE_EXTENDED, I'm not sure that this also applies to _XOPEN_SOURCE. For example, on my Solaris 9, I have (in signal.h) conditionally #pragma redefine_extname sigwait __posix_sigwait and in sys/socket.h #pragma redefine_extname connect __xnet_connect So these feature selection macros not only select what API is declared in the header files, but also what specific semantics some of the functions have (e.g. if the traditional BSD semantics deviates from the POSIX semantics). In cases where there are alternative implementations of some system calls, we *want* to select the POSIX definition. So I think we should continue to define _XOPEN_SOURCE. I don't mind also defining __EXTENSIONS__. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 17:43:06 2009 From: report at bugs.python.org (Akira Kitada) Date: Mon, 02 Feb 2009 16:43:06 +0000 Subject: [issue1835] Update version number in __init__.py In-Reply-To: <1200417671.24.0.488273286588.issue1835@psf.upfronthosting.co.za> Message-ID: <1233592986.08.0.806802641472.issue1835@psf.upfronthosting.co.za> Akira Kitada added the comment: It seems the version number has been bumped now. Was it okay? ---------- nosy: +akitada, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 17:47:59 2009 From: report at bugs.python.org (Akira Kitada) Date: Mon, 02 Feb 2009 16:47:59 +0000 Subject: [issue1815] Distutils add ability to skip build [Feature Request] In-Reply-To: <1200168868.22.0.518070014613.issue1815@psf.upfronthosting.co.za> Message-ID: <1233593279.54.0.463595989353.issue1815@psf.upfronthosting.co.za> Akira Kitada added the comment: Python 3.0 has --skip-build, too. Can we close this ticket? ---------- nosy: +akitada, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 17:54:13 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 02 Feb 2009 16:54:13 +0000 Subject: [issue1815] Distutils add ability to skip build [Feature Request] In-Reply-To: <1200168868.22.0.518070014613.issue1815@psf.upfronthosting.co.za> Message-ID: <1233593653.14.0.814890088354.issue1815@psf.upfronthosting.co.za> Tarek Ziad? added the comment: right, nothing to fix here, the feature is available ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 17:55:20 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 02 Feb 2009 16:55:20 +0000 Subject: [issue1835] Update version number in __init__.py In-Reply-To: <1200417671.24.0.488273286588.issue1835@psf.upfronthosting.co.za> Message-ID: <1233593720.71.0.292502431113.issue1835@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: The distutils version number is now updated automatically by the Python release process, so the comment in that file can be removed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 17:58:29 2009 From: report at bugs.python.org (Akira Kitada) Date: Mon, 02 Feb 2009 16:58:29 +0000 Subject: [issue1109659] distutils argument parsing is bogus Message-ID: <1233593909.02.0.703394683676.issue1109659@psf.upfronthosting.co.za> Akira Kitada added the comment: Here's the usage of setup.py usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help and '--dry-run' is a global option. So it looks like valid behavior for me. ---------- nosy: +akitada, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:00:53 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 02 Feb 2009 17:00:53 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1233594053.4.0.66636831651.issue1875@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This was corrected by Benjamin with r69158. Now the yield statement is still optimized away, but at least the CO_GENERATOR flag is set only when compiling a function. ---------- nosy: +amaury.forgeotdarc, benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:02:01 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 02 Feb 2009 17:02:01 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233594121.74.0.204194688617.issue4804@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Maybe already conclusion is met, so probably I shouldn't post this patch but... here is the patch implementing msg80934. I believe this is thread safe. (This patch doesn't include codes of fopen.patch, but it doesn't mean they are not necessary. My patch is just a minimal patch for CRT hook) I'm not sure which way is the best, but I'm happy if popup dialog on test_os.py (test_fdopen) goes away. I'm startled every time. ;-) Added file: http://bugs.python.org/file12919/crt_report_hook.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:03:00 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 02 Feb 2009 17:03:00 +0000 Subject: [issue1109659] distutils argument parsing is bogus Message-ID: <1233594180.47.0.917013085506.issue1109659@psf.upfronthosting.co.za> Tarek Ziad? added the comment: yes, that's the expected behavior *But* we could add a warning, that says that an option was unused. ---------- assignee: -> tarek priority: normal -> low type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:05:10 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 02 Feb 2009 17:05:10 +0000 Subject: [issue1835] Update version number in __init__.py In-Reply-To: <1200417671.24.0.488273286588.issue1835@psf.upfronthosting.co.za> Message-ID: <1233594310.84.0.365410276846.issue1835@psf.upfronthosting.co.za> Tarek Ziad? added the comment: I'll change the comment explaining how things work now. ---------- assignee: lemburg -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:06:36 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 02 Feb 2009 17:06:36 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233594396.94.0.236138086153.issue4804@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Just impression. I feel Martin's "disable globally, and provide API to turn it on" is simple and good. +1/2. Of course, my impression is biased by the fact I have never used _ASSERTE even when debugging python. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:08:35 2009 From: report at bugs.python.org (Bill Janssen) Date: Mon, 02 Feb 2009 17:08:35 +0000 Subject: [issue4471] IMAP4 missing support for starttls In-Reply-To: <1228062796.45.0.215183772699.issue4471@psf.upfronthosting.co.za> Message-ID: <1233594515.35.0.456982866242.issue4471@psf.upfronthosting.co.za> Bill Janssen added the comment: Lorenzo, do we have test cases for this? I think you should try to add some test cases. We may need to set up some test mail servers on python.org to accommodate such tests. ---------- nosy: +janssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:11:59 2009 From: report at bugs.python.org (Armin Rigo) Date: Mon, 02 Feb 2009 17:11:59 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1233594719.75.0.51650651593.issue1875@psf.upfronthosting.co.za> Armin Rigo added the comment: ...which does not really solve anything, as "if 0: yield" at module-level is now just ignored instead of raising a SyntaxError (e.g. like "if False: yield"). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:12:30 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 02 Feb 2009 17:12:30 +0000 Subject: [issue4704] Update pybench for python 3.0 In-Reply-To: <1233445163.83.0.895708189545.issue4704@psf.upfronthosting.co.za> Message-ID: <4987297B.8020903@egenix.com> Marc-Andre Lemburg added the comment: On 2009-02-01 00:39, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > > The patch changes results a lot compared to the previous version > (BuiltinFunctionCalls is 3x slower). I propose the following patch, > which gives roughly the same runtimes as before (I use divmod() and > max() rather than complex() and pow()). Even better. However, please see my comments on the ticket: * the version numbers of unaffected tests do not need to be changed * the major pybench version number also doesn't need to be bumped to 3.0, a minor revision (2.1) is good enough Thanks, -- Marc-Andre Lemburg eGenix.com ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:17:11 2009 From: report at bugs.python.org (Akira Kitada) Date: Mon, 02 Feb 2009 17:17:11 +0000 Subject: [issue1052827] filelist.findall should use os.lstat Message-ID: <1233595031.66.0.0560828622063.issue1052827@psf.upfronthosting.co.za> Akira Kitada added the comment: This is reproducible, but I'm not sure why this could be a problem... Is there any use cases that you think it could be better than failing? ---------- nosy: +akitada, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:21:21 2009 From: report at bugs.python.org (sy12) Date: Mon, 02 Feb 2009 17:21:21 +0000 Subject: [issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim In-Reply-To: <1233585376.12.0.459695435706.issue5129@psf.upfronthosting.co.za> Message-ID: <1233595281.89.0.590637316754.issue5129@psf.upfronthosting.co.za> sy12 added the comment: IDLE's "untabify" feature (required by IDLE 2.6 when running from IDLE) seems to do the job correctly but this function doesn't inspire trust and might damage the code, because IDLE 2.6 is not able to correctly display mixed spaces and tabs (maybe for a reason linked to python 3 but I didn't find it in the logs, so maybe it's just a bug) and because of the default value given by the dialog, quite frightening: 4 spaces for a tab, instead of 8. By giving 8 the problem seems to be solved, even for IDLE 2.6. Maybe IDLE 2.6 is assuming by default that a tab is 4 spaces? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:23:35 2009 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 02 Feb 2009 17:23:35 +0000 Subject: [issue1835] Update version number in __init__.py In-Reply-To: <1200417671.24.0.488273286588.issue1835@psf.upfronthosting.co.za> Message-ID: <1233595415.88.0.0278227001512.issue1835@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:33:46 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 02 Feb 2009 17:33:46 +0000 Subject: [issue5052] Mark distutils to stay compatible with 2.3 In-Reply-To: <1232889518.53.0.767329174887.issue5052@psf.upfronthosting.co.za> Message-ID: <1233596026.18.0.240335554829.issue5052@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Some more explanation for why keeping distutils Python 2.3 compatible is desirable: distutils was removed from the PEP without any public discussion outside a sprint at PyCon and the reasons given for it did not take into account that people will want to use a single distutils version (that of the lastest released Python version) to build packages for multiple Python versions. distutils in Python 2.6 no longer works with Python 2.1, but it still does mostly with Python 2.3 and I would prefer to have to use that version as minimum required. Over the years I've always tried to rework any changes that were done which did not meet that requirement and only left non-Python 2.3 code in place that was not relevant for that version anyway, e.g. the new MSVC code for Python 2.6. Please also note that distutils is not a performance critical piece of software. Making it more developer friendly to extending via sub-classing and more user friendly by adding more support for platform specific installer format is much more important than using the latest and greatest tricks in Python. With Python 2.7 released, we can then move on to Python 2.4 compatibility and so on. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:34:04 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 02 Feb 2009 17:34:04 +0000 Subject: [issue5070] Distutils should create install dir if needed In-Reply-To: <1232985666.7.0.224838813352.issue5070@psf.upfronthosting.co.za> Message-ID: <1233596044.0.0.49840114121.issue5070@psf.upfronthosting.co.za> Tarek Ziad? added the comment: closing the issue since it's on setuptools side ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:35:31 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 02 Feb 2009 17:35:31 +0000 Subject: [issue5071] Distutils should not fail if install dir is not in PYTHONPATH In-Reply-To: <1232986221.07.0.343484520205.issue5071@psf.upfronthosting.co.za> Message-ID: <1233596131.68.0.055603086085.issue5071@psf.upfronthosting.co.za> Tarek Ziad? added the comment: closing for the same reason than #5070 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:35:41 2009 From: report at bugs.python.org (Akira Kitada) Date: Mon, 02 Feb 2009 17:35:41 +0000 Subject: [issue831643] Set option for subprocess in setup.py Message-ID: <1233596141.35.0.948224625746.issue831643@psf.upfronthosting.co.za> Akira Kitada added the comment: Sorry, but I don't understand this report. Is reported problem fixed already? ---------- nosy: +akitada, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:38:02 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 02 Feb 2009 17:38:02 +0000 Subject: [issue4137] update SIG web pages In-Reply-To: <1224230964.55.0.983457546691.issue4137@psf.upfronthosting.co.za> Message-ID: <1233596282.76.0.851414184786.issue4137@psf.upfronthosting.co.za> Tarek Ziad? added the comment: akidata has started to write some proposal changes he will submit to pydotorg. Georg, should we keep track of this here or it's ok to close this ticket and let the process continue in the ML ? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:43:11 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 02 Feb 2009 17:43:11 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1233596591.26.0.311902569973.issue3871@psf.upfronthosting.co.za> Tarek Ziad? added the comment: maybe you can group all your patch into one single issue since they are related, and remove old patches, ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 19:05:47 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 02 Feb 2009 18:05:47 +0000 Subject: [issue5127] UnicodeEncodeError - I can't even see license In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1233597947.96.0.779536968107.issue5127@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: There were non-ascii characters in the Windows license file. This was corrected with r67860. > I believe that chr(0x10000) and chr(0x11000) should have the > opposite behavior. This other problem is because on a narrow unicode build, Py_UNICODE_ISPRINTABLE takes a 16bit integer. And indeed, >>> unicodedata.category(chr(0x10000 % 65536)) 'Cc' >>> unicodedata.category(chr(0x11000 % 65536)) 'Lo' ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 19:06:04 2009 From: report at bugs.python.org (Lorenzo M. Catucci) Date: Mon, 02 Feb 2009 18:06:04 +0000 Subject: [issue4471] IMAP4 missing support for starttls In-Reply-To: <1228062796.45.0.215183772699.issue4471@psf.upfronthosting.co.za> Message-ID: <1233597964.92.0.934446259867.issue4471@psf.upfronthosting.co.za> Lorenzo M. Catucci added the comment: Thanks for following-up, Bill. While I fully understand the need for unit-testing, I don't have the guts to start writing a dummy imap server from scratch. I tested my changes on a couple of servers I manage, one running uw-imapd and the other running cyrus imapd; still, I don't think unit tests could rely on a "real" server. On the other hand, I don't think a python.org hosted test server would be a very wise choice: even if we found some dummy all-data-in-memory server, I fear the ssl/tls load on the server. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 19:19:48 2009 From: report at bugs.python.org (Andreas Kupries) Date: Mon, 02 Feb 2009 18:19:48 +0000 Subject: [issue5113] 2.5.4.3 / test_posix failing on HPUX systems In-Reply-To: <1233346333.57.0.365853135308.issue5113@psf.upfronthosting.co.za> Message-ID: <1233598788.6.0.880569856152.issue5113@psf.upfronthosting.co.za> Andreas Kupries added the comment: Yes. Session log: andreask at bertha:~/tmp/x> ll total 0 andreask at bertha:~/tmp/x> touch foobar andreask at bertha:~/tmp/x> ll total 0 -rw-rw-r-- 1 andreask DomainUsers 0 Feb 2 10:17 foobar andreask at bertha:~/tmp/x> chown root foobar andreask at bertha:~/tmp/x> ll total 0 -rw-rw-r-- 1 root DomainUsers 0 Feb 2 10:17 foobar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 19:19:54 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 02 Feb 2009 18:19:54 +0000 Subject: [issue4471] IMAP4 missing support for starttls In-Reply-To: <1228062796.45.0.215183772699.issue4471@psf.upfronthosting.co.za> Message-ID: <1233598794.36.0.728892103695.issue4471@psf.upfronthosting.co.za> Gregory P. Smith added the comment: For network tests like this where it is useful to test against external servers, could we just pick few known external servers that are unlikely to every go away? imap.gmail.com:993 for instance? (i don't know enough about imap to know if it supports what we need to test, I'll leave that up to you to determine :) Picking another host or two from other big ISPs would also be wise in order to test multiple server implementations. Once that is done, the tests that connect to external servers should be put in their own file marked as requiring the network resource. Similar to how its done in Lib/test/test_urllib2net.py. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 19:24:26 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Feb 2009 18:24:26 +0000 Subject: [issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim In-Reply-To: <1233585376.12.0.459695435706.issue5129@psf.upfronthosting.co.za> Message-ID: <1233599066.42.0.373885289932.issue5129@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't see a problem with Untabify. IDLE cannot know how big you intended your tabs to be, so it presents a dialog asking you. That seems reasonable to me. In most cases, the default is pretty good -- it attempts to infer the tab width by finding the first manual indentation using spaces: 'if:\n pass\nif:\n\tpass\n' --> guesses a two space indent What differences are you seeing between 2.5 and 2.6? Is it the initial display is different, is the untabify default different, or what? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 19:25:27 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 02 Feb 2009 18:25:27 +0000 Subject: [issue5113] 2.5.4.3 / test_posix failing on HPUX systems In-Reply-To: <1233346333.57.0.365853135308.issue5113@psf.upfronthosting.co.za> Message-ID: <1233599127.56.0.603824155576.issue5113@psf.upfronthosting.co.za> Antoine Pitrou added the comment: That explains what the test fails then. The test expects that you can't chown a file to root as a normal user, and it verifies that an exception is raised in that case. Do you know if this behaviour is standard under HP-UX? If so, what do sys.platform and platform.system() return? (this won't be fixed in 2.5 by the way: 2.5 only receives security fixes. 2.6 is the current stable branch and 2.7 is the in-development version) ---------- versions: +Python 2.6, Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 19:28:13 2009 From: report at bugs.python.org (Dave Peterson) Date: Mon, 02 Feb 2009 18:28:13 +0000 Subject: [issue5132] distutils: libpython not found when building python extensions on Solaris when Python was built with --enable-shared In-Reply-To: <1233599293.13.0.516383193111.issue5132@psf.upfronthosting.co.za> Message-ID: <1233599293.13.0.516383193111.issue5132@psf.upfronthosting.co.za> New submission from Dave Peterson : I've had trouble building Python extensions on Solaris if the Python install I'm using was built with the '--enable-shared' option. In tracking this down, it appears that the code in 'distutils/command/build_ext.py' contains a number of statements to detect a similar situation for other platforms and explicitly add the 'lib' dir option for the linker, but there is no similar detection for Solaris. I've attached a patch that fixes this and solves the problem for me. I simply extended the checking for 'linux' and 'gnu' platforms to also apply for 'sunos' platforms. ---------- components: Distutils files: distutils_command_build_ext.patch keywords: patch messages: 80977 nosy: dpeterson severity: normal status: open title: distutils: libpython not found when building python extensions on Solaris when Python was built with --enable-shared type: compile error versions: Python 2.5 Added file: http://bugs.python.org/file12920/distutils_command_build_ext.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 19:30:52 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 02 Feb 2009 18:30:52 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233584376.51.0.787053739937.issue5128@psf.upfronthosting.co.za> Message-ID: <1233599452.84.0.597554480243.issue5128@psf.upfronthosting.co.za> Brett Cannon added the comment: The problem is not that ctime should be taken into account, but that the .pyc file should be read for its timestamp and that should be used. Otherwise you are still deviating from what Python uses internally to decide whether bytecode should be regenerated. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 19:34:18 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 02 Feb 2009 18:34:18 +0000 Subject: [issue1731706] tkinter memory leak problem Message-ID: <1233599658.68.0.919746830477.issue1731706@psf.upfronthosting.co.za> Guilherme Polo added the comment: Do we still want to say _tkinter.c supports tcl/tk from version 8.2 and newer ? If yes, then we should add a no-op Tcl_ConditionFinalize when using tcl older than 8.3, because that was when this function got added. Besides that, the patch looks fine to me too (except I prefer Tcl_Condition *cond over Tcl_Condition* cond). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 19:40:28 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 02 Feb 2009 18:40:28 +0000 Subject: [issue1581476] Text search gives bad count if called from variable trace Message-ID: <1233600028.27.0.751257946849.issue1581476@psf.upfronthosting.co.za> Guilherme Polo added the comment: Uhm, is it fine to remove it for good in 3.1 ? And then add a warning in 2.7 when it gets called which in turns just call Tkapp_Call ? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 19:43:30 2009 From: report at bugs.python.org (Lorenzo M. Catucci) Date: Mon, 02 Feb 2009 18:43:30 +0000 Subject: [issue4471] IMAP4 missing support for starttls In-Reply-To: <1228062796.45.0.215183772699.issue4471@psf.upfronthosting.co.za> Message-ID: <1233600210.75.0.0969546336811.issue4471@psf.upfronthosting.co.za> Lorenzo M. Catucci added the comment: I just found out that the gmail servers don't support connections on the standard pop3/imapv4 ports, but only on the SSL wrapped ones. I'm unsure if cmu.edu anonymous imap server admin's would be happy with their server becoming python's official imap/pop testing playground; still, I just verified it does support TLS upgrades both for pop3 and imap and anonymous (read-only) logins. I think I could cook-up something. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 19:52:32 2009 From: report at bugs.python.org (David Nicol) Date: Mon, 02 Feb 2009 18:52:32 +0000 Subject: [issue5133] Error with Eval In-Reply-To: <1233600751.98.0.0626987723582.issue5133@psf.upfronthosting.co.za> Message-ID: <1233600751.98.0.0626987723582.issue5133@psf.upfronthosting.co.za> New submission from David Nicol : The single line statements: eval("08") ; and eval("09") both crash; while eval("07") works fine ---------- components: None messages: 80982 nosy: davidnicol severity: normal status: open title: Error with Eval type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 19:53:00 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Feb 2009 18:53:00 +0000 Subject: [issue5134] Compiler warnings in sqlite module In-Reply-To: <1233600780.48.0.187282999033.issue5134@psf.upfronthosting.co.za> Message-ID: <1233600780.48.0.187282999033.issue5134@psf.upfronthosting.co.za> New submission from Raymond Hettinger : >From a compilation of Py3.1 r69209 : ..\..\..\sqlite-3.5.9\sqlite3.c(9702) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(9703) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(9813) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(9814) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(9817) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(9818) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(9819) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(9820) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(9835) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(9836) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(9838) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(9881) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(9887) : warning C4244: '=' : conversion from 'double' to 'time_t', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(9903) : warning C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. C:\Program Files\Microsoft Visual Studio 8\VC\include\time.inl(114) : see declaration of 'localtime' ..\..\..\sqlite-3.5.9\sqlite3.c(9998) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(10004) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(10096) : warning C4244: '+=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(10102) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(10108) : warning C4244: '+=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(10309) : warning C4244: 'function' : conversion from 'u64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(10340) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(11146) : warning C4244: 'return' : conversion from 'sqlite3_int64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(13798) : warning C4244: '=' : conversion from 'sqlite3_int64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(14408) : warning C4244: 'initializing' : conversion from 'sqlite_uint64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(14741) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(16514) : warning C4244: '=' : conversion from 'u64' to 'unsigned char', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(16517) : warning C4244: '=' : conversion from 'u64' to 'unsigned char', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(16524) : warning C4244: '=' : conversion from 'u64' to 'u8', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(22425) : warning C4244: 'initializing' : conversion from 'sqlite3_int64' to 'LONG', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(22426) : warning C4244: 'initializing' : conversion from 'sqlite3_int64' to 'LONG', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(22458) : warning C4244: 'initializing' : conversion from 'sqlite3_int64' to 'LONG', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(22459) : warning C4244: 'initializing' : conversion from 'sqlite3_int64' to 'LONG', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(22490) : warning C4244: 'initializing' : conversion from 'sqlite3_int64' to 'LONG', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(22491) : warning C4244: 'initializing' : conversion from 'sqlite3_int64' to 'LONG', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(24580) : warning C4018: '>=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(24597) : warning C4018: '<' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(25331) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(25337) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(25564) : warning C4244: '=' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(25577) : warning C4244: '=' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(25592) : warning C4018: '<' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(25696) : warning C4244: '=' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(25712) : warning C4244: '=' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(25921) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(26221) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(26228) : warning C4244: '=' : conversion from 'i64' to 'Pgno', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(26230) : warning C4244: 'return' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(26314) : warning C4018: '<=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(26743) : warning C4018: '<=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(28366) : warning C4018: '<=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(30256) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(30258) : warning C4244: 'function' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(30946) : warning C4244: '=' : conversion from 'u16' to 'unsigned char', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(31766) : warning C4244: '=' : conversion from 'u16' to 'unsigned char', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(32268) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(32268) : warning C4018: '<=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(32933) : warning C4018: '<=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(33050) : warning C4244: '=' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(33055) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(33251) : warning C4244: '=' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(33258) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(33601) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(33651) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(33653) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(33658) : warning C4244: 'function' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(33659) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(33918) : warning C4018: '<=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(34054) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(34237) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(34308) : warning C4244: '+=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(34310) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(34483) : warning C4244: '=' : conversion from 'u16' to 'u8', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(34565) : warning C4244: '=' : conversion from 'u16' to 'u8', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(35959) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(36488) : warning C4244: '+=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(36784) : warning C4244: '=' : conversion from 'i64' to 'Pgno', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(36833) : warning C4244: 'initializing' : conversion from 'sqlite3_int64' to 'Pgno', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(36910) : warning C4244: 'initializing' : conversion from 'i64' to 'Pgno', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(37371) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(37379) : warning C4244: 'function' : conversion from 'i64' to 'size_t', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(37380) : warning C4244: '+=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(37731) : warning C4244: '+=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(37913) : warning C4244: '=' : conversion from 'const i64' to 'double', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(37918) : warning C4244: '=' : conversion from 'const i64' to 'double', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(38257) : warning C4244: 'return' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(40178) : warning C4244: 'return' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(40194) : warning C4244: '+=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(40301) : warning C4244: '=' : conversion from 'u64' to 'u8', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(40315) : warning C4244: '+=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(40470) : warning C4018: '<' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(40554) : warning C4018: '>=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(40579) : warning C4018: '<' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(40627) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(40672) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(41018) : warning C4244: 'return' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(41198) : warning C4244: '=' : conversion from 'double' to 'i64', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(41228) : warning C4244: '=' : conversion from 'double' to 'u64', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(43078) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(43088) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(43183) : warning C4244: '=' : conversion from 'i64' to 'double', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(43924) : warning C4244: '=' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(43945) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(43983) : warning C4018: '>=' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(44001) : warning C4018: '<' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(44018) : warning C4018: '<' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(44206) : warning C4244: '+=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(44229) : warning C4244: 'function' : conversion from 'u64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(44241) : warning C4244: 'function' : conversion from 'u64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(44246) : warning C4244: '=' : conversion from 'u64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(44463) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(44467) : warning C4244: '=' : conversion from 'i64' to 'u8', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(44603) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(45373) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(45517) : warning C4244: '=' : conversion from 'i64' to 'u32', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(45520) : warning C4018: '>' : signed/unsigned mismatch ..\..\..\sqlite-3.5.9\sqlite3.c(46131) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(46137) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(46563) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(46564) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(57437) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(57473) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(58001) : warning C4244: 'function' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(58273) : warning C4244: 'initializing' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(58274) : warning C4244: 'initializing' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(58275) : warning C4244: 'initializing' : conversion from 'i64' to 'int', possible loss of data ..\..\..\sqlite-3.5.9\sqlite3.c(71347) : warning C4244: '=' : conversion from 'u16' to 'unsigned char', possible loss of data ---------- assignee: ghaering components: Extension Modules messages: 80983 nosy: ghaering, rhettinger priority: low severity: normal status: open title: Compiler warnings in sqlite module type: compile error versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 19:54:33 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 02 Feb 2009 18:54:33 +0000 Subject: [issue5132] distutils: libpython not found when building python extensions on Solaris when Python was built with --enable-shared In-Reply-To: <1233599293.13.0.516383193111.issue5132@psf.upfronthosting.co.za> Message-ID: <1233600873.02.0.0324133041102.issue5132@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek nosy: +tarek versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 20:02:56 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Feb 2009 19:02:56 +0000 Subject: [issue5133] Error with Eval In-Reply-To: <1233600751.98.0.0626987723582.issue5133@psf.upfronthosting.co.za> Message-ID: <1233601376.55.0.765953972079.issue5133@psf.upfronthosting.co.za> Raymond Hettinger added the comment: They don't crash. They raise a SyntaxError because the "08" and "09" are invalid octal literals. If you're working with decimal literals that are padded on the left with zeroes, those need to be stripped off before conversion: '000987'.lstrip('0') --> '987' Or, you can use the int() function: int('000987') ---------- nosy: +rhettinger resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 20:04:13 2009 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 02 Feb 2009 19:04:13 +0000 Subject: [issue5133] Error with Eval In-Reply-To: <1233600751.98.0.0626987723582.issue5133@psf.upfronthosting.co.za> Message-ID: <1233601453.62.0.929702219734.issue5133@psf.upfronthosting.co.za> Ezio Melotti added the comment: The leading zero is used to define octal numbers, 8 and 9 are not valid octal digits, see http://docs.python.org/reference/lexical_analysis.html#integer-and-long-integer-literals Also, you don't need to use eval to reproduce that behavior. The number displayed is the decimal equivalent: >>> 07 7 >>> 010 8 ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 20:57:40 2009 From: report at bugs.python.org (Paul Moore) Date: Mon, 02 Feb 2009 19:57:40 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> New submission from Paul Moore : This patch takes the existing "simplegeneric" decorator, currently an internal implementation detail of the pkgutil module, and exposes it as a feature of the functools module. Documentation and tests have been added, and the pkgutil code has been updated to use the functools implementation. Open issue: The syntax for registering an overload is rather manual: def xxx_impl(xxx): pass generic_fn.register(XXX, xxx_impl) It might be better to make the registration function a decorator: @generic_fn.register(XXX) def xxx_impl(xxx): pass However, this would involve changing the existing (working) code, and I didn't want to do that before there was agreement that the general idea (of exposing the functionality) was sound. ---------- assignee: ncoghlan components: Library (Lib) files: generic.patch keywords: needs review, patch messages: 80986 nosy: ncoghlan, pmoore priority: normal severity: normal stage: patch review status: open title: Expose simplegeneric function in functools module type: feature request versions: Python 2.7 Added file: http://bugs.python.org/file12921/generic.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 21:01:31 2009 From: report at bugs.python.org (=?utf-8?q?Mart_S=C3=B5mermaa?=) Date: Mon, 02 Feb 2009 20:01:31 +0000 Subject: [issue2090] __import__ with fromlist=[''] causes double initialization of modules In-Reply-To: <1202849437.01.0.315019169694.issue2090@psf.upfronthosting.co.za> Message-ID: <1233604891.49.0.796777609967.issue2090@psf.upfronthosting.co.za> Mart S?mermaa added the comment: A pointer for people who keep referring to this bug -- after discussions, the following idiom was selected as the "official" way to import modules by name in 2.x (as seen in latest 2.x docs http://docs.python.org/dev/library/functions.html#__import__ ). --- If you simply want to import a module (potentially within a package) by name, you can get it from sys.modules: >>> import sys >>> name = 'foo.bar.baz' >>> __import__(name) >>> baz = sys.modules[name] >>> baz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 21:10:02 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 02 Feb 2009 20:10:02 +0000 Subject: [issue4343] New function in Tkinter.py: setup_master In-Reply-To: <1227011959.0.0.968897886388.issue4343@psf.upfronthosting.co.za> Message-ID: <1233605402.74.0.928918598626.issue4343@psf.upfronthosting.co.za> Guilherme Polo added the comment: Any chance I can get this in ? I'm using something very similar to test the ttk wrapper and will also be using in other tests, extensions would also benefit from it, and old code doesn't get affected to it. ---------- versions: +Python 3.1 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 21:10:57 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 02 Feb 2009 20:10:57 +0000 Subject: [issue2090] __import__ with fromlist=[''] causes double initialization of modules In-Reply-To: <1202849437.01.0.315019169694.issue2090@psf.upfronthosting.co.za> Message-ID: <1233605457.49.0.687631211239.issue2090@psf.upfronthosting.co.za> Brett Cannon added the comment: And just some more info, Python 2.7/3.1 have gained the importlib module/package and its import_module function which gives a much saner API than __import__. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 21:11:57 2009 From: report at bugs.python.org (sy12) Date: Mon, 02 Feb 2009 20:11:57 +0000 Subject: [issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim In-Reply-To: <1233585376.12.0.459695435706.issue5129@psf.upfronthosting.co.za> Message-ID: <1233605517.16.0.53101300753.issue5129@psf.upfronthosting.co.za> sy12 added the comment: The problem appeared in the initial display, with a file similar to bug.py. Here is how to reproduce it: 1. open the bug.py file with IDLE 2.5 (or with Firefox from the bugs.python.org website): the display shows the file the way the compiler will (probably) see it; 2. open the bug.py file with IDLE 2.6: the line 7 (just after "else:") is displayed differently. Summary: IDLE 2.6 doesn't display the indentation that the compiler will see. ----------------------------------------- About the secondary problem with Untabify (discovered when trying to solve the display problem without having to reinstall Python 2.5): Actually, Untabify is more a solution than a problem, except maybe that the only safe value is 8 spaces for a tabulation. Using a different value on legacy code (old code without tests) might add subtle bugs. According to the Python Language Reference: "First, tabs are replaced (from left to right) by one to eight spaces such that the total number of characters up to and including the replacement is a multiple of eight (this is intended to be the same rule as used by Unix)." ----------------------------------------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 21:22:51 2009 From: report at bugs.python.org (Martin von Gagern) Date: Mon, 02 Feb 2009 20:22:51 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233584376.51.0.787053739937.issue5128@psf.upfronthosting.co.za> Message-ID: <1233606171.41.0.0215041353208.issue5128@psf.upfronthosting.co.za> Martin von Gagern added the comment: Like this? Should the magic number be checked as well, and if so, against what value? I couldn't find that constant in any structure accessible from python, and jumping through hoops seems too much, as updating the python version should probably result in all system-wide modules being updated as well, at least on a well-maintained system. Added file: http://bugs.python.org/file12922/compileall-timestamp1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 21:26:34 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 02 Feb 2009 20:26:34 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233606171.41.0.0215041353208.issue5128@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Mon, Feb 2, 2009 at 12:22, Martin von Gagern wrote: > > Martin von Gagern added the comment: > > Like this? Don't have the time right now to do a code review right now, but hopefully I can get to this soon. > Should the magic number be checked as well, If one is already reading the file you might as well. > and if so, > against what value? imp.get_magic(). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 21:27:13 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 02 Feb 2009 20:27:13 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233584376.51.0.787053739937.issue5128@psf.upfronthosting.co.za> Message-ID: <1233606433.6.0.584309438186.issue5128@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 21:29:10 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 02 Feb 2009 20:29:10 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233584376.51.0.787053739937.issue5128@psf.upfronthosting.co.za> Message-ID: <1233606550.31.0.393671693084.issue5128@psf.upfronthosting.co.za> Brett Cannon added the comment: If you want an easy way to see how bytecode is checked, look at importlib._bootstrap in Python 3.1: http://svn.python.org/view/python/branches/py3k/Lib/importlib/_bootstrap.py?view=markup . Specifically, look at the get_code() method for _PyFileLoader. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 21:35:59 2009 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 02 Feb 2009 20:35:59 +0000 Subject: [issue5119] wide character parameter handling in ctypes In-Reply-To: <1233435219.37.0.934884464449.issue5119@psf.upfronthosting.co.za> Message-ID: <1233606959.98.0.153913247636.issue5119@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I see this in the documentation, which basically answers the question: "windll does not try to select [wide or narrow functions] by magic, you must access the version you need by specifying GetModuleHandleA or GetModuleHandleW explicitely, and then call it with normal strings or unicode strings respectively." This behavior is inconsistent with how structures are handled, where members are up-converted to unicode. For example. >>> class simple(Structure): >>> _fields_ = [('value', c_wchar_p)] >>> >>> simple('foo').value u'foo' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 21:37:03 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 02 Feb 2009 20:37:03 +0000 Subject: [issue2459] speedup for / while / if with better bytecode In-Reply-To: <1206224909.42.0.227263347483.issue2459@psf.upfronthosting.co.za> Message-ID: <1233607023.37.0.286386800885.issue2459@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is an updated patch against trunk. To be honest I don't think it has a lot of future: - it changes the lnotab format (to allow negative offsets) - it rewrites the buggy block reordering code in the pure Python compiler package, but nobody seems interested in maintaining that package (see #2472). Perhaps we should just declare the experiment failed and switch to something else. Added file: http://bugs.python.org/file12923/for_iter.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 21:42:36 2009 From: report at bugs.python.org (Martin von Gagern) Date: Mon, 02 Feb 2009 20:42:36 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233584376.51.0.787053739937.issue5128@psf.upfronthosting.co.za> Message-ID: <1233607356.1.0.881493137681.issue5128@psf.upfronthosting.co.za> Martin von Gagern added the comment: Next iteration. With magic number, and now also closing the file again. I changed from unpack and number comparison to pack and string comparison, makes things a bit easier, as there is only one comparison, and as underflow of the packed data isn't an issue any more. Would you prefer the use of private marshal functions, as bootstrap does, over the struct packing as I do here? Looking forward to your review. Added file: http://bugs.python.org/file12924/compileall-timestamp2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 22:10:51 2009 From: report at bugs.python.org (Roumen Petrov) Date: Mon, 02 Feb 2009 21:10:51 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1233609051.7.0.411932583421.issue3871@psf.upfronthosting.co.za> Roumen Petrov added the comment: The proposed patch for this issue include parts of other pending issues - so its all is single file. If python team don't like idea for "canonical host names" (part of issue 3754) this patch can be modified do not use host-triplet. Also some discussions in py-dev list show that small patches are preferred. I'm ready to split into small patches to be reviewed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 22:26:04 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Feb 2009 21:26:04 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1233567307.87.0.258661075042.issue4804@psf.upfronthosting.co.za> Message-ID: <498764E7.208@v.loewis.de> Martin v. L?wis added the comment: > Martin, your reproducable behaviour involves consistently disabling > functionality that those threads you mention may rely on Right. So with the current implementation, they notice immediately that something is wrong. > (and since > this i is a global state that no one messes with, they are unlikely to > be doing so) Except that Python messes with it, so in the small window where the assertions get disabled, they may run past them _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 22:26:20 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 02 Feb 2009 21:26:20 +0000 Subject: [issue1581476] Text search gives bad count if called from variable trace Message-ID: <1233609980.63.0.0897419561302.issue1581476@psf.upfronthosting.co.za> Guilherme Polo added the comment: Commited in r69217 (r69219), r69220, r69222, r69223 Martin, I will open another ticket about GlobalCall deprecation, later today. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 22:33:31 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Feb 2009 21:33:31 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1233594121.74.0.204194688617.issue4804@psf.upfronthosting.co.za> Message-ID: <498766A8.8080204@v.loewis.de> Martin v. L?wis added the comment: > I'm not sure which way is the best I think that is easy to answer: Python should validate all parameters, and report ValueError if any of the parameters would otherwise be rejected by the CRT. Then, we could leave assertions on, and would never trigger them. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 22:39:17 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Feb 2009 21:39:17 +0000 Subject: [issue1731706] tkinter memory leak problem In-Reply-To: <1233599658.68.0.919746830477.issue1731706@psf.upfronthosting.co.za> Message-ID: <49876802.8050502@v.loewis.de> Martin v. L?wis added the comment: > Do we still want to say _tkinter.c supports tcl/tk from version 8.2 and > newer ? If yes, then we should add a no-op Tcl_ConditionFinalize when > using tcl older than 8.3, because that was when this function got added. Good point. If we want to fix this in 2.6, we *have* to say that. If we ignore 2.6, and only fix 2.7, we could require a newer Tcl version. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 22:46:04 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Feb 2009 21:46:04 +0000 Subject: [issue5134] Compiler warnings in sqlite module In-Reply-To: <1233600780.48.0.187282999033.issue5134@psf.upfronthosting.co.za> Message-ID: <1233611164.56.0.351737842401.issue5134@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't think we should do anything about these, except perhaps for disabling all warnings when compiling the file. These are upstream sources, so we definitely should not "fix" them. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 22:51:02 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 02 Feb 2009 21:51:02 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233607356.1.0.881493137681.issue5128@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Mon, Feb 2, 2009 at 12:42, Martin von Gagern wrote: > > Martin von Gagern added the comment: > > Next iteration. With magic number, and now also closing the file again. > I changed from unpack and number comparison to pack and string > comparison, makes things a bit easier, as there is only one comparison, > and as underflow of the packed data isn't an issue any more. > > Would you prefer the use of private marshal functions, as bootstrap > does, over the struct packing as I do here? > No since importlib only does it that way for bootstrapping considerations (might end up at the implementation of import itself so it has special requirements). > Looking forward to your review. I have not looked, Martin, but are proper tests in place already in the standard library? If not I would appreciate tests. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 22:52:02 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 02 Feb 2009 21:52:02 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: Message-ID: Brett Cannon added the comment: On Mon, Feb 2, 2009 at 13:50, Brett Cannon wrote: > On Mon, Feb 2, 2009 at 12:42, Martin von Gagern wrote: >> >> Martin von Gagern added the comment: >> >> Next iteration. With magic number, and now also closing the file again. >> I changed from unpack and number comparison to pack and string >> comparison, makes things a bit easier, as there is only one comparison, >> and as underflow of the packed data isn't an issue any more. >> >> Would you prefer the use of private marshal functions, as bootstrap >> does, over the struct packing as I do here? >> > > No since importlib only does it that way for bootstrapping > considerations (might end up at the implementation of import itself so > it has special requirements). > >> Looking forward to your review. > > I have not looked, Martin, but are proper tests in place already in > the standard library? If not I would appreciate tests. > Although, now that I said that, I have had testing issues myself when it comes to mtime on bytecode as Python tends to execute faster than the granularity the file system supports. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 22:54:51 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Feb 2009 21:54:51 +0000 Subject: [issue1242657] list(obj) can swallow KeyboardInterrupt Message-ID: <1233611691.64.0.0612740852343.issue1242657@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for the review. Fixed in r69227. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 22:57:13 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Feb 2009 21:57:13 +0000 Subject: [issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim In-Reply-To: <1233585376.12.0.459695435706.issue5129@psf.upfronthosting.co.za> Message-ID: <1233611833.02.0.630280827926.issue5129@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> kbk nosy: +kbk priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 22:57:38 2009 From: report at bugs.python.org (pmoody) Date: Mon, 02 Feb 2009 21:57:38 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <1231183290.95.0.615124565518.issue3959@psf.upfronthosting.co.za> Message-ID: <8517e9350902021357p150773e8rc5282585e398d367@mail.gmail.com> pmoody added the comment: (kicking an old thread) On Mon, Jan 5, 2009 at 11:21 AM, Guido van Rossum wrote: > > Guido van Rossum added the comment: > > I've been on vacation and unable to follow this, and won't have time to > catch up now. Note that I have no vested interest in Google's module > except knowing it has many happy users (I have never used it myself -- > but Collin Winter has and he tells me it's great). > > Since I haven't used either module and am not particularly interested in > this functionality, I'm withdrawing myself from the set of experts who > can decide which is better. > > Duncan McGreggor asked some questions on python-dev; here are my responses: > >> * do we want to limit it to IP (i.e. no EUI/MAC support)? > > I don't want to exclude EUI/MAC support, but it seems quit a separate > (and much more specialized) application area, so it's probably best to > keep it separate (even if it may make sense to use a common (abstract > or concrete) base class or just have similar APIs). > >> * do we want a single module or is a package acceptable? > > I don't care either way. > >> * other thoughts? > > How about a merger? so we've talked about this on the ipaddr/netaddr lists and it seems like a merger is pretty unlikely. ipaddr and netaddr have some pretty fundamental design differences, to the point where a merger wouldn't mean a complete re-write of one or the other (in which case we're back to picking one over the other). so I guess a decision needs to be made. Is this something that should be made on python-dev or does this bug have enough visibility? for ipaddr's part, trunk is now pep8 compliant (with some backwards compatible aliases). I also know that David hasn't stopped adding features to netaddr as well. So, where do we go from here? Cheers, /peter > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 23:03:07 2009 From: report at bugs.python.org (Robin Stocker) Date: Mon, 02 Feb 2009 22:03:07 +0000 Subject: [issue5125] Strange locale problem with Python 3 In-Reply-To: <1233517710.32.0.869509955584.issue5125@psf.upfronthosting.co.za> Message-ID: <1233612187.04.0.364908703346.issue5125@psf.upfronthosting.co.za> Changes by Robin Stocker : ---------- nosy: +robin.stocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 23:04:41 2009 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 02 Feb 2009 22:04:41 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <1222298050.73.0.172554962966.issue3959@psf.upfronthosting.co.za> Message-ID: <1233612281.36.0.518929003287.issue3959@psf.upfronthosting.co.za> Guido van Rossum added the comment: Beats me. I personally haven't had the pleasure to use either so I can't decide. Maybe a vote or a bake-off? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 23:08:25 2009 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 02 Feb 2009 22:08:25 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <1222298050.73.0.172554962966.issue3959@psf.upfronthosting.co.za> Message-ID: <1233612505.62.0.462394612821.issue3959@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 23:08:58 2009 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 02 Feb 2009 22:08:58 +0000 Subject: [issue1717] Get rid of more references to __cmp__ In-Reply-To: <1199205565.64.0.0495465164968.issue1717@psf.upfronthosting.co.za> Message-ID: <1233612538.2.0.243562969508.issue1717@psf.upfronthosting.co.za> Mark Dickinson added the comment: All relevant changes from the py3k-issue1717 branch have now been merged into the py3k branch (and from there into the 3.0 maintenance branch), in a series of revisions. Here they are, listed in py3k/release30-maint pairs: r69188, r69189, r69190, r69191, r69192, r69193, r69214, r69215, r69218, r69221, r69224, r69225. The idea to raise TypeError on non-NULL tp_compare was abandoned after Martin pointed out that it would be a binary incompatible change _[1], but Nick Coghlan suggested a DeprecationWarning when tp_compare is non-NULL and tp_richcompare is NULL _[2], and remarked that the warning should also be implemented for Python 2.7 when run with the - 3 option. Still to do before this can be closed: - fix up Doc/extending/newtypes.rst; I think Georg has said he'll take care of this, so once everything else is done I'll just reassign this issue to him and let him get on with it. - add Nick Coghlan's suggested DeprecationWarning. - grep through the sources looking for tp_compare, __cmp__, cmpfunc, PyObject_Cmp, PyObject_Compare and cmp, and check all remaining references are legitimate. - update pybench; there's a separate issue already open for this. (issue 4704), and it looks like Antoine and Marc-Andr? are on the case. - anything else that I've forgotten. Thanks everyone for your help so far, especially Christian for much of the original code and Antoine for code and review. [1] http://mail.python.org/pipermail/python-dev/2009-February/085797.html [2] http://mail.python.org/pipermail/python-dev/2009-February/085809.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 23:14:41 2009 From: report at bugs.python.org (Duncan McGreggor) Date: Mon, 02 Feb 2009 22:14:41 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <1222298050.73.0.172554962966.issue3959@psf.upfronthosting.co.za> Message-ID: <1233612881.5.0.966405928675.issue3959@psf.upfronthosting.co.za> Duncan McGreggor added the comment: Well, here are my thoughts on the matter: * ipaddr is relatively small, fast, and focuses on some core functionality * netaddr is designed to be very flexible (sometimes at the cost of a little speed), leaning more towards a network calculation/address manipulation "framework" As such, and given the recent work made to ipaddr to make it stdlib-friendly, my vote would be to include ipaddr in Python while netaddr can continue growing, providing its user base with diverse functionality while hopefully taking advantage of ipaddr in the Python stdlib as much as is practical and useful. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 23:19:36 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Feb 2009 22:19:36 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <8517e9350902021357p150773e8rc5282585e398d367@mail.gmail.com> Message-ID: <49877174.70503@v.loewis.de> Martin v. L?wis added the comment: > so I guess a decision needs to be made. Is this something that should > be made on python-dev or does this bug have enough visibility? The bug doesn't have enough visibility, so it definitely needs to be discussed in public. > So, where do we go from here? Maybe some committer is willing to make a decision (I know that I will not, but I wouldn't be opposed to somebody else making one). Lacking that, the ususal procedures apply: either a) publish the respective code on the relevant sites, build community, and come back in a few years, or b) write a PEP, and ask for BDFL pronouncement in the end. IOW, it is not clear to me why a decision *needs* to be made (unless you count "defer" as a decision as well). Of course, in either a and b, there is a chance that the result will again be "defer" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 23:26:04 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Feb 2009 22:26:04 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <1233612881.5.0.966405928675.issue3959@psf.upfronthosting.co.za> Message-ID: <498772F9.109@v.loewis.de> Martin v. L?wis added the comment: > As such, and given the recent work made to ipaddr to make it > stdlib-friendly, my vote would be to include ipaddr in Python while > netaddr can continue growing, providing its user base with diverse > functionality while hopefully taking advantage of ipaddr in the Python > stdlib as much as is practical and useful. I could live with such a choice if the netaddr authors agree that it is the right choice (them being experts themselves in the domain). I don't want to be accused of drkjam's accusation of fast-tracking code just because it comes from Google (which would be a false accusation regardless, but there is no reason to make some Python users unhappy because they feel they are subject to political games). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 23:42:02 2009 From: report at bugs.python.org (Andreas Kupries) Date: Mon, 02 Feb 2009 22:42:02 +0000 Subject: [issue5113] 2.5.4.3 / test_posix failing on HPUX systems In-Reply-To: <1233346333.57.0.365853135308.issue5113@psf.upfronthosting.co.za> Message-ID: <1233614522.87.0.767866391672.issue5113@psf.upfronthosting.co.za> Andreas Kupries added the comment: I do not know if this is standard for hpux or not. I can say that right now we have six different HPUX machines which behave in this manner, i.e. do not throw an error for the 'chown root foobar' command for an ordinary (non-root) user. Regarding the platform codes, here are the results. andreask at bertha:~/tmp/autotest> ./apy/bin/python2.5 ActivePython 2.5.4.3 (ActiveState Software Inc.) based on Python 2.5.4 (r254:67916, Jan 20 2009, 14:48:58) [C] on hp-ux11 Type "help", "copyright", "credits" or "license" for more information. >>> import sys, platform >>> sys.platform 'hp-ux11' >>> platform.system() 'HP-UX' >>> quit() The six machines I mentioned are bertha - HP-UX 11.00 (PA-RISC) bigsur03 - HP-UX 11.22 (Itanium) hpa180 - HP-UX 11.00 (PA-RISC) bigsur03 - HP-UX 11.22 (Itanium) hpl3000 - HP-UX 11.23 (PA-RISC) bigsur05 - HP-UX 11.32 (Itanium) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 23:43:00 2009 From: report at bugs.python.org (Erkan Yilmaz) Date: Mon, 02 Feb 2009 22:43:00 +0000 Subject: [issue4528] test_httpservers consistently fails on OS X using tarball, but not svn tag r30 In-Reply-To: <1228411057.37.0.0478484931696.issue4528@psf.upfronthosting.co.za> Message-ID: <1233614580.06.0.398343828166.issue4528@psf.upfronthosting.co.za> Erkan Yilmaz added the comment: below you find following sections: -summary -details -system info summary: ********** The above message also appeared on - non-OS X: Distro Pardus 2008.2 Canis aureus - Python 3.1a0 py3k:69210 (see details:steps 1-3) (in step4 you find info about test_httpservers failed in: Python 2.7a0 trunk:69209) To find out if there is an error on my side - on request - I can provide more info. details (4 steps): ************ 1. I was trying to build with the py3k svn version (Revision 69210) and got following error during the "make test": 302 tests OK. 2 tests failed: test_httpservers test_urllib 21 tests skipped: test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses test_kqueue test_nis test_normalization test_ossaudiodev test_pep277 test_socketserver test_startfile test_timeout test_ttk_guionly test_urllib2net test_urllibnet test_winreg test_winsound test_xmlrpc_net test_zipfile64 Those skips are all expected on linux2. [913083 refs] 2. verbose output as non-admin first brought an exception: erkan at e-pardus2 python-svn $ ./python -m test.regrtest -v test_httpservers test_urllib ./python: error while loading shared libraries: libpython3.1.so.1.0: cannot open shared object file: No such file or directory erkan at e-pardus2 python-svn $ export LD_LIBRARY_PATH=/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn erkan at e-pardus2 python-svn $ ./python -m test.regrtest -v test_httpservers test_urllibCould not find '/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/test' in sys.path to remove it test_httpservers test_command (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_handler (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_head_keep_alive (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_header_close (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_internal_key_error (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_request_line_trimming (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_return_custom_status (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_return_header_keep_alive (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_send_blank (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_version_bogus (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_version_digits (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_version_invalid (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_version_none (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_version_none_get (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_get (test.test_httpservers.SimpleHTTPServerTestCase) ... Exception in thread Thread-15: Traceback (most recent call last): File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/threading.py", line 507, in _bootstrap_inner self.run() File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/test/test_httpservers.py", line 43, in run self.server.serve_forever() File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/socketserver.py", line 224, in serve_forever r, w, e = select.select([self], [], [], poll_interval) select.error: (4, 'Interrupted system call') 3. and as admin following output: e-pardus2 python-svn # ./python -m test.regrtest -v test_httpservers test_urllib ./python: error while loading shared libraries: libpython3.1.so.1.0: cannot open shared object file: No such file or directory e-pardus2 python-svn # export LD_LIBRARY_PATH=/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn e-pardus2 python-svn # ./python -m test.regrtest -v test_httpservers test_urllibCould not find '/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/test' in sys.path to remove it test_httpservers test_command (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_handler (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_head_keep_alive (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_header_close (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_internal_key_error (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_request_line_trimming (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_return_custom_status (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_return_header_keep_alive (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_send_blank (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_version_bogus (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_version_digits (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_version_invalid (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_version_none (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_version_none_get (test.test_httpservers.BaseHTTPServerTestCase) ... ok test_get (test.test_httpservers.SimpleHTTPServerTestCase) ... FAIL test_head (test.test_httpservers.SimpleHTTPServerTestCase) ... ok test_invalid_requests (test.test_httpservers.SimpleHTTPServerTestCase) ... ok test_authorization (test.test_httpservers.CGIHTTPServerTestCase) ... Traceback (most recent call last): File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/http/server.py", line 1031, in run_cgi OSError: [Errno 13] Permission denied ERROR test_headers_and_content (test.test_httpservers.CGIHTTPServerTestCase) ... Traceback (most recent call last): File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/http/server.py", line 1031, in run_cgi OSError: [Errno 13] Permission denied ERROR test_invaliduri (test.test_httpservers.CGIHTTPServerTestCase) ... ok test_post (test.test_httpservers.CGIHTTPServerTestCase) ... Traceback (most recent call last): File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/http/server.py", line 1031, in run_cgi OSError: [Errno 13] Permission denied FAIL ====================================================================== ERROR: test_authorization (test.test_httpservers.CGIHTTPServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/test/test_httpservers.py", line 342, in test_authorization (res.read(), res.getheader('Content-type'), res.status)) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/http/client.py", line 591, in getheader return ', '.join(self.msg.get_all(name, default)) TypeError ====================================================================== ERROR: test_headers_and_content (test.test_httpservers.CGIHTTPServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/test/test_httpservers.py", line 322, in test_headers_and_content (res.read(), res.getheader('Content-type'), res.status)) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/http/client.py", line 591, in getheader return ', '.join(self.msg.get_all(name, default)) TypeError ====================================================================== FAIL: test_get (test.test_httpservers.SimpleHTTPServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/test/test_httpservers.py", line 244, in test_get self.check_status_and_reason(response, 404) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/test/test_httpservers.py", line 220, in check_status_and_reason self.assertEquals(response.status, status) AssertionError: 200 != 404 ====================================================================== FAIL: test_post (test.test_httpservers.CGIHTTPServerTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/test/test_httpservers.py", line 330, in test_post self.assertEquals(res.read(), b'1, python, 123456\n') AssertionError: b'' != b'1, python, 123456\n' ---------------------------------------------------------------------- Ran 21 tests in 10.463s FAILED (failures=2, errors=2) test test_httpservers failed -- errors occurred; run in verbose mode for details test_urllib test_close (test.test_urllib.urlopen_FileTests) ... ok test_fileno (test.test_urllib.urlopen_FileTests) ... ok test_getcode (test.test_urllib.urlopen_FileTests) ... ok test_geturl (test.test_urllib.urlopen_FileTests) ... ok test_info (test.test_urllib.urlopen_FileTests) ... ok test_interface (test.test_urllib.urlopen_FileTests) ... ok test_iter (test.test_urllib.urlopen_FileTests) ... ok test_read (test.test_urllib.urlopen_FileTests) ... ok test_readline (test.test_urllib.urlopen_FileTests) ... ok test_readlines (test.test_urllib.urlopen_FileTests) ... ok test_empty_socket (test.test_urllib.urlopen_HttpTests) ... ERROR test_read (test.test_urllib.urlopen_HttpTests) ... ERROR test_read_bogus (test.test_urllib.urlopen_HttpTests) ... ERROR test_basic (test.test_urllib.urlretrieve_FileTests) ... ok test_copy (test.test_urllib.urlretrieve_FileTests) ... ok test_reporthook (test.test_urllib.urlretrieve_FileTests) ... ok test_reporthook_0_bytes (test.test_urllib.urlretrieve_FileTests) ... ok test_reporthook_5_bytes (test.test_urllib.urlretrieve_FileTests) ... ok test_reporthook_8193_bytes (test.test_urllib.urlretrieve_FileTests) ... ok test_getproxies_environment_keep_no_proxies (test.test_urllib.ProxyTests) ... ok test_default_quoting (test.test_urllib.QuotingTests) ... ok test_default_safe (test.test_urllib.QuotingTests) ... ok test_never_quote (test.test_urllib.QuotingTests) ... ok test_quote_bytes (test.test_urllib.QuotingTests) ... ok test_quote_with_unicode (test.test_urllib.QuotingTests) ... ok test_quoting_plus (test.test_urllib.QuotingTests) ... ok test_quoting_space (test.test_urllib.QuotingTests) ... ok test_safe (test.test_urllib.QuotingTests) ... ok test_unquote_to_bytes (test.test_urllib.UnquotingTests) ... ok test_unquote_with_unicode (test.test_urllib.UnquotingTests) ... ok test_unquoting (test.test_urllib.UnquotingTests) ... ok test_unquoting_badpercent (test.test_urllib.UnquotingTests) ... ok test_unquoting_mixed_case (test.test_urllib.UnquotingTests) ... ok test_unquoting_parts (test.test_urllib.UnquotingTests) ... ok test_unquoting_plus (test.test_urllib.UnquotingTests) ... ok test_doseq (test.test_urllib.urlencode_Tests) ... ok test_quoting (test.test_urllib.urlencode_Tests) ... ok test_using_mapping (test.test_urllib.urlencode_Tests) ... ok test_using_sequence (test.test_urllib.urlencode_Tests) ... ok test_basic (test.test_urllib.Pathname_Tests) ... ok test_quoting (test.test_urllib.Pathname_Tests) ... ok ====================================================================== ERROR: test_empty_socket (test.test_urllib.urlopen_HttpTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/test/test_urllib.py", line 194, in test_empty_socket self.assertRaises(IOError, urlopen, "http://something") File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/unittest.py", line 344, in failUnlessRaises callableObj(*args, **kwargs) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/test/test_urllib.py", line 33, in urlopen return opener.open(url) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/urllib/request.py", line 1444, in open return getattr(self, name)(url) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/urllib/request.py", line 1618, in open_http return self._open_generic_http(http.client.HTTPConnection, url, data) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/urllib/request.py", line 1601, in _open_generic_http response = http_conn.getresponse() File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/http/client.py", line 937, in getresponse method=self._method) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/http/client.py", line 275, in __init__ self.fp = sock.makefile("rb") TypeError: makefile() takes exactly 3 positional arguments (2 given) ====================================================================== ERROR: test_read (test.test_urllib.urlopen_HttpTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/test/test_urllib.py", line 168, in test_read fp = urlopen("http://python.org/") File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/test/test_urllib.py", line 33, in urlopen return opener.open(url) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/urllib/request.py", line 1444, in open return getattr(self, name)(url) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/urllib/request.py", line 1618, in open_http return self._open_generic_http(http.client.HTTPConnection, url, data) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/urllib/request.py", line 1601, in _open_generic_http response = http_conn.getresponse() File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/http/client.py", line 937, in getresponse method=self._method) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/http/client.py", line 275, in __init__ self.fp = sock.makefile("rb") TypeError: makefile() takes exactly 3 positional arguments (2 given) ====================================================================== ERROR: test_read_bogus (test.test_urllib.urlopen_HttpTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/test/test_urllib.py", line 185, in test_read_bogus self.assertRaises(IOError, urlopen, "http://python.org/") File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/unittest.py", line 344, in failUnlessRaises callableObj(*args, **kwargs) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/test/test_urllib.py", line 33, in urlopen return opener.open(url) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/urllib/request.py", line 1444, in open return getattr(self, name)(url) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/urllib/request.py", line 1618, in open_http return self._open_generic_http(http.client.HTTPConnection, url, data) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/urllib/request.py", line 1601, in _open_generic_http response = http_conn.getresponse() File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/http/client.py", line 937,in getresponse method=self._method) File "/home/erkan/Desktop/python3_svn_2009_feb_2/python-svn/Lib/http/client.py", line 275,in __init__ self.fp = sock.makefile("rb") TypeError: makefile() takes exactly 3 positional arguments (2 given) ---------------------------------------------------------------------- Ran 41 tests in 1.384s FAILED (errors=3) test test_urllib failed -- errors occurred; run in verbose mode for details 2 tests failed: test_httpservers test_urllib [85015 refs] 4. the test_httpservers also failed (different output) in Python 2.7a0 trunk:69209 see attached file for output system info: ************* other python versions available on the system are: main one: - Python 2.5.4 (r254:67916, Jan 19 2009, 11:26:32), [GCC 4.3.2] on linux2 the other (as well as Python 3.1a0 + Python 2.7a0) as altinstall: - python2.4.2 System: Host e-pardus2 running Linux 2.6.25.20-114 1800+ Distro Pardus 2008.2 Canis aureus CPU: Single Core AMD Athlon XP 1800+ cache 256 KB flags (sse) bmips 3066.27 clocked at 1531.968 MHz Graphics: Card nVidia NV11 [GeForce2 MX/MX 400] X.Org 1.4.2 Res 1024x768 at 50.0hz GLX Renderer GeForce2 MX/AGP/SSE/3DNOW! | GLX Version 1.5.8 NVIDIA 96.43.07 Audio: Card VIA VT8233/A/8235/8237 AC97 Audio Controller driver VIA 82xx Audio at port c000 Sound: Advanced Linux Sound Architecture Version 1.0.18a Network: Card-1 VIA VT6102 [Rhine-II] driver via-rhine at port bc00 Card-2 D-Link System RTL8139 Ethernet driver 8139too v: 0.9.28 at port d400 Disks: HDD Total Size: 250.1GB (92.3% used) 1: /dev/sda SAMSUNG SP2504C 250.1GB Partition: ID:/ size: 16G used: 11G (67%) Info: Processes 132 Uptime 4:49 Memory 927.2/1265.3MB Client Shell inxi 0.7.1 ---------- nosy: +Erkan Yilmaz Added file: http://bugs.python.org/file12925/Pardus - output - Python 3.1a0 py3k 69210 - Python 2.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 00:00:53 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 02 Feb 2009 23:00:53 +0000 Subject: [issue5113] 2.5.4.3 / test_posix failing on HPUX systems In-Reply-To: <1233346333.57.0.365853135308.issue5113@psf.upfronthosting.co.za> Message-ID: <1233615653.89.0.555122790448.issue5113@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, and when you try to chown back to yourself the root-owned foobar, does it fail? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 00:07:48 2009 From: report at bugs.python.org (Andreas Kupries) Date: Mon, 02 Feb 2009 23:07:48 +0000 Subject: [issue5113] 2.5.4.3 / test_posix failing on HPUX systems In-Reply-To: <1233346333.57.0.365853135308.issue5113@psf.upfronthosting.co.za> Message-ID: <1233616068.61.0.727790395577.issue5113@psf.upfronthosting.co.za> Andreas Kupries added the comment: Yes, that does fail with error 'not owner'. andreask at bertha:~/tmp> mkdir x andreask at bertha:~/tmp> cd x andreask at bertha:~/tmp/x> touch foobar andreask at bertha:~/tmp/x> ll total 0 -rw-rw-r-- 1 andreask DomainUsers 0 Feb 2 15:06 foobar andreask at bertha:~/tmp/x> chown root foobar andreask at bertha:~/tmp/x> ll total 0 -rw-rw-r-- 1 root DomainUsers 0 Feb 2 15:06 foobar andreask at bertha:~/tmp/x> chown andreask foobar foobar: Not owner andreask at bertha:~/tmp/x> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 00:08:05 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 02 Feb 2009 23:08:05 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <1222298050.73.0.172554962966.issue3959@psf.upfronthosting.co.za> Message-ID: <1233616085.52.0.79812372129.issue3959@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 00:21:55 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 02 Feb 2009 23:21:55 +0000 Subject: [issue1731706] tkinter memory leak problem Message-ID: <1233616915.37.0.565850318182.issue1731706@psf.upfronthosting.co.za> Guilherme Polo added the comment: It is much more important to fix the memory leak anyway, it is possible to notice real problems using test_tkleak1.py and watching the process with ps or something else provided by the platform. Besides, not calling ConditionFinalize doesn't introduce memory leaks, so it is not in par with issue's title. But I'm unsure about the existence of systems using Python as the main language which are also using tkinter and at the same time depend on tcl/tk 8.2 for some reason. So, to me, it would seem fine to start requiring tcl/tk 8.3 (or even newer!) starting with 2.7 and 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 00:33:48 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 02 Feb 2009 23:33:48 +0000 Subject: [issue1731706] tkinter memory leak problem In-Reply-To: <1233616915.37.0.565850318182.issue1731706@psf.upfronthosting.co.za> Message-ID: <498782D8.3030509@v.loewis.de> Martin v. L?wis added the comment: > Besides, not calling ConditionFinalize doesn't introduce memory leaks Are you sure about this? On Unix, TclpFinalizeCondition does pthread_cond_destroy(pcondPtr); ckfree((char *) pcondPtr); both of which release memory (IIUC). Likewise for Windows, except that it calls DeleteCriticalSection. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 00:40:31 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 02 Feb 2009 23:40:31 +0000 Subject: [issue1731706] tkinter memory leak problem In-Reply-To: <498782D8.3030509@v.loewis.de> Message-ID: Guilherme Polo added the comment: >> Besides, not calling ConditionFinalize doesn't introduce memory leaks > > Are you sure about this? On Unix, TclpFinalizeCondition does > > pthread_cond_destroy(pcondPtr); > ckfree((char *) pcondPtr); > > both of which release memory (IIUC). Likewise for Windows, except > that it calls DeleteCriticalSection. > I think I meant something more like "it doesn't result in memory definitely lost" because tcl will free these conditions when tcl finishes, but it does introduce memory leak in the sense that the memory isn't freed right after it is not longer used. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 00:48:27 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 02 Feb 2009 23:48:27 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1233618507.04.0.216983591446.issue1875@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Here is a patch that properly raises SyntaxError when 'return' or 'yield' statements appear outside a function. I did not bother to update the (deprecated) compiler package: it seems to be completely foreign to this kind of checks... >>> dis.dis(compiler.compile("return 1", "module.py", "exec")) 1 0 LOAD_CONST 1 (1) 3 RETURN_VALUE 4 LOAD_CONST 0 (None) 7 RETURN_VALUE ---------- assignee: -> amaury.forgeotdarc keywords: +needs review, patch resolution: fixed -> status: closed -> open Added file: http://bugs.python.org/file12926/return_outside_func.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 01:34:32 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 03 Feb 2009 00:34:32 +0000 Subject: [issue4879] Allow buffering for HTTPResponse In-Reply-To: <1231411436.11.0.236061918484.issue4879@psf.upfronthosting.co.za> Message-ID: <1233621272.98.0.865934804249.issue4879@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This causes failures in test_urllib2net. The fix is easy: a handful of - self.assertTrue(u.fp._sock.gettimeout() is None) + self.assertTrue(u.fp.raw._sock.gettimeout() is None) But doesn't this show a backward-incompatible change? or is the _sock member an implementation detail anyway? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 02:04:49 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 03 Feb 2009 01:04:49 +0000 Subject: [issue5136] Deprecating (and removing) "globalcall", "merge" and "globaleval" In-Reply-To: <1233623088.62.0.412008570682.issue5136@psf.upfronthosting.co.za> Message-ID: <1233623088.62.0.412008570682.issue5136@psf.upfronthosting.co.za> New submission from Guilherme Polo : Hi, I'm going to try explaining in short why I think each of these functions in _tkinter could be marked as deprecated and then removed on 2.8 (if it is decided to do it) and 3.1. globalcall: It is not used anywhere in tkinter. It was abandoned, and doesn't work in the same situations where "call" would work (with threads). It doesn't care about converting the result to a proper python object -- it is always a string (another result of the abandonment). "call" already works in the Tcl global space, because it needs to do so (see issue1581476). Even tcl 8.2 says Tcl_GlobalEval (the root of "globalcall") is old and deprecated. merge: globalcall depends on merge, but removing globalcall makes merge obsolete. It is not used by tkinter either. Searching for "tk.merge" on google codesearch returns a single result dating back python 1.1! globaleval: Uses Tcl_GlobalEval too. I haven't seen it being used, instead I always see eval being used. ---------- components: Tkinter messages: 81021 nosy: gpolo severity: normal status: open title: Deprecating (and removing) "globalcall", "merge" and "globaleval" versions: Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 02:09:03 2009 From: report at bugs.python.org (Brett Cannon) Date: Tue, 03 Feb 2009 01:09:03 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1233623343.24.0.82634965677.issue5094@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- priority: -> low stage: -> needs patch type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 02:39:25 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 03 Feb 2009 01:39:25 +0000 Subject: [issue5119] wide character parameter handling in ctypes In-Reply-To: <1233435219.37.0.934884464449.issue5119@psf.upfronthosting.co.za> Message-ID: <1233625165.11.0.941737782752.issue5119@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: ctypes cannot guess the function signature, and does not know if the function expects strings or unicodes. In your examples, ctypes.windll.user32.MessageBoxW(handle, text, caption, type) will accept everything you pass, and create C values depending on the types of the actual values of the parameters: when you pass a unicode, ctypes uses a wchar_t* buffer; when you pass a narrow string, ctypes uses a char* buffer (and is wrong in this case). In your Structure example, you do declare a kind of signature for the Structure. ctypes is now able to convert the value you give into the declared type. You can do the same thing with functions, if you provide the signature: MessageBox = ctypes.windll.user32.MessageBoxW MessageBox.argtypes = [ctypes.c_void_p, ctypes.c_wchar_p, ctypes.c_wchar_p, ctypes.c_int] (or better, since this matches the documentation on msdn:) from ctypes.wintypes import * MessageBox.argtypes = [HWND, LPCWSTR, LPCWSTR, UINT] And then you may indifferently pass strings or unicodes: MessageBox(None, u"caf?", "drink", 0) ---------- nosy: +amaury.forgeotdarc resolution: -> works for me status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 02:56:06 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 03 Feb 2009 01:56:06 +0000 Subject: [issue1875] "if 0: return" not raising SyntaxError In-Reply-To: <1200768950.55.0.245752373825.issue1875@psf.upfronthosting.co.za> Message-ID: <1233626166.55.0.417082385063.issue1875@psf.upfronthosting.co.za> Benjamin Peterson added the comment: You should remove the error logic compile.c for "return" and "yield" in function calls. The problem with this approach is that every SyntaxError generated during bytecode compilation must be moved to earlier. For example, I can still use "break" and "continue" outside loops with your patch. The only way I can think of around this is to compile the block anyway and remove the extra code later. Maybe this optimization could be moved to the peep holer? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 03:20:50 2009 From: report at bugs.python.org (Collin Winter) Date: Tue, 03 Feb 2009 02:20:50 +0000 Subject: [issue5084] unpickling does not intern attribute names In-Reply-To: <1233093140.55.0.0122548653801.issue5084@psf.upfronthosting.co.za> Message-ID: <1233627650.57.0.312979494996.issue5084@psf.upfronthosting.co.za> Changes by Collin Winter : ---------- nosy: +collinwinter, jyasskin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 05:45:17 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Feb 2009 04:45:17 +0000 Subject: [issue5137] SystemError when __len__ returns a non-number In-Reply-To: <1233636317.07.0.926088600598.issue5137@psf.upfronthosting.co.za> Message-ID: <1233636317.07.0.926088600598.issue5137@psf.upfronthosting.co.za> New submission from Raymond Hettinger : len(obj) is not happy when obj.__len__() returns a non-number. ---------- files: crasher_len.py messages: 81024 nosy: rhettinger priority: release blocker severity: normal status: open title: SystemError when __len__ returns a non-number type: crash versions: Python 3.0, Python 3.1 Added file: http://bugs.python.org/file12927/crasher_len.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 05:48:47 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Feb 2009 04:48:47 +0000 Subject: [issue5138] File Reload for IDLE In-Reply-To: <1233636526.93.0.952208632145.issue5138@psf.upfronthosting.co.za> Message-ID: <1233636526.93.0.952208632145.issue5138@psf.upfronthosting.co.za> New submission from Raymond Hettinger : IDLE would be *much* easier to use in conjunction with version control if there were a reload option that did the equivalent of (close current with no save, followed by open current file). ---------- assignee: kbk components: IDLE messages: 81025 nosy: kbk, rhettinger priority: normal severity: normal status: open title: File Reload for IDLE type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 05:57:47 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Feb 2009 04:57:47 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> New submission from Raymond Hettinger : To parallel the functions in itertools, add: math.combinations(n,r) --> n! / r! / (n-r)! when 0 <= r <= n or zero when r > n. math.permutations(n,r) --> n! / (n-r)! when 0 <= r <= n or zero when r > n. math.combinations_with_replacement(n,r) --> (n+r-1)! / r! / (n-1)! when n > 0. And when n==0, return 0 if r>0 else 1. These will enable an itertools user to compute the length of those iterators. It will also serve for general probability computations. Likewise, it produce binomial coefficients and multiset partitions. Since, the math module is where we put the factorial() function, it is the logical place for the combinatoric counting functions. ---------- components: Extension Modules messages: 81026 nosy: rhettinger priority: normal severity: normal status: open title: Add combinatoric counting functions to the math module. type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 06:48:44 2009 From: report at bugs.python.org (Robert Yodlowski) Date: Tue, 03 Feb 2009 05:48:44 +0000 Subject: [issue5140] Some Built-in Functions entries in Library Manual are missing Permalinks In-Reply-To: <1233640123.76.0.469214114608.issue5140@psf.upfronthosting.co.za> Message-ID: <1233640123.76.0.469214114608.issue5140@psf.upfronthosting.co.za> New submission from Robert Yodlowski : In http://docs.python.org/3.0/library/functions.html these function entries seem to be missing Permalinks. dict() frozenset() memoryview() set() Hope this helps. The Permalinks are a great idea. I hope you add lots more. ...Bob ---------- assignee: georg.brandl components: Documentation messages: 81027 nosy: georg.brandl, rbtyod severity: normal status: open title: Some Built-in Functions entries in Library Manual are missing Permalinks versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 07:47:22 2009 From: report at bugs.python.org (Miki Tebeka) Date: Tue, 03 Feb 2009 06:47:22 +0000 Subject: [issue4124] Patch for adding "default" to itemgetter and attrgetter In-Reply-To: <1224022053.76.0.0750871741065.issue4124@psf.upfronthosting.co.za> Message-ID: <1233643642.65.0.518305173393.issue4124@psf.upfronthosting.co.za> Miki Tebeka added the comment: Hmmm, too much time has passed and my 1bit memory has overflowed since :) IIRC it has to do with the fact that not all nodes in BeautifulSoup has a "name" attribute. I wanted to count how may "tr" there were, so len(filter(lambda n: n == "tr", map(attrgetter("name"), soup))) was what I wanted to do, but I got AttributeError. The natural way to me would be len(filter(lambda n: n == "tr", map(attrgetter("name", ""), soup))) but instead I had to do len(filter(lambda n: n == "tr", map(lambda n: gettattr(n, "name", ""), soup))) Another thing I can think of is for usage in count/max ... when some of the objects don't have the attribute you're looking for and it's by design (bad one maybe). You'd like to be able to do: max(map(itemgetter("time", 0)), articles) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 08:09:32 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Feb 2009 07:09:32 +0000 Subject: [issue2459] speedup for / while / if with better bytecode In-Reply-To: <1206224909.42.0.227263347483.issue2459@psf.upfronthosting.co.za> Message-ID: <1233644972.76.0.388692966997.issue2459@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I would like to see this go forward. It looks promising. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 08:10:29 2009 From: report at bugs.python.org (Erkan Yilmaz) Date: Tue, 03 Feb 2009 07:10:29 +0000 Subject: [issue4528] test_httpservers consistently fails - OSError: [Errno 13] Permission denied (e.g. on OS X using tarball, but not svn tag r30) In-Reply-To: <1228411057.37.0.0478484931696.issue4528@psf.upfronthosting.co.za> Message-ID: <1233645029.27.0.513154070131.issue4528@psf.upfronthosting.co.za> Changes by Erkan Yilmaz : ---------- title: test_httpservers consistently fails on OS X using tarball, but not svn tag r30 -> test_httpservers consistently fails - OSError: [Errno 13] Permission denied (e.g. on OS X using tarball, but not svn tag r30) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 09:22:30 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 03 Feb 2009 08:22:30 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1233649350.36.0.802254343287.issue5139@psf.upfronthosting.co.za> Mark Dickinson added the comment: This all sounds good to me. ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 09:39:32 2009 From: report at bugs.python.org (=?utf-8?q?Gerhard_H=C3=A4ring?=) Date: Tue, 03 Feb 2009 08:39:32 +0000 Subject: [issue5134] Compiler warnings in sqlite module In-Reply-To: <1233600780.48.0.187282999033.issue5134@psf.upfronthosting.co.za> Message-ID: <1233650372.08.0.160558350418.issue5134@psf.upfronthosting.co.za> Gerhard H?ring added the comment: This is a known issue with SQLite. It's not as bad as it looks at first sight, though. http://www.sqlite.org/faq.html#q17 """ (17) I get hundreds of compiler warnings when I compile SQLite. Isn't this a problem? Doesn't it indicate poor code quality? Quality assurance in SQLite is done using full-coverage testing, not by compiler warnings or other static code analysis tools. [...] """ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 09:48:05 2009 From: report at bugs.python.org (Pim Buurman) Date: Tue, 03 Feb 2009 08:48:05 +0000 Subject: [issue831643] Set option for subprocess in setup.py Message-ID: <1233650885.79.0.151426354145.issue831643@psf.upfronthosting.co.za> Pim Buurman added the comment: I am not developing Python extensions anymore, so I am not interested in this issue. I am not sure whether this issue is still applicable to e.g. Python 3.0 You can close it if you wisj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 09:50:48 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Feb 2009 08:50:48 +0000 Subject: [issue5134] Compiler warnings in sqlite module In-Reply-To: <1233600780.48.0.187282999033.issue5134@psf.upfronthosting.co.za> Message-ID: <1233651048.39.0.572459548937.issue5134@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Martin, if you can find a way to silence the compiler for the upstream code that would be great. If not, go ahead and close as won't fix. ---------- assignee: ghaering -> loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 09:59:39 2009 From: report at bugs.python.org (Armin Rigo) Date: Tue, 03 Feb 2009 08:59:39 +0000 Subject: [issue2459] speedup for / while / if with better bytecode In-Reply-To: <1206224909.42.0.227263347483.issue2459@psf.upfronthosting.co.za> Message-ID: <1233651579.42.0.415739728844.issue2459@psf.upfronthosting.co.za> Changes by Armin Rigo : ---------- nosy: -arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 09:42:42 2009 From: report at bugs.python.org (=?utf-8?q?Gerhard_H=C3=A4ring?=) Date: Tue, 03 Feb 2009 08:42:42 +0000 Subject: [issue5134] Compiler warnings in sqlite module In-Reply-To: <1233600780.48.0.187282999033.issue5134@psf.upfronthosting.co.za> Message-ID: <1233650562.31.0.961402197866.issue5134@psf.upfronthosting.co.za> Gerhard H?ring added the comment: I propose to either close this as wontfix. I don't know the switches for the Microsoft compiler to disable the warnings myself. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 10:08:58 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 03 Feb 2009 09:08:58 +0000 Subject: [issue4879] Allow buffering for HTTPResponse In-Reply-To: <1231411436.11.0.236061918484.issue4879@psf.upfronthosting.co.za> Message-ID: <1233652138.22.0.871974716164.issue4879@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: The socket.socket.makefile() now returns a quite different kind of object, namely a SocketIO thing. This comes as a result of the IO refactoring in 3.0. The good side to this is that old and naughty apps have been forbidden to access the _sock member directly. This was the reason that we had to disable read buffering in 2.x: Some clients would read directly from the socket, even though it was "hidden". As for the test failure, I admit that I didn't enable the "network" resource for the testsuite. Will fix. Btw, test_xmlrpc_net.py fails, because time.xmlrpc.com doesn't resolve. Are there any other good and stable rpc servers out there? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 10:14:59 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 03 Feb 2009 09:14:59 +0000 Subject: [issue4879] Allow buffering for HTTPResponse In-Reply-To: <1231411436.11.0.236061918484.issue4879@psf.upfronthosting.co.za> Message-ID: <1233652499.87.0.671536083184.issue4879@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: I'm afraid I misunderstood the problem. Yes, since u.fp is now a io.BufferedReader() rather than a socket.Socket (), the _sock member has moved. But looking at the other assertions in test_urllib2net.py, you can see the different ways the code uses to get at the socket: There is u.fp.raw._sock and there is u.fp.fp.raw._sock. IMHO I think we have to assume the _sock member to be an implementation detail that is not part of the interface. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 10:33:36 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 03 Feb 2009 09:33:36 +0000 Subject: [issue5134] Compiler warnings in sqlite module In-Reply-To: <1233600780.48.0.187282999033.issue5134@psf.upfronthosting.co.za> Message-ID: <1233653616.48.0.631587499073.issue5134@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The attached patch sets the /W1 flag for the sqlite3 project. ---------- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file12928/sqlite3_warnings.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 10:39:37 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Tue, 03 Feb 2009 09:39:37 +0000 Subject: [issue831643] Set option for subprocess in setup.py Message-ID: <1233653977.69.0.975959160712.issue831643@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 10:49:33 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Feb 2009 09:49:33 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1233654573.29.0.753397885117.issue5139@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I had a thought to name them perms(n,r), combs(n,r) and combs_with_replacement(n,r). The abbreviated names read nicely and avoid a namespace collision with the itertools module (making the world safe for "from math import *"). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 10:55:34 2009 From: report at bugs.python.org (=?utf-8?q?Hrvoje_Nik=C5=A1i=C4=87?=) Date: Tue, 03 Feb 2009 09:55:34 +0000 Subject: [issue5141] C API for appending to arrays In-Reply-To: <1233654934.43.0.515749486926.issue5141@psf.upfronthosting.co.za> Message-ID: <1233654934.43.0.515749486926.issue5141@psf.upfronthosting.co.za> New submission from Hrvoje Nik?i? : The array.array type is an excellent type for storing a large amount of "native" elements, such as integers, chars, doubles, etc., without involving the heavy machinery of numpy. It's both blazingly fast and reasonably efficient with memory. The one thing missing from the array module is the ability to directly access array values from C. This might seem superfluous, as it's perfectly possible to manipulate array contents from Python/C using PyObject_CallMethod and friends. The problem is that it requires the native values to be marshalled to Python objects, only to be immediately converted back to native values by the array code. This can be a problem when, for example, a numeric array needs to be filled with contents, such as in this hypothetical example: /* error checking and refcounting subtleties omitted for brevity */ PyObject *load_data(Source *src) { PyObject *array_type = get_array_type(); PyObject *array = PyObject_CallFunction(array_type, "c", 'd'); PyObject *append = PyObect_GetAttrString(array, "append"); while (!source_done(src)) { double num = source_next(src); PyObject *f = PyFloat_FromDouble(num); PyObject *ret = PyObject_CallFunctionObjArgs(append, f, NULL); if (!ret) return NULL; Py_DECREF(ret); Py_DECREF(f); } Py_DECREF(array_type); return array; } The inner loop must convert each C double to a Python Float, only for the array to immediately extract the double back from the Float and store it into the underlying array of C doubles. This may seem like a nitpick, but it turns out that more than half of the time of this function is spent creating and deleting those short-lived floating-point objects. Float creation is already well-optimized, so opportunities for speedup lie elsewhere. The array object exposes a writable buffer, which can be used to store values directly. For test purposes I created a faster "append" specialized for doubles, defined like this: int array_append(PyObject *array, PyObject *appendfun, double val) { PyObject *ret; double *buf; Py_ssize_t bufsize; static PyObject *zero; if (!zero) zero = PyFloat_FromDouble(0); // append dummy zero value, created only once ret = PyObject_CallFunctionObjArgs(appendfun, zero, NULL); if (!ret) return -1; Py_DECREF(ret); // append the element directly at the end of the C buffer PyObject_AsWriteBuffer(array, (void **) &buf, &bufsize)); buf[bufsize / sizeof(double) - 1] = val; return 0; } This hack actually speeds up array creation by a significant percentage (30-40% in my case, and that's for code that was producing the values by parsing a large text file). It turns out that an even faster method of creating an array is by using the fromstring() method. fromstring() requires an actual string, not a buffer, so in C++ I created an std::vector with a contiguous array of doubles, passed that array to PyString_FromStringAndSize, and called array.fromstring with the resulting string. Despite all the unnecessary copying, the result was much faster than either of the previous versions. Would it be possible for the array module to define a C interface for the most frequent operations on array objects, such as appending an item, and getting/setting an item? Failing that, could we at least make fromstring() accept an arbitrary read buffer, not just an actual string? ---------- messages: 81039 nosy: hniksic severity: normal status: open title: C API for appending to arrays type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 11:33:12 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 03 Feb 2009 10:33:12 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233657192.57.0.486823248876.issue4804@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Ok. I have submitted methods to verify the input to strftime() and fopen(). Only file descriptors seem to have no way to verify them. Mark Hammond seems to think this is ok (if tests can be selectively turned off), and if that is so, I have no objections. My chief concern is to get the global CRT setting out of the way. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 11:33:29 2009 From: report at bugs.python.org (Luke Kenneth Casson Leighton) Date: Tue, 03 Feb 2009 10:33:29 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1233609051.7.0.411932583421.issue3871@psf.upfronthosting.co.za> Message-ID: Luke Kenneth Casson Leighton added the comment: On Mon, Feb 2, 2009 at 9:10 PM, Roumen Petrov wrote: > > Roumen Petrov added the comment: > > The proposed patch for this issue include parts of other pending issues > - so its all is single file. If python team don't like idea for > "canonical host names" (part of issue 3754) this patch can be modified > do not use host-triplet. Also some discussions in py-dev list show that > small patches are preferred. I'm ready to split into small patches to be > reviewed. excellent. that _would_ be good. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 11:56:54 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Feb 2009 10:56:54 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1233658614.42.0.414752250328.issue5139@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Will put together a patch. ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 12:28:22 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Feb 2009 11:28:22 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1233660502.32.0.208624348435.issue5094@psf.upfronthosting.co.za> STINNER Victor added the comment: The UTC class have to be converted to C. Can someone write a patch for datetimemodule.c (and the doc plus an unit test ;-))? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 12:34:22 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Feb 2009 11:34:22 +0000 Subject: [issue5127] UnicodeEncodeError - I can't even see license In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1233660862.06.0.142399707334.issue5127@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't understand the behaviour of unichr(): Python 2.7a0 (trunk:68963M, Jan 30 2009, 00:49:28) >>> import unicodedata >>> unicodedata.category(u"\U00010000") 'Lo' >>> unicodedata.category(u"\U00011000") 'Cn' >>> unicodedata.category(unichr(0x10000)) Traceback (most recent call last): File "", line 1, in ValueError: unichr() arg not in range(0x10000) (narrow Python build) Why unichr() fails whereas \Uxxxxxxxx works? >>> len(u"\U00010000") 2 >>> ord(u"\U00010000") Traceback (most recent call last): File "", line 1, in TypeError: ord() expected a character, but string of length 2 found ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 12:36:50 2009 From: report at bugs.python.org (Ulrich Eckhardt) Date: Tue, 03 Feb 2009 11:36:50 +0000 Subject: [issue5134] Compiler warnings in sqlite module In-Reply-To: <1233600780.48.0.187282999033.issue5134@psf.upfronthosting.co.za> Message-ID: <1233661010.54.0.375947573872.issue5134@psf.upfronthosting.co.za> Ulrich Eckhardt added the comment: The syntax would be this: #if defined(_MSC_VER) # pragma warning(push) /* Disable warnings for this file, see http://www.sqlite.org/faq.html#q17 why we don't care for them. */ # pragma warning(disable: 4244) # pragma warning(disable: 4018) #endif ...// code that produces warnings #if defined(_MSC_VER) # pragma warning(pop) #endif For SQLite, I think the push/pop can be removed, as it is only a single file and not just a section of code. Otherwise, they are good style, in particular in header files, because they then don't affect other code. ---------- nosy: +eckhardt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 12:50:02 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 03 Feb 2009 11:50:02 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1233661802.84.0.539708079528.issue5139@psf.upfronthosting.co.za> Mark Dickinson added the comment: I agree that the names shouldn't clash with those in math, especially since it seems quite plausible that a user might want to use both itertools.combinations and math.combs (for example) in the same script. No strong feelings about the actual names, but it would be nice if they somehow conveyed the idea of counting rather than enumerating. That is, if it weren't for the clearly ridiculous length, it would be nice to have: itertools.combinations itertools.permutations and math.number_of_combinations math.number_of_permutations etc. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 12:51:20 2009 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 03 Feb 2009 11:51:20 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1233661880.32.0.26026336932.issue5139@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 13:22:08 2009 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 03 Feb 2009 12:22:08 +0000 Subject: [issue5119] wide character parameter handling in ctypes In-Reply-To: <1233435219.37.0.934884464449.issue5119@psf.upfronthosting.co.za> Message-ID: <1233663728.73.0.178059440614.issue5119@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Thanks for the excellent suggestion. Please close this issue. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 13:26:30 2009 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 03 Feb 2009 12:26:30 +0000 Subject: [issue5127] UnicodeEncodeError - I can't even see license In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1233663990.04.0.590867848095.issue5127@psf.upfronthosting.co.za> Ezio Melotti added the comment: FWIW, on Python3 it seems to work: >>> import unicodedata >>> unicodedata.category("\U00010000") 'Lo' >>> unicodedata.category("\U00011000") 'Cn' >>> unicodedata.category(chr(0x10000)) 'Lo' >>> unicodedata.category(chr(0x11000)) 'Cn' >>> ord(chr(0x10000)), 0x10000 (65536, 65536) >>> ord(chr(0x11000)), 0x11000 (69632, 69632) I'm using a narrow build too: >>> import sys >>> sys.maxunicode 65535 >>> len('\U00010000') 2 >>> ord('\U00010000') 65536 On Python2 unichr() is supposed to raise a ValueError on a narrow build if the value is greater than 0xFFFF [1], but if the characters above 0xFFFF can be represented with u"\Uxxxxxxxx" there should be a way to fix unichr so it can return them. Python3 already does it with chr(). Maybe we should open a new issue for this if it's not present already. [1]: http://docs.python.org/library/functions.html#unichr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 13:39:49 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 03 Feb 2009 12:39:49 +0000 Subject: [issue5127] UnicodeEncodeError - I can't even see license In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1233664789.97.0.674612431629.issue5127@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Since r56395, ord() and chr() accept and return surrogate pairs even in narrow builds. The goal is to remove most differences between narrow and wide unicode builds (except for string lengths, indices or slices) To address this problem, I suggest to change all functions in unicodectype.c so that they accept Py_UCS4 characters (instead of Py_UNICODE). This would be a binary-incompatible change; and --with-wctype-functions would have an effect only if sizeof(wchar_t)==4 (instead of the current condition sizeof(wchar_t)==sizeof(PY_UNICODE_TYPE)) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 13:41:54 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 03 Feb 2009 12:41:54 +0000 Subject: [issue5119] wide character parameter handling in ctypes In-Reply-To: <1233435219.37.0.934884464449.issue5119@psf.upfronthosting.co.za> Message-ID: <1233664914.48.0.403597451479.issue5119@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 14:11:41 2009 From: report at bugs.python.org (David Moss) Date: Tue, 03 Feb 2009 13:11:41 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <1222298050.73.0.172554962966.issue3959@psf.upfronthosting.co.za> Message-ID: <1233666701.12.0.83139743453.issue3959@psf.upfronthosting.co.za> David Moss added the comment: For reference, here are the (cross-posted) links to the discussion on the (now failed) netaddr/ipaddr merge talks :- http://groups.google.com/group/netaddr/browse_thread/thread/f80b7c69e459 02b7 http://groups.google.com/group/ipaddr-py- dev/browse_thread/thread/2bc329151fef01eb Out of interest, here is some data from each project's download counters (taken 2nd Feb 2009) :- project: netaddr total downloads: 3298 first official release: July 7th, 2008 project: ipaddr total downloads: 998 first official release: September 24th, 2008 This only includes those accessing official releases (not direct subversion repository access). As these projects are both still less the 6 months old its probably difficult to gauge any kind of long term trend from this. However, what it does show is the high level of user interest in both projects. I have no desire to continue being a blocker on the decision to include ipaddr in the stdlib. At this point, I'm sure we are all keen to move on. As previously stated, netaddr will continue to be a viable alternative to those users that prefer its interface, documentation, additional features (layer-2 options, etc) and direction. Choice is a good thing and that choice will remain open to Python users as long as their interest persists. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 14:12:05 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 03 Feb 2009 13:12:05 +0000 Subject: [issue5127] UnicodeEncodeError - I can't even see license In-Reply-To: <1233664789.97.0.674612431629.issue5127@psf.upfronthosting.co.za> Message-ID: <498842A1.3030900@egenix.com> Marc-Andre Lemburg added the comment: On 2009-02-03 13:39, Amaury Forgeot d'Arc wrote: > Amaury Forgeot d'Arc added the comment: > > Since r56395, ord() and chr() accept and return surrogate pairs even in > narrow builds. > > The goal is to remove most differences between narrow and wide unicode > builds (except for string lengths, indices or slices) > > To address this problem, I suggest to change all functions in > unicodectype.c so that they accept Py_UCS4 characters (instead of > Py_UNICODE). -1. That would cause major breakage in the C API and is not inline with the intention of having a Py_UNICODE type in the first place. Users who are interested in UCS4 builds should simply use UCS4 builds. > This would be a binary-incompatible change; and --with-wctype-functions > would have an effect only if sizeof(wchar_t)==4 (instead of the current > condition sizeof(wchar_t)==sizeof(PY_UNICODE_TYPE)) --with-wctype-functions was scheduled for removal many releases ago, but I never got around to it. The only reason it's still there is that some Linux distribution use this config option (AFAIR, RedHat). I'd be +1 on removing the option in 3.0.1 or deprecating it in 3.0.1 and removing it in 3.1. It's not useful in any way, and causes compatibility problems with regular builds. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 14:14:06 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Feb 2009 13:14:06 +0000 Subject: [issue5127] UnicodeEncodeError - I can't even see license In-Reply-To: <1233664789.97.0.674612431629.issue5127@psf.upfronthosting.co.za> Message-ID: <200902031413.56264.victor.stinner@haypocalc.com> STINNER Victor added the comment: amaury> Since r56395, ord() and chr() accept and return surrogate pairs amaury> even in narrow builds. Note: My examples are made with Python 2.x. > The goal is to remove most differences between narrow and wide unicode > builds (except for string lengths, indices or slices) It would be nice to get the same behaviour in Python 2.x and 3.x to help migration from Python2 to Python3 ;-) unichr() (in Python 2.x) documentation is correct. But I would approciate to support surrogates using unichr() which means also changing ord() behaviour. > To address this problem, I suggest to change all functions in > unicodectype.c so that they accept Py_UCS4 characters (instead of > Py_UNICODE). Why? Using surrogates, you can use 16-bits Py_UNICODE to store non-BMP characters (code > 0xffff). -- I can open a new issue if you agree that we can change unichr() / ord() behaviour on narrow build. We may ask on the mailing list? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 14:18:21 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 03 Feb 2009 13:18:21 +0000 Subject: [issue5127] UnicodeEncodeError - I can't even see license In-Reply-To: <200902031413.56264.victor.stinner@haypocalc.com> Message-ID: <4988441A.1010607@egenix.com> Marc-Andre Lemburg added the comment: On 2009-02-03 14:14, STINNER Victor wrote: > STINNER Victor added the comment: > > amaury> Since r56395, ord() and chr() accept and return surrogate pairs > amaury> even in narrow builds. > > Note: My examples are made with Python 2.x. > >> The goal is to remove most differences between narrow and wide unicode >> builds (except for string lengths, indices or slices) > > It would be nice to get the same behaviour in Python 2.x and 3.x to help > migration from Python2 to Python3 ;-) > > unichr() (in Python 2.x) documentation is correct. But I would approciate to > support surrogates using unichr() which means also changing ord() behaviour. This is not possible for unichr() in Python 2.x, since applications always expect len(unichr(x)) == 1. Changing ord() would be possible in Python 2.x is easier, since this would only extend the range of returned values for UCS2 builds. >> To address this problem, I suggest to change all functions in >> unicodectype.c so that they accept Py_UCS4 characters (instead of >> Py_UNICODE). > > Why? Using surrogates, you can use 16-bits Py_UNICODE to store non-BMP > characters (code > 0xffff). > > -- > > I can open a new issue if you agree that we can change unichr() / ord() > behaviour on narrow build. We may ask on the mailing list? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 14:39:27 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 03 Feb 2009 13:39:27 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233668367.29.0.682976651199.issue4804@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: >Only file descriptors seem to have no way to verify them. How about _get_osfhandle()? (Strictly, there is race condition between _get_osfhandle and fdopen etc though) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 14:41:56 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 03 Feb 2009 13:41:56 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233668516.37.0.315595926135.issue4804@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Hmm, maybe _lock_fhandle can be used to solve such race condition. I'm not sure. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 14:48:15 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Feb 2009 13:48:15 +0000 Subject: [issue5110] Printing Unicode chars from the interpreter in a non-UTF8 terminal (Py3) In-Reply-To: <1233363452.0.0.292344060049.issue5110@psf.upfronthosting.co.za> Message-ID: <200902031448.06254.victor.stinner@haypocalc.com> STINNER Victor added the comment: > Victor, I'm not sure whether you are proposing that > display_hook_ascii.patch is included into Python. IIUC, this patch > breaks PEP3138, so it clearly must be rejected. > > Overall, I fail to see the bug in this report. Python 3.0 works as > designed as shown here. The idea is to avoid unicode error (by replacing not printable characters by their code in hexadecimal) when the display hook tries to display a message which is not printable in the terminal charset. It's just to make Python3 interpreter a little bit more "user friendly" on Windows. Problem: use different (encoding) rule for the display hook and for print() may disturb new users (Why does ">>> chr(...)" work whereas ">>> print(chr(...))" fails?). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 14:50:13 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 03 Feb 2009 13:50:13 +0000 Subject: [issue5127] UnicodeEncodeError - I can't even see license In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1233669013.15.0.414055262607.issue5127@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > That would cause major breakage in the C API Not if you recompile. I don't see how this breaks the API at the C level. > and is not inline with the intention of having a Py_UNICODE > type in the first place. Py_UNICODE is still used as the allocation unit for unicode strings. To get correct results, we need a way to access the whole unicode database even on ucs2 builds; it's possible with the unicodedata module, why not from C? My motivation for the change is this post: http://mail.python.org/pipermail/python-dev/2008-July/080900.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 14:51:49 2009 From: report at bugs.python.org (Senthil) Date: Tue, 03 Feb 2009 13:51:49 +0000 Subject: [issue5142] pdb feature request: Ability to skip standard lib modules and other selected packages/modules In-Reply-To: <1233669109.05.0.519121201366.issue5142@psf.upfronthosting.co.za> Message-ID: <1233669109.05.0.519121201366.issue5142@psf.upfronthosting.co.za> New submission from Senthil : When using the python debugger, most often I step ('s') through the code base and I often Call the standard library modules, whichever are imported in the scripts. This is often not desirable as I know that errors are within my modules and not in standard library. Two things which a developer can do while using pdb is: 1) Be careful as not to 's' into stdlib but use next 'n'. 2) If accidentally stepped into, then use return 'r'. Instead of doing this repeatedly, how about having method in the debugger to skip certain modules ( like standard library modules, certain package's modules etc) This would save a lot of distraction in call and returns, and developers can just go ahead with 's' and Enters. ---------- messages: 81058 nosy: orsenthil severity: normal status: open title: pdb feature request: Ability to skip standard lib modules and other selected packages/modules type: feature request versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 14:52:47 2009 From: report at bugs.python.org (Senthil) Date: Tue, 03 Feb 2009 13:52:47 +0000 Subject: [issue5142] pdb feature request: Ability to skip standard lib modules and other selected packages/modules In-Reply-To: <1233669109.05.0.519121201366.issue5142@psf.upfronthosting.co.za> Message-ID: <1233669167.84.0.550233868334.issue5142@psf.upfronthosting.co.za> Changes by Senthil : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 15:01:50 2009 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 03 Feb 2009 14:01:50 +0000 Subject: [issue5110] Printing Unicode chars from the interpreter in a non-UTF8 terminal raises an error (Py3) In-Reply-To: <1233329209.55.0.55287436123.issue5110@psf.upfronthosting.co.za> Message-ID: <1233669710.59.0.690566271747.issue5110@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Problem: use different (encoding) rule for the display hook and for > print() may disturb new users (Why does ">>> chr(...)" work whereas > ">>> print(chr(...))" fails?). This is the same behavior that Python2.x has (with the only difference that Py2 always show the char as u'\uXXXX' if >0x7F whereas Py3 /tries/ to display it): >>> unichr(0x0100) u'\u0100' >>> print unichr(0x0100) UnicodeEncodeError: 'charmap' codec can't encode character u'\u0100' in position 0: character maps to ---------- title: Printing Unicode chars from the interpreter in a non-UTF8 terminal (Py3) -> Printing Unicode chars from the interpreter in a non-UTF8 terminal raises an error (Py3) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 15:07:38 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 03 Feb 2009 14:07:38 +0000 Subject: [issue1028] Tkinter binding involving Control-spacebar raises unicode error In-Reply-To: <1188161311.7.0.864205774814.issue1028@psf.upfronthosting.co.za> Message-ID: <1233670058.27.0.512743967944.issue1028@psf.upfronthosting.co.za> Guilherme Polo added the comment: Can you tell what: print(tkinter.Tcl().tk.call('info', 'patchlevel')) prints ? Specifically to know which tk 8.5.x has the problem. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 15:18:27 2009 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Feb 2009 14:18:27 +0000 Subject: [issue5127] UnicodeEncodeError - I can't even see license In-Reply-To: <4988441A.1010607@egenix.com> Message-ID: <200902031518.19781.victor.stinner@haypocalc.com> STINNER Victor added the comment: lemburg> This is not possible for unichr() in Python 2.x, since applications lemburg> always expect len(unichr(x)) == 1 Oh, ok. lemburg> Changing ord() would be possible in Python 2.x is easier, since lemburg> this would only extend the range of returned values for UCS2 lemburg> builds. ord() of Python3 (narrow build) rejects surrogate characters: '\U00010000' >>> len(chr(0x10000)) 2 >>> ord(0x10000) Traceback (most recent call last): File "", line 1, in TypeError: ord() expected string of length 1, but int found --- It looks that narrow builds with surrogates have some more problems... Test with U+10000: "LINEAR B SYLLABLE B008 A", category: Letter, Other. Correct result (Python 2.5, wide build): $ python Python 2.5.1 (r251:54863, Jul 31 2008, 23:17:40) >>> unichr(0x10000) u'\U00010000' >>> unichr(0x10000).isalpha() True Error in Python3 (narrow build): marge$ ./python Python 3.1a0 (py3k:69105M, Feb 3 2009, 15:04:35) >>> chr(0x10000).isalpha() False >>> list(chr(0x10000)) ['\ud800', '\udc00'] >>> chr(0xd800).isalpha() False >>> chr(0xdc00).isalpha() False Unicode ranges, all in the category "Other, Surrogate": - U+D800..U+DB7F: Non Private Use High Surrogate - U+DB80..U+DBFF: Private Use High Surrogate - U+DC00..U+DFFF: Low Surrogate" range _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 15:49:38 2009 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 03 Feb 2009 14:49:38 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1233672578.57.0.0214759237225.issue5139@psf.upfronthosting.co.za> Ezio Melotti added the comment: Should we add permutations with repetitions? Example (from Schaum's outline of theory and problems of probability and statistics): The number of different permutations of the 11 letters of the word MISSISSIPPI, which consists of 1 M, 4 I's, 4 S's and 2 P's, is 11! / (1!*4!*4!*2!) = 34650 math.perms_with_repetitions(11, [1,4,4,2]) and maybe parallel function in itertools: itertools.permutations_with_repetitions(iterable[, r]) This should be equal to itertools.permutations(set(iterable)[, r]). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 16:12:15 2009 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 03 Feb 2009 15:12:15 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1233673935.16.0.225570548274.issue3871@psf.upfronthosting.co.za> Changes by Guido van Rossum : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 16:15:47 2009 From: report at bugs.python.org (Robert Hancock) Date: Tue, 03 Feb 2009 15:15:47 +0000 Subject: [issue1731706] tkinter memory leak problem Message-ID: <1233674147.9.0.555235194112.issue1731706@psf.upfronthosting.co.za> Robert Hancock added the comment: That's not really a meaningful difference, though.. if the application uses this code continuously then the conditions will pile up in memory until it fills up. ---------- nosy: +robhancock1 -robhancock _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 16:59:49 2009 From: report at bugs.python.org (Gerard) Date: Tue, 03 Feb 2009 15:59:49 +0000 Subject: [issue1519638] Unmatched Group issue - workaround Message-ID: <1233676789.18.0.401905282655.issue1519638@psf.upfronthosting.co.za> Gerard added the comment: Bobby, Can you post the actual text you need this for? The back ref indeed returns a None. I'm wondering if the regex can be be simplefied and if a positive lookbehind could solve this. Symantically speaking ... If there's a "b" then return the "ar", because then an empty alternate might again be of help. Kind regards, Gerard. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 17:04:09 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 03 Feb 2009 16:04:09 +0000 Subject: [issue1731706] tkinter memory leak problem In-Reply-To: <1233674147.9.0.555235194112.issue1731706@psf.upfronthosting.co.za> Message-ID: Guilherme Polo added the comment: > That's not really a meaningful difference, though.. if the application > uses this code continuously then the conditions will pile up in memory > until it fills up. I'm not trying to discourage you to do the complete fix (for these two problems), but this API was made public only in tcl 8.3.1 as can be seen at http://tcl.cvs.sourceforge.net/viewvc/tcl/tcl/ChangeLog?revision=1.226&view=markup&pathrev=core-8-3-1 Still, the "call" fix should be backported to python 2.6 as it doesn't depend on changing supported tcl versions and is also more severe. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 17:31:52 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 03 Feb 2009 16:31:52 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233678712.08.0.0489211287103.issue4804@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 17:53:09 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 03 Feb 2009 16:53:09 +0000 Subject: [issue5143] OS X: Py_SetProgramName argument has type char*; should be wchar_t* In-Reply-To: <1233679989.65.0.0874106595792.issue5143@psf.upfronthosting.co.za> Message-ID: <1233679989.65.0.0874106595792.issue5143@psf.upfronthosting.co.za> New submission from Mark Dickinson : When building the py3k branch on OS X, I get the following warning: gcc -c -fno-strict-aliasing -g -Wall -Wstrict-prototypes -I. -IInclude - I./Include -DPy_BUILD_CORE -o Modules/main.o Modules/main.c Modules/main.c: In function ?Py_Main?: Modules/main.c:491: warning: passing argument 1 of ?Py_SetProgramName? from incompatible pointer type This *looks* like it might be a genuine problem. Lines 490-493 of main.c (which occur inside an #ifdef __APPLE__) look like this: if ((p = Py_GETENV("PYTHONEXECUTABLE")) && *p != '\0') Py_SetProgramName(p); else Py_SetProgramName(argv[0]); The return from Py_GETENV (which calls the system getenv) has type char*, but Py_SetProgramName expects something of type wchar_t*. However, I don't know enough about this part of Python to tell for sure whether there's really something wrong here. Ronald, any ideas? ---------- components: Macintosh messages: 81066 nosy: marketdickinson, ronaldoussoren severity: normal status: open title: OS X: Py_SetProgramName argument has type char*; should be wchar_t* versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 17:56:58 2009 From: report at bugs.python.org (jan matejek) Date: Tue, 03 Feb 2009 16:56:58 +0000 Subject: [issue5144] PySys_SetArgv has wrong documentation In-Reply-To: <1233680218.31.0.635713677458.issue5144@psf.upfronthosting.co.za> Message-ID: <1233680218.31.0.635713677458.issue5144@psf.upfronthosting.co.za> New submission from jan matejek : documentation for PySys_SetArgv states that the function sets sys.argv, but fails to mention that it also resolves script's path and prepends it to sys.path. Or, in case no script was specified, it prepends empty string (which in versions <2.6 allowed relative imports from cwd) ---------- assignee: georg.brandl components: Documentation messages: 81067 nosy: georg.brandl, matejcik severity: normal status: open title: PySys_SetArgv has wrong documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 17:57:03 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 03 Feb 2009 16:57:03 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1233680223.58.0.394837320006.issue3871@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 17:57:27 2009 From: report at bugs.python.org (David W. Lambert) Date: Tue, 03 Feb 2009 16:57:27 +0000 Subject: [issue5142] pdb feature request: Ability to skip standard lib modules and other selected packages/modules In-Reply-To: <1233669109.05.0.519121201366.issue5142@psf.upfronthosting.co.za> Message-ID: <1233680247.6.0.103485851275.issue5142@psf.upfronthosting.co.za> Changes by David W. Lambert : ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 18:02:02 2009 From: report at bugs.python.org (Tom Lynn) Date: Tue, 03 Feb 2009 17:02:02 +0000 Subject: [issue1079] decode_header does not follow RFC 2047 In-Reply-To: <1188637019.25.0.0476259625696.issue1079@psf.upfronthosting.co.za> Message-ID: <1233680522.35.0.022264315991.issue1079@psf.upfronthosting.co.za> Tom Lynn added the comment: The only difference between the two regexps is that the email/header.py version looks for:: (?=[ \t]|$) # whitespace or the end of the string at the end (with re.MULTILINE, so $ also matches '\n'). To expand on "There is nothing about that thing in RFC 2047", it says:: IMPORTANT: 'encoded-word's are designed to be recognized as 'atom's by an RFC 822 parser. RFC 822 says:: atom = 1* ... specials = "(" / ")" / "<" / ">" / "@" ; Must be in quoted- / "," / ";" / ":" / "\" / <"> ; string, to use / "." / "[" / "]" ; within a word. So an example of mis-parsing is:: >>> import email.header >>> h = '=?utf-8?q?=E2=98=BA?=(unicode white smiling face)' >>> email.header.decode_header(h) [('=?utf-8?q?=E2=98=BA?=(unicode white smiling face)', None)] The correct result would be:: >>> email.header.decode_header(h) [('\xe2\x98\xba', 'utf-8'), ('(unicode white smiling face)', None)] which is what you get if you insert a space before the '(' in h. ---------- nosy: +tlynn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 18:05:28 2009 From: report at bugs.python.org (Tom Lynn) Date: Tue, 03 Feb 2009 17:05:28 +0000 Subject: [issue4958] email/header.py ecre regular expression issue In-Reply-To: <1232062389.84.0.560697403346.issue4958@psf.upfronthosting.co.za> Message-ID: <1233680728.88.0.607882236922.issue4958@psf.upfronthosting.co.za> Tom Lynn added the comment: Duplicates issue1047. ---------- nosy: +tlynn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 18:06:13 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 03 Feb 2009 17:06:13 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233680773.26.0.945283519851.issue4804@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 18:06:37 2009 From: report at bugs.python.org (Tom Lynn) Date: Tue, 03 Feb 2009 17:06:37 +0000 Subject: [issue4958] email/header.py ecre regular expression issue In-Reply-To: <1232062389.84.0.560697403346.issue4958@psf.upfronthosting.co.za> Message-ID: <1233680797.32.0.604421848002.issue4958@psf.upfronthosting.co.za> Tom Lynn added the comment: Oops, duplicates issue 1079 even. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 18:07:47 2009 From: report at bugs.python.org (Tom Lynn) Date: Tue, 03 Feb 2009 17:07:47 +0000 Subject: [issue4491] email.Header.decode_header() doesn't work if encoded-word was separeted by CRLF In-Reply-To: <1228234559.58.0.381415224429.issue4491@psf.upfronthosting.co.za> Message-ID: <1233680867.9.0.676684430689.issue4491@psf.upfronthosting.co.za> Tom Lynn added the comment: Duplicates issue1079. ---------- nosy: +tlynn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 18:08:24 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 03 Feb 2009 17:08:24 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233680904.7.0.84904542832.issue4804@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: >Only file descriptors seem to have no way to verify them. How about _get_osfhandle()? I cannot see _ASSERTE in that function on VC6, but maybe there on VC9. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 18:09:30 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 03 Feb 2009 17:09:30 +0000 Subject: [issue976869] Stripping script extensions with distutils Message-ID: <1233680970.7.0.880363415546.issue976869@psf.upfronthosting.co.za> Akira Kitada added the comment: I doubt "strip-extensions" has to be in distutils. Isn't a simple script like below enough for this? $ for i in *.py; do mv $i ${i%.py}; done ---------- nosy: +akitada, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 18:17:36 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 03 Feb 2009 17:17:36 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233681456.74.0.898393661832.issue4804@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: On VS8.0, _get_osfhandle() begins with three assert statements. This function is not safer than the others... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 18:32:58 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 03 Feb 2009 17:32:58 +0000 Subject: [issue5143] OS X: Py_SetProgramName argument has type char*; should be wchar_t* In-Reply-To: <1233679989.65.0.0874106595792.issue5143@psf.upfronthosting.co.za> Message-ID: <1233682378.54.0.345766829972.issue5143@psf.upfronthosting.co.za> Ned Deily added the comment: I think it is a problem and it explains one of the problems with IDLE.app in 3.x. The value of PYTHONEXECUTABLE should end up in sys.executable: $ export PYTHONEXECUTABLE='/test' @fimt:~$ python2.6 Python 2.6.1 (r261:67515, Dec 17 2008, 23:27:50) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin >>> import sys; sys.executable '/test' >>> $ python3.1 Python 3.1a0 (py3k, Feb 2 2009, 02:33:48) [GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin >>> import sys; sys.executable '/Users/nad/' >>> ---------- nosy: +nad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 19:07:04 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 03 Feb 2009 18:07:04 +0000 Subject: [issue5115] Extend subprocess.kill to be able to kill process groups In-Reply-To: <1233370260.58.0.70597374825.issue5115@psf.upfronthosting.co.za> Message-ID: <1233684424.23.0.716994085812.issue5115@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I suspect that on Windows, TerminateJobObject won't work with a handle returned by CreateProcess. A solution could look like http://www.mobzystems.com/code/killprocesstree.aspx ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 19:11:03 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 03 Feb 2009 18:11:03 +0000 Subject: [issue5143] OS X: Py_SetProgramName argument has type char*; should be wchar_t* In-Reply-To: <1233679989.65.0.0874106595792.issue5143@psf.upfronthosting.co.za> Message-ID: <1233684663.31.0.46048826234.issue5143@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This is a bug, I'm working on a fix. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 19:16:21 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Tue, 03 Feb 2009 18:16:21 +0000 Subject: [issue976869] Stripping script extensions with distutils Message-ID: <1233684981.0.0.247602386342.issue976869@psf.upfronthosting.co.za> Tarek Ziad? added the comment: It makes sense to me but we need to look at setuptools console feature nowadays. I think it might be the right piece to add in distutils for console scripts. ---------- assignee: -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 19:28:05 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 03 Feb 2009 18:28:05 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233685685.44.0.00708943354778.issue4804@psf.upfronthosting.co.za> Martin v. L?wis added the comment: fopen.patch is fine, please apply. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 19:30:13 2009 From: report at bugs.python.org (Damien Neil) Date: Tue, 03 Feb 2009 18:30:13 +0000 Subject: [issue2124] xml.sax and xml.dom fetch DTDs by default In-Reply-To: <1203086575.38.0.209227458245.issue2124@psf.upfronthosting.co.za> Message-ID: <1233685813.47.0.113293058632.issue2124@psf.upfronthosting.co.za> Damien Neil added the comment: I just ran into this problem. I was very surprised to realize that every time the code I was working on parsed a docbook file, it generated several HTTP requests to oasis-open.org to fetch the docbook DTDs. I attempted to fix the issue by adding an EntityResolver that would cache fetched DTDs. (The documentation on how to do this is not, by the way, very clear.) Unfortunately, this proves to not be possible. The main docbook DTD includes subsidiary DTDs using relative system identifiers. For example, the main DTD at: publicId: -//OASIS//DTD DocBook V4.1//EN systemId: http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd ...includes this second DTD: publicId: -//OASIS//ENTITIES DocBook Notations V4.4//EN systemId: dbnotnx.mod The EntityResolver's resolveEntity() method is not, however, passed the base path to resolve the relative systemId from. This makes it impossible to properly implement a parser which caches fetched DTDs. ---------- nosy: +damien _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 19:47:32 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 03 Feb 2009 18:47:32 +0000 Subject: [issue5127] UnicodeEncodeError - I can't even see license In-Reply-To: <1233669013.15.0.414055262607.issue5127@psf.upfronthosting.co.za> Message-ID: <49889139.7080005@egenix.com> Marc-Andre Lemburg added the comment: On 2009-02-03 14:50, Amaury Forgeot d'Arc wrote: > Amaury Forgeot d'Arc added the comment: > >> That would cause major breakage in the C API > > Not if you recompile. I don't see how this breaks the API at the C level. Well, then try to look at such a change from a C extension writer's perspective. They'd have to change all their function calls and routines to work with Py_UCS4. Supporting both the old API and the new one would be nearly impossible and require either an adapter API or a lot of #ifdef'ery. Please remember that the public Python C API is not only meant for Python developers. It's main purpose is for it to be used by other developers extending or embedding Python and those developers use different release cycles and want to support more than just the bleeding edge Python version. Python has a long history of providing very stable APIs, both in C and in Python. FWIW: The last major change in the C API (the change to Py_ssize_t from Python 2.4 to 2.5) has not even propogated to all major C extensions yet. It's only now that people start to realize problems with this, since their extensions start failing with segfaults on 64-bit machines. That said, we can of course provide additional UCS4 APIs for certain things and also provide conversion helpers between Py_UNICODE and Py_UCS4 where needed. >> and is not inline with the intention of having a Py_UNICODE >> type in the first place. > > Py_UNICODE is still used as the allocation unit for unicode strings. > > To get correct results, we need a way to access the whole unicode > database even on ucs2 builds; it's possible with the unicodedata module, > why not from C? I must be missing some detail, but what does the Unicode database have to do with the unicodeobject.c C API ? > My motivation for the change is this post: > http://mail.python.org/pipermail/python-dev/2008-July/080900.html There are certainly other ways to make Python deal with surrogates in more cases than the ones we already support. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 19:48:17 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 03 Feb 2009 18:48:17 +0000 Subject: [issue5143] OS X: Py_SetProgramName argument has type char*; should be wchar_t* In-Reply-To: <1233679989.65.0.0874106595792.issue5143@psf.upfronthosting.co.za> Message-ID: <1233686897.17.0.531965514075.issue5143@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The quick fix is to convert "p" to a wchar_t (using mbstowcs), see patch-mbstowcs.txt. However, I don't think this is the right fix. AFAIK this environment variable is only used by .app bundles created by bundlebuilder.py which is no longer part of the standard library. IDLE.app uses the same mechanism, but that's not needed there and can be removed without problems. The file patch-remove-PYTHONEXECUTABLE.txt removed the environment variable, and results in a working IDLE.app on my machine (IDLE launches with a working shell window and I can open python files). I'd prefer to apply patch-remove-PYTHONEXECUTABLE.txt on the trunk, the more limited fix can be applied on the 3.0.x branch (although I have no idea if that branch even works correctly on OSX) Added file: http://bugs.python.org/file12929/patch-mbstowcs.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 19:48:31 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 03 Feb 2009 18:48:31 +0000 Subject: [issue5143] OS X: Py_SetProgramName argument has type char*; should be wchar_t* In-Reply-To: <1233679989.65.0.0874106595792.issue5143@psf.upfronthosting.co.za> Message-ID: <1233686911.71.0.964256722351.issue5143@psf.upfronthosting.co.za> Changes by Ronald Oussoren : Added file: http://bugs.python.org/file12930/patch-remove-PYTHONEXECUTABLE.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 19:50:49 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 03 Feb 2009 18:50:49 +0000 Subject: [issue5143] OS X: Py_SetProgramName argument has type char*; should be wchar_t* In-Reply-To: <1233679989.65.0.0874106595792.issue5143@psf.upfronthosting.co.za> Message-ID: <1233687049.08.0.491952346926.issue5143@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Please let me know if second patch (patch-remove-PYTHONEXECUTABLE.txt) fixes the issue for you as well, if it does I'll commit it to the 3.x branch (and add an item to the NEWS file). ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 19:53:33 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 03 Feb 2009 18:53:33 +0000 Subject: [issue5134] Compiler warnings in sqlite module In-Reply-To: <1233661010.54.0.375947573872.issue5134@psf.upfronthosting.co.za> Message-ID: <498892AA.70200@v.loewis.de> Martin v. L?wis added the comment: > The syntax would be this: > > #if defined(_MSC_VER) > # pragma warning(push) > /* Disable warnings for this file, see > http://www.sqlite.org/faq.html#q17 why we don't care for them. */ > # pragma warning(disable: 4244) > # pragma warning(disable: 4018) > #endif I'd rather disable them in the project, instead of putting it into the source code. I'd also just disable *all* warnings, since we wouldn't fix any of them. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 19:53:43 2009 From: report at bugs.python.org (bob gailer) Date: Tue, 03 Feb 2009 18:53:43 +0000 Subject: [issue5145] struct.calcsize('cd') returns 16 instead of 9 In-Reply-To: <1233687223.75.0.372489916628.issue5145@psf.upfronthosting.co.za> Message-ID: <1233687223.75.0.372489916628.issue5145@psf.upfronthosting.co.za> New submission from bob gailer : struct.calcsize('cd') returns 16 instead of 9 struct.calcsize('dc') returns 9 as expected ---------- components: Extension Modules messages: 81085 nosy: bgailer severity: normal status: open title: struct.calcsize('cd') returns 16 instead of 9 type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 19:55:52 2009 From: report at bugs.python.org (Brett Cannon) Date: Tue, 03 Feb 2009 18:55:52 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233660502.32.0.208624348435.issue5094@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Tue, Feb 3, 2009 at 03:28, STINNER Victor wrote: > > STINNER Victor added the comment: > > The UTC class have to be converted to C. Yes, the example code is just an example. =) > Can someone write a patch for > datetimemodule.c (and the doc plus an unit test ;-))? > I might have some people lined up to take this on. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 19:56:17 2009 From: report at bugs.python.org (Brett Cannon) Date: Tue, 03 Feb 2009 18:56:17 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1233687377.86.0.723880786126.issue5094@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon stage: needs patch -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 19:58:15 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 03 Feb 2009 18:58:15 +0000 Subject: [issue1731706] tkinter memory leak problem In-Reply-To: Message-ID: <498893C4.1030004@v.loewis.de> Martin v. L?wis added the comment: > Still, the "call" fix should be backported to python 2.6 as it doesn't > depend on changing supported tcl versions and is also more severe. That sounds like a good approach. If you can split the patch into two, backporting only one of them - go ahead! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 20:09:47 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 03 Feb 2009 19:09:47 +0000 Subject: [issue5143] OS X: Py_SetProgramName argument has type char*; should be wchar_t* In-Reply-To: <1233679989.65.0.0874106595792.issue5143@psf.upfronthosting.co.za> Message-ID: <1233688187.66.0.699446801002.issue5143@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the patches, I'll report back on them. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 20:13:23 2009 From: report at bugs.python.org (bob gailer) Date: Tue, 03 Feb 2009 19:13:23 +0000 Subject: [issue5145] struct.calcsize('cd') returns 16 instead of 9 In-Reply-To: <1233687223.75.0.372489916628.issue5145@psf.upfronthosting.co.za> Message-ID: <1233688403.79.0.157451795852.issue5145@psf.upfronthosting.co.za> bob gailer added the comment: Someone pointed out that one must consider alignment. I had overlooked that. It makes sense that a d is double-word aligned. Perhaps the documentation should mention alignment. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 20:19:31 2009 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 03 Feb 2009 19:19:31 +0000 Subject: [issue5127] UnicodeEncodeError - I can't even see license In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1233688771.15.0.216003769664.issue5127@psf.upfronthosting.co.za> Ezio Melotti added the comment: haypo> ord() of Python3 (narrow build) rejects surrogate characters: haypo> '\U00010000' haypo> >>> len(chr(0x10000)) haypo> 2 haypo> >>> ord(0x10000) haypo> TypeError: ord() expected string of length 1, but int found ord() works fine on Py3, you probably meant to do >>> ord('\U00010000') 65536 or >>> ord(chr(0x10000)) 65536 In Py3 is also stated that it accepts surrogate pairs (help(ord)). Py2 instead doesn't support them: >>> ord(u'\U00010000') TypeError: ord() expected a character, but string of length 2 found _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 20:23:45 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 03 Feb 2009 19:23:45 +0000 Subject: [issue2124] xml.sax and xml.dom fetch DTDs by default In-Reply-To: <1233685813.47.0.113293058632.issue2124@psf.upfronthosting.co.za> Message-ID: <498899BC.7020001@v.loewis.de> Martin v. L?wis added the comment: > The EntityResolver's resolveEntity() method is not, however, passed the > base path to resolve the relative systemId from. > > This makes it impossible to properly implement a parser which caches > fetched DTDs. I don't think this is actually the case. Did you try calling getSystemId on the locator? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 20:26:12 2009 From: report at bugs.python.org (John Ehresman) Date: Tue, 03 Feb 2009 19:26:12 +0000 Subject: [issue1706256] Give Partial the ability to skip positionals Message-ID: <1233689172.54.0.249851087614.issue1706256@psf.upfronthosting.co.za> John Ehresman added the comment: Commenting because this was brought up on python-dev -- I'd like this, primarily for the string method & itertools optimization. It's ugly, but it would be better than writing C code. The alternative might be to somehow optimize trivial functions to execute without bytecode, but that would be considerably harder. ---------- nosy: +jpe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 20:44:22 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 03 Feb 2009 19:44:22 +0000 Subject: [issue5145] struct.calcsize('cd') returns 16 instead of 9 In-Reply-To: <1233687223.75.0.372489916628.issue5145@psf.upfronthosting.co.za> Message-ID: <1233690262.11.0.690837082439.issue5145@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> georg.brandl components: +Documentation -Extension Modules nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 20:44:40 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Tue, 03 Feb 2009 19:44:40 +0000 Subject: [issue2124] xml.sax and xml.dom fetch DTDs by default In-Reply-To: <1203086575.38.0.209227458245.issue2124@psf.upfronthosting.co.za> Message-ID: <1233690280.92.0.98497631631.issue2124@psf.upfronthosting.co.za> Changes by Jean-Paul Calderone : ---------- nosy: +exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 20:52:21 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 03 Feb 2009 19:52:21 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233690741.15.0.914400920732.issue4804@psf.upfronthosting.co.za> Martin v. L?wis added the comment: As for checking CRT handles: it seems that __pioinfo is exported from msvcr90.dll. So we could check whether osfile has the FOPEN flag set, and we could check whether fh >= 0. Unfortunately, there seems to be no way to check for _nhandle. However, that might not be necessary: IIUC, we just need to check whether M=fh>>IOINFO_L2E is smaller than IOINFO_ARRAYS and __pioinfo[M] is not null. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 20:57:37 2009 From: report at bugs.python.org (abhishek) Date: Tue, 03 Feb 2009 19:57:37 +0000 Subject: [issue5146] threading via uid method doesn't work in imaplib In-Reply-To: <1233691056.73.0.419384658246.issue5146@psf.upfronthosting.co.za> Message-ID: <1233691056.73.0.419384658246.issue5146@psf.upfronthosting.co.za> New submission from abhishek : Hi, IMAP commands in general can be either called directly or via the UID command which basically returns the UIDs instead of message IDs. Consider this example: 02:23.02 > GDJB3 UID THREAD references UTF-8 (SEEN) 02:23.02 < * THREAD (3)(2)(4)(1) 02:23.02 matched r'\* (?P[A-Z-]+)( (?P.*))?' => ('THREAD', ' (3)(2)(4)(1)', '(3)(2)(4)(1)') 02:23.03 untagged_responses[THREAD] 0 += ["(3)(2)(4)(1)"] 02:23.03 < GDJB3 OK Thread completed. 02:23.03 matched r'(?PGDJB\d+) (?P[A-Z]+) (?P.*)' => ('GDJB3', 'OK', 'Thread completed.') [None] ... 02:59.22 > CNCF3 THREAD references UTF-8 (SEEN) 02:59.23 < * THREAD (3)(2)(4)(1) 02:59.23 matched r'\* (?P[A-Z-]+)( (?P.*))?' => ('THREAD', ' (3)(2)(4)(1)', '(3)(2)(4)(1)') 02:59.23 untagged_responses[THREAD] 0 += ["(3)(2)(4)(1)"] 02:59.23 < CNCF3 OK Thread completed. 02:59.23 matched r'(?PCNCF\d+) (?P[A-Z]+) (?P.*)' => ('CNCF3', 'OK', 'Thread completed.') 02:59.23 untagged_responses[THREAD] => ['(3)(2)(4)(1)'] ['(3)(2)(4)(1)'] The reason I figured out why UID failed whereas the direct method call worked lies in this particular line of the method 'uid' in imaplib.py: if command in ('SEARCH', 'SORT'): name = command else: name = 'FETCH' which should be : if command in ('SEARCH', 'SORT', 'THREAD'): name = command else: name = 'FETCH' I was able to confirm this in both 2.4 and 2.5. Hope this would be looked upon and fixed. Regards, Abhishek ---------- components: Library (Lib) messages: 81094 nosy: abhishek, piers, pierslauder severity: normal status: open title: threading via uid method doesn't work in imaplib type: behavior versions: Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 21:28:53 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Feb 2009 20:28:53 +0000 Subject: [issue4124] Patch for adding "default" to itemgetter and attrgetter In-Reply-To: <1224022053.76.0.0750871741065.issue4124@psf.upfronthosting.co.za> Message-ID: <1233692933.5.0.672975192499.issue4124@psf.upfronthosting.co.za> Raymond Hettinger added the comment: That makes sense. You've found two object models that have optional attributes and have had some need to extract them with a default. My remaining concern is about adding complexity for functionality that is not often needed. It wouldn't be an issue if itemgetter() and attrgetter() already had a simple signature, but they already allow multiple arguments and IMO that doesn't mesh well with providing defaults. FWIW, looking back at your use cases, it feels like the functional tools have come together awkwardly. It may be slower, but the following seems easier to read, easier to write, and clearer about its intention: sum('tr' == getattr(node, 'name', '') for node in soup) max(getattr(art, 'time', 0) for art in articles) In general, listcomps and genexps read better than equivalents using lambda or a stack of builtin operators. And, lambda is dog slow. So, the following may be slower than the above code: len(filter(lambda n: n == "tr", map(attrgetter("name", ""), soup))) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 21:37:49 2009 From: report at bugs.python.org (Miki Tebeka) Date: Tue, 03 Feb 2009 20:37:49 +0000 Subject: [issue4124] Patch for adding "default" to itemgetter and attrgetter In-Reply-To: <1224022053.76.0.0750871741065.issue4124@psf.upfronthosting.co.za> Message-ID: <1233693469.41.0.977886181156.issue4124@psf.upfronthosting.co.za> Miki Tebeka added the comment: Can't we find a faster dog for lambda :) Anyway, I agree that we need to see more demand for that before going on. Let's keep this ticket open and see if someone else comes along. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 21:42:20 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Feb 2009 20:42:20 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1233693740.81.0.318645826923.issue5139@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -1 on perms_with_repetitions. That's headed in the direction of bloat -- taking every formula in a textbook and putting it in the module. Also, it is somewhat use case challenged. I've *never* needed this in my 30 years of programming. I like Mark's idea for names that indicate that they return a number or count instead an iterator. Perhaps something like: ncombinations() npermutations() ncombinations_with_replacement() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 22:21:06 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 03 Feb 2009 21:21:06 +0000 Subject: [issue1019715] distutils ignores configure's --includedir Message-ID: <1233696066.77.0.89891710913.issue1019715@psf.upfronthosting.co.za> Akira Kitada added the comment: I'm having the same problem. This is a real headache, especially on systems that run both 32-bit and 64-bit apps, where I often see "lib64", "include64" and "bin64". In my opinion, lib, include and bin shouldn't be hard-coded in anywhere. Note that these hard-coded paths are found in other places, too. See http://bugs.python.org/issue1294959 for further detials. ---------- nosy: +akitada, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 22:23:22 2009 From: report at bugs.python.org (Eric Smith) Date: Tue, 03 Feb 2009 21:23:22 +0000 Subject: [issue4285] Use a named tuple for sys.version_info In-Reply-To: <1226189092.93.0.524804334834.issue4285@psf.upfronthosting.co.za> Message-ID: <1233696202.96.0.471070981079.issue4285@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 22:23:31 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 03 Feb 2009 21:23:31 +0000 Subject: [issue1294959] Problems with /usr/lib64 builds. Message-ID: <1233696211.54.0.549206220255.issue1294959@psf.upfronthosting.co.za> Akira Kitada added the comment: Similar problem report: http://bugs.python.org/issue1019715 ---------- nosy: +akitada _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 22:24:00 2009 From: report at bugs.python.org (Ajith Antony) Date: Tue, 03 Feb 2009 21:24:00 +0000 Subject: [issue5147] MozillaCookieJar should not store leading whitespace in Magic header In-Reply-To: <1233696240.85.0.475858035079.issue5147@psf.upfronthosting.co.za> Message-ID: <1233696240.85.0.475858035079.issue5147@psf.upfronthosting.co.za> New submission from Ajith Antony : It seems that in the MozillaCookieJar library, the author accidently indented the long string that represents the magic header of the Netscape compatible cookie file. This is not a problem for MozillaCookieJar as the regex to test the magic header is not bound to the beginning of the line. Other libraries, however, may bind the pattern match to the beginning of the line, such as perl's HTTP::Cookies::Netscape. For better compatibility of Netscape cookies files, the magic header must not be indented. Index: svn-python-lib/_MozillaCookieJar.py =================================================================== --- svn-python-lib/_MozillaCookieJar.py (revision 69261) +++ svn-python-lib/_MozillaCookieJar.py (working copy) @@ -38,9 +38,9 @@ """ magic_re = "#( Netscape)? HTTP Cookie File" header = """\ - # Netscape HTTP Cookie File - # http://www.netscape.com/newsref/std/cookie_spec.html - # This is a generated file! Do not edit. +# Netscape HTTP Cookie File +# http://www.netscape.com/newsref/std/cookie_spec.html +# This is a generated file! Do not edit. """ ---------- components: Library (Lib) messages: 81100 nosy: aantony severity: normal status: open title: MozillaCookieJar should not store leading whitespace in Magic header type: behavior versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 22:28:07 2009 From: report at bugs.python.org (Fredrik Johansson) Date: Tue, 03 Feb 2009 21:28:07 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1233696487.34.0.779699921318.issue5139@psf.upfronthosting.co.za> Fredrik Johansson added the comment: I understand the connection with itertools, but why not just call a binomial coefficient a binomial coefficient? Probably 90% of all math libraries call this function 'binomial' or 'bincoef' and I suspect that's the name most people would search for. ---------- nosy: +fredrikj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 22:34:11 2009 From: report at bugs.python.org (Damien Neil) Date: Tue, 03 Feb 2009 21:34:11 +0000 Subject: [issue2124] xml.sax and xml.dom fetch DTDs by default In-Reply-To: <1203086575.38.0.209227458245.issue2124@psf.upfronthosting.co.za> Message-ID: <1233696851.84.0.752328448973.issue2124@psf.upfronthosting.co.za> Damien Neil added the comment: On Feb 3, 2009, at 11:23 AM, Martin v. L?wis wrote: > I don't think this is actually the case. Did you try calling getSystemId > on the locator? EntityResolver.resolveEntity() is called with the publicId and systemId as arguments. It does not receive a locator. - Damien _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 22:40:15 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Tue, 03 Feb 2009 21:40:15 +0000 Subject: [issue2124] xml.sax and xml.dom fetch DTDs by default In-Reply-To: <1203086575.38.0.209227458245.issue2124@psf.upfronthosting.co.za> Message-ID: <1233697215.7.0.746574843082.issue2124@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: Though it's inconvenient to do so, you can arrange to have the locator available from the entity resolver. The content handler's setDocumentLocator method will be called early on with the locator object. So you can give your entity resolver a reference to your content handler and save a reference to the document locator in the content handler. Then in the entity resolver's resolveEntity method you can reach over into the content handler and grab the document locator to call its getSystemId method. Note that you have to be careful with the InputStreams you return from resolveEntity. I wasn't aware of this before (and perhaps I've misinterpreted some observer), but I just noticed that if you return an InputSource based on a file object, the file object's name will be used as the document id! This is quite not what you want. InputStream has a setSystemId method, but even if you call it before you call setByteStream, the system id will be the name of the file object passed to setByteStream. Perhaps calling these two methods in the opposite order will fix this, I'm not sure, I haven't tried. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 22:42:59 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 03 Feb 2009 21:42:59 +0000 Subject: [issue2124] xml.sax and xml.dom fetch DTDs by default In-Reply-To: <1233696851.84.0.752328448973.issue2124@psf.upfronthosting.co.za> Message-ID: <4988BA5F.90607@v.loewis.de> Martin v. L?wis added the comment: > EntityResolver.resolveEntity() is called with the publicId and systemId as > arguments. It does not receive a locator. Sure. But ContentHandler.setDocumentLocator receives it, and you are supposed to store it for the entire parse, to always know what entity is being processed if you want to. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 22:56:19 2009 From: report at bugs.python.org (Piers Lauder) Date: Tue, 03 Feb 2009 21:56:19 +0000 Subject: [issue5146] threading via uid method doesn't work in imaplib In-Reply-To: <1233691056.73.0.419384658246.issue5146@psf.upfronthosting.co.za> Message-ID: <1233698179.98.0.690971597987.issue5146@psf.upfronthosting.co.za> Piers Lauder added the comment: I agree with this change. It should be propagated to all versions. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 22:56:46 2009 From: report at bugs.python.org (Eric Smith) Date: Tue, 03 Feb 2009 21:56:46 +0000 Subject: [issue4285] Use a named tuple for sys.version_info In-Reply-To: <1226189092.93.0.524804334834.issue4285@psf.upfronthosting.co.za> Message-ID: <1233698206.37.0.485180440522.issue4285@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- assignee: brett.cannon -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 23:02:17 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Tue, 03 Feb 2009 22:02:17 +0000 Subject: [issue2124] xml.sax and xml.dom fetch DTDs by default In-Reply-To: <1203086575.38.0.209227458245.issue2124@psf.upfronthosting.co.za> Message-ID: <1233698537.63.0.989341435073.issue2124@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: > It's indeed possible to provide that as a third-party module; one > would have to implement an EntityResolver, and applications would > have to use it. If there was a need for such a thing, somebody would > have done it years ago. I don't think this is true, for several reasons. First, most people never notice that they are writing or using an application which has this behavior. This is because the behavior is transparent in almost all cases, manifesting only as a slowdown. Often, no one is paying close attention to whether a function takes 0.1s or 0.5s. So code gets written which fetches resources from the network by accident. Similarly, users generally don't have any idea that this kind of defect is possible, or they don't think it's unusual behavior. In general, they're not equipped to understand why this is a bad thing. At best, they may decide a program is slow and be upset, but out of the myriad reasons a program might be slow, they have no particular reason to settle on this one as the real cause. Second, it is *difficult* to implement the non-network behavior. Seriously, seriously difficult. The documentation for these APIs is obscure and incomplete in places. It takes a long time to puzzle out what it means and how to achieve the desired behavior. I wouldn't be surprised if many people simply gave up and either switched to another parser or decided they could live with the slowdown (perhaps not realizing that it could be arbitrarily long and might add a network dependency to a program which doesn't already have one). Third, there are several pitfalls on the way to a correct implementation of the non-network behavior which may lead a developer to decide they have succeeded when they have actually failed. The most obvious is that simply turning off the external-general-entities feature appears to solve the problem but actually changes the parser's behavior so that it will silently drop named character entities. This is quite surprising behavior to anyone who hasn't spent a lot of time with the XML specification. So I think it would be a significant improvement if there were a simple, documented way to switch from network retrieval to local retrieval from a cache. I also think that the current default behavior is wrong. The default should not be to go out to the network, even if there is a well-behaved HTTP caching client involved. So the current behavior should be deprecated. After a sufficient period of time, the local-only behavior should be made the default. I don't see any problem with making it easy to re-enable the old behavior, though. > -1 on issuing a warning. I really cannot see much of a problem in > this entire issue. XML was designed to "be straightforwardly usable > over the Internet" (XML rec., section 1.1), and this issue is a > direct consequence of that design decision. You might just as well > warn people against using XML in the first place. Quoting part of the XML design goals isn't a strong argument for the current behavior. Transparently requesting network resources in order to process local data isn't a necessary consequence of the "straightforwardly usable over the internet" goal. Allowing this behavior to be explicitly enabled, but not enabled by default, easily meets this goal. Straightforwardly supporting a local cache of DTDs is even better, since it improves application performance and removes a large number of of security concerns. With the general disfavor of DTDs (in favor of other validation techniques, such as relax-ng) and the general disfavor of named character entities (basically only XHTML uses them), I find it extremely difficult to justify Python's current default behavior. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 23:07:32 2009 From: report at bugs.python.org (Tim Lesher) Date: Tue, 03 Feb 2009 22:07:32 +0000 Subject: [issue5015] The Py_SetPythonHome C API function is undocumented In-Reply-To: <1232493833.95.0.946934351035.issue5015@psf.upfronthosting.co.za> Message-ID: <1233698852.05.0.670045559443.issue5015@psf.upfronthosting.co.za> Changes by Tim Lesher : ---------- nosy: +tlesher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 23:16:41 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Feb 2009 22:16:41 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1233699401.11.0.761624437998.issue5139@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Besides paralleling itertools names, the names should also parallel each other -- when I find permutations, I also expect to find combinations. No matter what names are selected, we'll include alternate index targets for the various names "binonimial coefficient", "choose function", "multichoose", "combinations with repetition". _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 23:32:44 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Feb 2009 22:32:44 +0000 Subject: [issue3783] dbm.sqlite proof of concept In-Reply-To: <1220572652.24.0.256023256295.issue3783@psf.upfronthosting.co.za> Message-ID: <1233700364.08.0.213302063469.issue3783@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file12891/tmp_dev_shelver.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 23:32:50 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Feb 2009 22:32:50 +0000 Subject: [issue3783] dbm.sqlite proof of concept In-Reply-To: <1220572652.24.0.256023256295.issue3783@psf.upfronthosting.co.za> Message-ID: <1233700370.5.0.92004171754.issue3783@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file12896/dbsqlite.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 23:32:58 2009 From: report at bugs.python.org (Damien Neil) Date: Tue, 03 Feb 2009 22:32:58 +0000 Subject: [issue2124] xml.sax and xml.dom fetch DTDs by default In-Reply-To: <1203086575.38.0.209227458245.issue2124@psf.upfronthosting.co.za> Message-ID: <1233700378.35.0.83733174393.issue2124@psf.upfronthosting.co.za> Damien Neil added the comment: On Feb 3, 2009, at 1:42 PM, Martin v. L?wis wrote: > Sure. But ContentHandler.setDocumentLocator receives it, and you are > supposed to store it for the entire parse, to always know what entity > is being processed if you want to. Where in the following sequence am I supposed to receive the document locator? parser = xml.sax.make_parser() parser.setEntityResolver(CachingEntityResolver()) doc = xml.dom.minidom.parse('file.xml', parser) The content handler is being created deep inside xml.dom. It does, in fact, store the document locator, but not in any place that I can easily access without breaking several layers of abstraction. Or, as a more general question: How can I get a DOM tree that includes external entities? If there's an easy way to do it, the documentation does not make it clear at all. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 23:36:04 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Feb 2009 22:36:04 +0000 Subject: [issue3783] dbm.sqlite proof of concept In-Reply-To: <1220572652.24.0.256023256295.issue3783@psf.upfronthosting.co.za> Message-ID: <1233700564.3.0.121684834673.issue3783@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Here's an updated patch (it's also in the sandbox): * Added a sync() method to support shelves. * Removed commits on granular sets and gets. * Optimized __len__ and __contains__. Added file: http://bugs.python.org/file12931/dbsqlite.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 23:42:24 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 03 Feb 2009 22:42:24 +0000 Subject: [issue3783] dbm.sqlite proof of concept In-Reply-To: <1220572652.24.0.256023256295.issue3783@psf.upfronthosting.co.za> Message-ID: <1233700944.37.0.469276841315.issue3783@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think issuing 'SELECT MAX(ROWID)' to compute the length of the table is not correct if some rows get deleted in the table. I've found a thread about it here: http://osdir.com/ml/db.sqlite.general/2004-03/msg00329.html In that thread someone suggested caching the length in another table and updating it through a trigger each time the main table is modified. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 23:43:01 2009 From: report at bugs.python.org (Damien Neil) Date: Tue, 03 Feb 2009 22:43:01 +0000 Subject: [issue2124] xml.sax and xml.dom fetch DTDs by default In-Reply-To: <1203086575.38.0.209227458245.issue2124@psf.upfronthosting.co.za> Message-ID: <1233700981.04.0.764705170054.issue2124@psf.upfronthosting.co.za> Damien Neil added the comment: I just discovered another really fun wrinkle in this. Let's say I want to have my entity resolver return a reference to my local copy of a DTD. I write: source = xml.sax.InputSource() source.setPublicId(publicId) source.setSystemId(systemId) source.setCharacterStream(file(path_to_local_copy)) return source This will appear to work. However, the parser will still silently fetch the DTD over the network! I needed to call source.setByteStream()--character streams are silently ignored. I'd never have noticed this if I hadn't used strace on my process and noticed a slew of recvfrom() calls that shouldn't have been there. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 00:08:09 2009 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 03 Feb 2009 23:08:09 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1233702489.78.0.189591899391.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-features.diff is based on Python 2.6. It includes: Named Unicode characters eg \N{LATIN CAPITAL LETTER A} Unicode character properties eg \p{Lu} (uppercase letter) and \P{Lu} (not uppercase letter) Other character properties not restricted to Unicode eg \p{Alnum} and \P{Alnum} Issue #3511 : Incorrect charset range handling with ignore case flag? Issue #3665 : Support \u and \U escapes in regexes Issue #1519638 Unmatched Group issue - workaround Issue #1693050 \w not helpful for non-Roman scripts The next 2 seemed a good idea at the time. :-) Octal escape \onnn Extended hex escape \x{n} Added file: http://bugs.python.org/file12932/issue2636-features.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 00:11:47 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Feb 2009 23:11:47 +0000 Subject: [issue3783] dbm.sqlite proof of concept In-Reply-To: <1220572652.24.0.256023256295.issue3783@psf.upfronthosting.co.za> Message-ID: <1233702707.63.0.108315706569.issue3783@psf.upfronthosting.co.za> Raymond Hettinger added the comment: That's a bummer. Changing this method to __bool__ and then setting __len__ back to "count(*)". Added file: http://bugs.python.org/file12933/dbsqlite.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 00:11:57 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Feb 2009 23:11:57 +0000 Subject: [issue3783] dbm.sqlite proof of concept In-Reply-To: <1220572652.24.0.256023256295.issue3783@psf.upfronthosting.co.za> Message-ID: <1233702717.83.0.386264704856.issue3783@psf.upfronthosting.co.za> Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file12931/dbsqlite.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 00:12:09 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 03 Feb 2009 23:12:09 +0000 Subject: [issue2124] xml.sax and xml.dom fetch DTDs by default In-Reply-To: <1233700378.35.0.83733174393.issue2124@psf.upfronthosting.co.za> Message-ID: <4988CF46.6040100@v.loewis.de> Martin v. L?wis added the comment: > Where in the following sequence am I supposed to receive the document > locator? > > parser = xml.sax.make_parser() > parser.setEntityResolver(CachingEntityResolver()) > doc = xml.dom.minidom.parse('file.xml', parser) This is DOM parsing, not SAX parsing. > The content handler is being created deep inside xml.dom. It does, in > fact, store the document locator, but not in any place that I can easily > access without breaking several layers of abstraction. So break layers of abstraction, then. Or else, use dom.expatbuilder, and ignore SAX/pulldom for DOM parsing. > Or, as a more general question: How can I get a DOM tree that includes > external entities? If there's an easy way to do it, the documentation > does not make it clear at all. This tracker is really not the place to ask questions; use python-list for that. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 00:25:49 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 03 Feb 2009 23:25:49 +0000 Subject: [issue5127] UnicodeEncodeError - I can't even see license In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1233703549.72.0.567542361919.issue5127@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > I must be missing some detail, but what does the Unicode database > have to do with the unicodeobject.c C API ? Ah, now I understand your concerns. My suggestion is to change only the 20 functions in unicodectype.c: _PyUnicode_IsAlpha, _PyUnicode_ToLowercase... and no change in unicodeobject.c at all. They all take a single code point as argument, some also return a single code point. Changing these functions is backwards compatible. I join a patch so we can argue on concrete code (tests are missing). Another effect of the patch: unicodedata.numeric('\N{AEGEAN NUMBER TWO}') can return 2.0. The str.isalpha() (and others) methods did not change: they still split the surrogate pairs. ---------- keywords: +patch Added file: http://bugs.python.org/file12934/unicodectype_ucs4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 00:28:55 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 03 Feb 2009 23:28:55 +0000 Subject: [issue1076233] distutils.core.setup() with unicode arguments broken Message-ID: <1233703735.48.0.26488373601.issue1076233@psf.upfronthosting.co.za> Akira Kitada added the comment: It seems this problem was fixed already. Can we close this? ---------- nosy: +akitada, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 00:34:53 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 03 Feb 2009 23:34:53 +0000 Subject: [issue977470] Deleted files are reinstalled Message-ID: <1233704093.83.0.904159762635.issue977470@psf.upfronthosting.co.za> Akira Kitada added the comment: Tarek, I think this is not a bug and would be safe to close. What do you think? ---------- nosy: +akitada, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 01:36:39 2009 From: report at bugs.python.org (Bobby Xiao) Date: Wed, 04 Feb 2009 00:36:39 +0000 Subject: [issue1519638] Unmatched Group issue - workaround Message-ID: <1233707799.68.0.403131153132.issue1519638@psf.upfronthosting.co.za> Bobby Xiao added the comment: It was so long ago, I've since redone half my codebase (the hack is still there, but I can't remember what it was meant to replace now :( ). Sorry about that. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 02:04:44 2009 From: report at bugs.python.org (Rafe Kaplan) Date: Wed, 04 Feb 2009 01:04:44 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1233709484.29.0.264977639728.issue5094@psf.upfronthosting.co.za> Rafe Kaplan added the comment: I'm going to attempt to implement this feature. ---------- nosy: +rafe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 02:05:19 2009 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 04 Feb 2009 01:05:19 +0000 Subject: [issue4753] Faster opcode dispatch on gcc In-Reply-To: <1230325778.98.0.752974375077.issue4753@psf.upfronthosting.co.za> Message-ID: <1233709519.64.0.498501132612.issue4753@psf.upfronthosting.co.za> Skip Montanaro added the comment: This has been checked in, right? Might I suggest that the TARGET and TARGET_WITH_IMPL macros not include the trailing colon? I think that will make it more friendly toward "smart" editors such as Emacs' C mode. I definitely get better indentation with TARGET(NOP): than with TARGET(NOP) S _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 02:05:42 2009 From: report at bugs.python.org (Christopher Barker) Date: Wed, 04 Feb 2009 01:05:42 +0000 Subject: [issue5148] gzip.open breaks with 'U' flag In-Reply-To: <1233709542.39.0.638969424034.issue5148@psf.upfronthosting.co.za> Message-ID: <1233709542.39.0.638969424034.issue5148@psf.upfronthosting.co.za> New submission from Christopher Barker : If you pass the 'U' (Universal newlines) flag into gzip.open(), the flag gets passed into the file open command used to open the gzip file itself. As the 'U' flag can cause changes in teh data (Lineffed translation), when it is used with a binary file open, the data is corrupted, and all can go to heck. In virtually all of my code that reads text files, I use the 'U' flag to open files, it really helps not having to deal with newline issues. Yes, they are fewer now that the Macintosh uses \n, but they can still be a pain. Anyway, we added such support to some matplotlib methods, and found that gzip file reading broken We were passing the flags though into either file() or gzip.open(), and passing 'U' into gzip.open() turns out to be fatal. 1) It would be nice if the gzip module (and the zip lib module) supported Universal newlines -- you could read a compressed text file with "wrong" newlines, and have them handled properly. However, that may be hard to do, so at least: 2) Passing a 'U' flag in to gzip.open shouldn't break it -- it shuld be ignored or raise an exeption. I took a look at the Python SVN (2.5.4 and 2.6.1) for the gzip lib. I see this: # guarantee the file is opened in binary mode on platforms # that care about that sort of thing if mode and 'b' not in mode: mode += 'b' if fileobj is None: fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb') this is going to break for 'U' == you'll get 'rUb'. I tested file(filename, 'rUb'), and it looks like it does universal newline translation. So: * Either gzip should be a bit smarter, and remove the 'U' flag (that's what we did in the MPL code), or force 'rb' or 'wb'. * Or: file opening should be a bit smarter -- what does 'rUb' mean? a file can't be both Binary and Universal Text. Should it raise an exception? Somehow I think it would be better to ignore the 'U', but maybe that's only because of the issue I happen to be looking at now. That later seems a better idea -- this issue could certainly come up in other places than the gzip module, but maybe it would break a bunch of code -- who knows? I haven't touched py3 yet, so I have not idea if this issue is different there. NOTE: passing in the 'U' flag doesn't guarantee that gzi will break. The right combination of bytes needs to be there. In fact, when I first tested this with a small test file, it worked just fine -- I though gzip was ignoring the flag. However, when tested with a larger (real) gz file, it did break. very simple patch: Add: mode.replace('U', '') to the above code before opeing the file But we may want to do something smarter... see the (limited) discussion at: http://mail.python.org/pipermail/python-dev/2009-January/085662.html ---------- components: Library (Lib) messages: 81121 nosy: Chris.Barker severity: normal status: open title: gzip.open breaks with 'U' flag type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 02:06:13 2009 From: report at bugs.python.org (Damien Neil) Date: Wed, 04 Feb 2009 01:06:13 +0000 Subject: [issue2124] xml.sax and xml.dom fetch DTDs by default In-Reply-To: <1203086575.38.0.209227458245.issue2124@psf.upfronthosting.co.za> Message-ID: <1233709573.36.0.0388264885616.issue2124@psf.upfronthosting.co.za> Damien Neil added the comment: On Feb 3, 2009, at 3:12 PM, Martin v. L?wis wrote: > This is DOM parsing, not SAX parsing. 1) The title of this ticket begins with "xml.sax and xml.dom...". 2) I am creating a SAX parser and passing it to xml.dom, which uses it. > So break layers of abstraction, then. Or else, use dom.expatbuilder, > and ignore SAX/pulldom for DOM parsing. Is that really the answer? Read the source code to xml.dom.*, and write hacks based on what I find there? Note also that xml.dom.expatbuilder does not appear to be an external API--there is no mention of it in the documentation for xml.dom.*. > This tracker is really not the place to ask questions; use python-list > for that. That was a rhetorical question. The answer is, as best I can tell, "You can't do that." _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 02:20:03 2009 From: report at bugs.python.org (Peter A Silva) Date: Wed, 04 Feb 2009 01:20:03 +0000 Subject: [issue5149] syntactic sugar: type coercion on pointer assignment In-Reply-To: <1233710403.4.0.267443476473.issue5149@psf.upfronthosting.co.za> Message-ID: <1233710403.4.0.267443476473.issue5149@psf.upfronthosting.co.za> New submission from Peter A Silva : tough% cat toy.py from ctypes import * class foo(Structure): _fields_ = [ ( "bar", c_char_p ) ] foofoo = foo() babar = create_string_buffer(32) foofoo.bar = babar tough% python toy.py Traceback (most recent call last): File "toy.py", line 11, in foofoo.bar = babar TypeError: incompatible types, c_char_Array_32 instance instead of c_char_p instance tough% would be nice if ctypes automagically turned the assignment into foofoo.bar = cast(babar,c_char_p) There doesn't seem to be any other possible intent of this syntax. Color me stupid, but being new to ctypes, it took me approximately 30 hours to discover a method of such assignment that worked (babar.raw is not rejected, but not correct, debugging that was fun. I actually fell upon addressof(babar), which does also works, but is probably undesirable.) It would be very friendly if ctypes would just do the right thing. It doesn't seem like there is any other possible intent of such a syntax. ---------- assignee: theller components: ctypes messages: 81123 nosy: PeterASilva, theller severity: normal status: open title: syntactic sugar: type coercion on pointer assignment versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 03:41:21 2009 From: report at bugs.python.org (James Henstridge) Date: Wed, 04 Feb 2009 02:41:21 +0000 Subject: [issue2422] Automatically disable pymalloc when running under valgrind In-Reply-To: <1205925069.41.0.603933745456.issue2422@psf.upfronthosting.co.za> Message-ID: <1233715281.63.0.0682000054335.issue2422@psf.upfronthosting.co.za> James Henstridge added the comment: Attached is an updated version of the patch against trunk (2.7). It simply fixes the conflicts that have occurred since the previous patch. Added file: http://bugs.python.org/file12935/disable-pymalloc-on-valgrind-py27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 03:43:21 2009 From: report at bugs.python.org (Ryan Freckleton) Date: Wed, 04 Feb 2009 02:43:21 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1233715401.49.0.471668547288.issue5135@psf.upfronthosting.co.za> Ryan Freckleton added the comment: PJE seems to have borrowed the time machine :-). Based on the code the register function is already a decorator: def register(typ, func=None): if func is None: return lambda f: register(typ, f) registry[typ] = func return func The returned lambda is a one argument decorator. so your syntax: @generic_fn.register(XXX) def xxx_impl(xxx): pass Already works. A test to validate this behavior should probably be added. I don't mean to bikeshed, but could we call this function functools.generic instead of functools.simplegeneric? The only reason I can think of for keeping it simplegeneric would be to avoid a future name clash with the Generic Function PEP and if/when that PEP get's implemented, I would think that the functionality would live in builtins, not functools. ---------- nosy: +ryan.freckleton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 04:13:44 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 04 Feb 2009 03:13:44 +0000 Subject: [issue2578] Figure out what to do with unittest's redundant APIs In-Reply-To: <1207616486.67.0.93583341584.issue2578@psf.upfronthosting.co.za> Message-ID: <1233717224.32.0.958206520524.issue2578@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 04:33:31 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 Feb 2009 03:33:31 +0000 Subject: [issue4347] Circular dependency causes SystemError when adding new syntax In-Reply-To: <1227022091.75.0.852526924329.issue4347@psf.upfronthosting.co.za> Message-ID: <1233718411.82.0.695615258972.issue4347@psf.upfronthosting.co.za> Brett Cannon added the comment: So I finally got around to reviewing the patch and while it looks fine, I ended up with some failing tests: test_compiler test_quopri test_sys test_transformer. Do you know what is going on Thomas? This is after repeated make/make clean calls and using your non-review patch with all of the auto-generated changes included. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 04:54:50 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 Feb 2009 03:54:50 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233584376.51.0.787053739937.issue5128@psf.upfronthosting.co.za> Message-ID: <1233719690.96.0.205083712445.issue5128@psf.upfronthosting.co.za> Brett Cannon added the comment: Patch is really close. Can you use a context manager for the file management? That way the file is guaranteed to be closed without issue. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 06:33:02 2009 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 04 Feb 2009 05:33:02 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1233725582.83.0.827924000651.issue5139@psf.upfronthosting.co.za> Ezio Melotti added the comment: itertools.permutations_with_repetitions(iterable[, r]) is not necessary, writing in the doc that set(itertools.permutations(iterable[, r])) has the same result is probably enough (I put the set() in the wrong place in the previous message - this version is also less efficient because it has to generate duplicate elements that will be removed by set()). I suggested to include math.npermutations_with_repetitions for completeness, even if it's not widely used IMHO is not coherent to have formulas to calculate combinations with and without repetitions and a just a formula for permutations without repetitions. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 09:10:25 2009 From: report at bugs.python.org (Paul Moore) Date: Wed, 04 Feb 2009 08:10:25 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1233735025.56.0.351831728829.issue5135@psf.upfronthosting.co.za> Paul Moore added the comment: Well spotted! I missed that when I checked. I will add tests and documentation. I agree that generic is better. I only left it as it was because the original intent was simply to move the existing code - but that's not a particularly good reason for keeping a clumsy name. There shouldn't be a clash, as any more general mechanism can either be in its own module or the existing function can be extended in a compatible manner. I'll make this change too. Thanks for the feedback! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 09:27:40 2009 From: report at bugs.python.org (Paul Moore) Date: Wed, 04 Feb 2009 08:27:40 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1233736060.77.0.656330328321.issue5135@psf.upfronthosting.co.za> Paul Moore added the comment: Here's an updated patch. Added file: http://bugs.python.org/file12936/generic.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 09:37:44 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 04 Feb 2009 08:37:44 +0000 Subject: [issue5150] IDLE to support reindent.py In-Reply-To: <1233736664.4.0.115705275626.issue5150@psf.upfronthosting.co.za> Message-ID: <1233736664.4.0.115705275626.issue5150@psf.upfronthosting.co.za> New submission from Raymond Hettinger : Add rstrip() to the Format menu. Python's svn repository no longer accepts files with trailing whitespace and it is often necessary to run reindent.py before submitting. It would be nice to have this as a built-in formatting tool. ---------- assignee: kbk components: IDLE messages: 81131 nosy: kbk, rhettinger priority: normal severity: normal status: open title: IDLE to support reindent.py type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 10:33:25 2009 From: report at bugs.python.org (Martin von Gagern) Date: Wed, 04 Feb 2009 09:33:25 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233584376.51.0.787053739937.issue5128@psf.upfronthosting.co.za> Message-ID: <1233740005.2.0.2234891819.issue5128@psf.upfronthosting.co.za> Martin von Gagern added the comment: Not being a regular Python programmer myself, I've never even heard of a context manager before, but this latest patch should fit the bill. As for tests, I believe that a few two-second sleeps (as FAT has only two second resolution iirc) should avoid the kind of problem you describe. This latest patch includes unit tests, where the test_backdate fails for current implementation. The others are there to express even more basic assumptions, and can be dropped if you worry about those seconds spent running obvious tests. The tests are based on test_dircache, from which I copied and adapted the infrastructure for dealing with a temporary directory. Added file: http://bugs.python.org/file12937/compileall-timestamp3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 10:34:10 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 04 Feb 2009 09:34:10 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233740050.42.0.776875268547.issue4804@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: FYI, Microsoft has responded to my query: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx? FeedbackID=409955 In short: Comments Hello, Thanks for the report. We will probably not be able to address this in our current release, but we will reconsider for future versions of the CRT. Pat Brenner Visual C++ Libraries Development _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 10:36:22 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 04 Feb 2009 09:36:22 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1233740182.09.0.949837291563.issue5139@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I suggested to include math.npermutations_with_repetitions for > completeness, Ezio, itertools currently has combinations with and without *replacement*, not repetition. I think you're talking about something slightly different (repetitions in the *iterable*, rather than allowing repeated *drawings* of the same element). itertools already has 'permutations_with_replacement': it's called 'product'. combinations(it, r): select r elements from it, no replacement, no order permutations(it, r): select r elements, no replacement, order is relevant combinations_with_replacement(it, r): replacement, no order product(it, repeat=r): replacement, order _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 10:54:10 2009 From: report at bugs.python.org (Qiangning Hong) Date: Wed, 04 Feb 2009 09:54:10 +0000 Subject: [issue4947] sys.stdout fails to use default encoding as advertised In-Reply-To: <1231931928.79.0.528374921948.issue4947@psf.upfronthosting.co.za> Message-ID: <1233741250.59.0.931883956179.issue4947@psf.upfronthosting.co.za> Changes by Qiangning Hong : ---------- nosy: +hongqn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 11:06:01 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 04 Feb 2009 10:06:01 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233741961.39.0.698337580952.issue4804@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Checked in r69268, to check strftime() and fopen() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 11:41:45 2009 From: report at bugs.python.org (Robert Kern) Date: Wed, 04 Feb 2009 10:41:45 +0000 Subject: [issue3976] pprint._safe_repr is not general enough in one instance In-Reply-To: <1222445700.05.0.107288672735.issue3976@psf.upfronthosting.co.za> Message-ID: <1233744105.07.0.590375468792.issue3976@psf.upfronthosting.co.za> Changes by Robert Kern : ---------- nosy: +robert.kern _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 12:22:31 2009 From: report at bugs.python.org (Malcolm Purvis) Date: Wed, 04 Feb 2009 11:22:31 +0000 Subject: [issue5109] array.array constructor very slow when passed an array object. In-Reply-To: <1233318806.98.0.166527784762.issue5109@psf.upfronthosting.co.za> Message-ID: <1233746551.95.0.482657252708.issue5109@psf.upfronthosting.co.za> Malcolm Purvis added the comment: It's true that memcpy won't work when the data type changes, but I would assume (with no evidence to back me up) that the most common case for passing an array into the array's constructor would be when data types are the same. That case would be case to detect especially and use memcpy for. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 12:48:09 2009 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 04 Feb 2009 11:48:09 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1233748089.81.0.826175896921.issue5135@psf.upfronthosting.co.za> Nick Coghlan added the comment: The reason I like the simplegeneric name is that that is exactly what this feature is: a *simple* generic implementation that is deliberately limited to dispatching on the first argument (because that is easily explained to users that are already familiar with OOP and especially the existing Python magic method dispatch mechanism. So the name isn't just about avoiding name clashes, it's also about setting appropriate expectations as to what is supported. Yes, the name is a little clumsy but one thing I do *not* want to see happen is a swathe of feature requests asking that this become an all-singing all-dancing generic function mechanism like RuleDispatch. Don't forget that actually *writing* generic functions (i.e. using the @functools.simplegeneric decorator itself) should be far less common than using the .register() method of existing generic functions. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 13:03:17 2009 From: report at bugs.python.org (Paul Moore) Date: Wed, 04 Feb 2009 12:03:17 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1233748997.83.0.964166014431.issue5135@psf.upfronthosting.co.za> Paul Moore added the comment: Fair comment. As Ryan said, it's a bit of a bikeshed issue. I prefer "generic", on the basis that I'd prefer to keep the simple name for the simple use - something as complex as the RuleDispatch version could use the name "dispatch" (if they want to keep it the name simple) or "multimethod" (to emphasize that it dispatches on more than just one argument). If the consensus is for keeping it as "simplegeneric", I'll go with that, but I'll wait for other views first. BTW, another option is simply to clarify the limitations in the documentation. I can add something there if that would be enough for you. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 13:24:55 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 04 Feb 2009 12:24:55 +0000 Subject: [issue3166] Make conversions from long to float correctly rounded. In-Reply-To: <1214082720.03.0.30402071522.issue3166@psf.upfronthosting.co.za> Message-ID: <1233750295.38.0.387519847328.issue3166@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> marketdickinson priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 14:56:33 2009 From: report at bugs.python.org (Eric Smith) Date: Wed, 04 Feb 2009 13:56:33 +0000 Subject: [issue4285] Use a named tuple for sys.version_info In-Reply-To: <1226189092.93.0.524804334834.issue4285@psf.upfronthosting.co.za> Message-ID: <1233755793.57.0.687776200099.issue4285@psf.upfronthosting.co.za> Eric Smith added the comment: The doc string for sys includes: version_info -- version information as a tuple I'm not sure changing this to "... as a structseq" makes it any more useful, but it's more correct. Does anyone have a preference? I'd use the same wording as float_info, but that's missing from the doc string (and I'll deal with that as a separate issue). Other than that, this all looks good to me. I also tested that the docs build. I'll check it in once I get or invent new wording for the doc string. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 16:56:54 2009 From: report at bugs.python.org (Akira Kitada) Date: Wed, 04 Feb 2009 15:56:54 +0000 Subject: [issue962772] when both maintainer and author provided, author discarded Message-ID: <1233763014.94.0.258432214354.issue962772@psf.upfronthosting.co.za> Akira Kitada added the comment: """ from distutils.core import setup setup(name="foo", author="bar", maintainer="baz") """ gives me """ Metadata-Version: 1.0 Name: foo Version: 0.0.0 Summary: UNKNOWN Home-page: UNKNOWN Author: baz Author-email: UNKNOWN License: UNKNOWN Description: UNKNOWN Platform: UNKNOWN """ ---------- nosy: +akitada, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 17:25:48 2009 From: report at bugs.python.org (pmoody) Date: Wed, 04 Feb 2009 16:25:48 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <498772F9.109@v.loewis.de> Message-ID: <8517e9350902040825p7688703ycb9430363a3f16aa@mail.gmail.com> pmoody added the comment: > I could live with such a choice if the netaddr authors agree that it > is the right choice (them being experts themselves in the domain). > I don't want to be accused of drkjam's accusation of fast-tracking > code just because it comes from Google (which would be a false > accusation regardless, but there is no reason to make some Python > users unhappy because they feel they are subject to political games). in light of david's email, would you agree that the bar for buy-in has been met or should I now start writing a PEP and preparing offerings for the BDFL? Cheers, /peter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 17:26:38 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Wed, 04 Feb 2009 16:26:38 +0000 Subject: [issue962772] when both maintainer and author provided, author discarded Message-ID: <1233764798.72.0.882325079473.issue962772@psf.upfronthosting.co.za> Tarek Ziad? added the comment: the Author metadata uses the maintainer field *or* the author field if the maintainer is not provided. What would be the rational to add a new maintainer field in the PKG-INFO ? In the first place, I am wondering what is the rational, today, to use the maintainer argument at all. John, can you detail this ? ---------- assignee: -> tarek type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 17:34:58 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Wed, 04 Feb 2009 16:34:58 +0000 Subject: [issue1019715] distutils ignores configure's --includedir Message-ID: <1233765298.77.0.44132013221.issue1019715@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 17:42:41 2009 From: report at bugs.python.org (Akira Kitada) Date: Wed, 04 Feb 2009 16:42:41 +0000 Subject: [issue1019715] distutils ignores configure's --includedir Message-ID: <1233765761.45.0.408486077211.issue1019715@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 17:43:56 2009 From: report at bugs.python.org (Nicholas Patterson) Date: Wed, 04 Feb 2009 16:43:56 +0000 Subject: [issue5151] extractall method for TarFile objects not setting owner:group on directories In-Reply-To: <1233765836.67.0.207576838338.issue5151@psf.upfronthosting.co.za> Message-ID: <1233765836.67.0.207576838338.issue5151@psf.upfronthosting.co.za> New submission from Nicholas Patterson : Used the TarFile object to create a bzip2 compressed tar file (seems to have worked fine). Then used the extractall method to restore the archive in a new location. All the files appear to have the same permissions and owner:group as before, but most of the directories ('state' is only exception) have different permissions and the owner:group are set to the UID that was running the script in this case root:root. Partial original location listing /opt/fallback> ls -l /opt/agilent/ipcore/02.01/config total 112 drwxrwxrwx 2 agilent agilent 4096 Feb 3 14:07 dist -rwxrwxrwx 1 agilent agilent 208 Feb 3 14:07 hostnameCache.xml -rwxrwxrwx 1 agilent agilent 1000 Feb 3 14:07 hostnamecache.xsd drwxr-xr-x 4 agilent agilent 4096 Feb 3 14:08 inuse -rwxrwxrwx 1 agilent agilent 4019 Feb 3 14:07 log4cxx.properties -rwxrwxrwx 1 agilent agilent 9437 Feb 3 14:07 log4cxx.xml_template drwxrwxrwx 3 agilent agilent 4096 Feb 3 14:07 mebs -rwxrwxrwx 1 agilent agilent 4283 Feb 3 14:07 protocol.xml -rwxrwxrwx 1 agilent agilent 8339 Feb 3 14:07 registry.ini drwxrwxrwx 2 agilent agilent 4096 Feb 3 14:07 state -rwxrwxrwx 1 agilent agilent 886 Feb 3 14:07 trunknamecache.xsd Partial new location listing /opt/fallback> ll config total 120 drwxr-xr-x 6 root root 4096 Feb 3 16:38 ./ drwxrwxr-x 8 agilent agilent 4096 Feb 3 16:38 ../ drwxr-xr-x 2 root root 4096 Feb 3 16:38 dist/ -rwxrwxrwx 1 agilent agilent 208 Feb 3 14:07 hostnameCache.xml* -rwxrwxrwx 1 agilent agilent 1000 Feb 3 14:07 hostnamecache.xsd* drwxr-xr-x 4 root root 4096 Feb 3 16:38 inuse/ -rwxrwxrwx 1 agilent agilent 4019 Feb 3 14:07 log4cxx.properties* -rwxrwxrwx 1 agilent agilent 9437 Feb 3 14:07 log4cxx.xml_template* drwxr-xr-x 3 root root 4096 Feb 3 16:38 mebs/ -rwxrwxrwx 1 agilent agilent 4283 Feb 3 14:07 protocol.xml* -rwxrwxrwx 1 agilent agilent 8339 Feb 3 14:07 registry.ini* drwxrwxrwx 2 agilent agilent 4096 Feb 3 14:07 state/ ---------- components: None messages: 81143 nosy: npatters severity: normal status: open title: extractall method for TarFile objects not setting owner:group on directories type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 17:44:34 2009 From: report at bugs.python.org (Akira Kitada) Date: Wed, 04 Feb 2009 16:44:34 +0000 Subject: [issue808129] Change --changelog to accept files Message-ID: <1233765874.28.0.424818241258.issue808129@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- type: -> feature request versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 17:45:40 2009 From: report at bugs.python.org (Akira Kitada) Date: Wed, 04 Feb 2009 16:45:40 +0000 Subject: [issue809163] Can't add files with spaces Message-ID: <1233765940.17.0.359585985994.issue809163@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 17:48:11 2009 From: report at bugs.python.org (Akira Kitada) Date: Wed, 04 Feb 2009 16:48:11 +0000 Subject: [issue828336] Allow set swig include dirs in setup.py Message-ID: <1233766091.6.0.867452999924.issue828336@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek type: -> feature request versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 17:50:18 2009 From: report at bugs.python.org (Akira Kitada) Date: Wed, 04 Feb 2009 16:50:18 +0000 Subject: [issue901727] extra_path kwarg to setup() undocumented Message-ID: <1233766218.52.0.673946498728.issue901727@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl, tarek versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 17:50:48 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Wed, 04 Feb 2009 16:50:48 +0000 Subject: [issue828336] Allow set swig include dirs in setup.py Message-ID: <1233766248.92.0.857326881743.issue828336@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 17:54:02 2009 From: report at bugs.python.org (Akira Kitada) Date: Wed, 04 Feb 2009 16:54:02 +0000 Subject: [issue4577] distutils: -3 warnings (apply) In-Reply-To: <1228670407.71.0.141400636121.issue4577@psf.upfronthosting.co.za> Message-ID: <1233766442.3.0.550390052799.issue4577@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 18:07:37 2009 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 04 Feb 2009 17:07:37 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <1222298050.73.0.172554962966.issue3959@psf.upfronthosting.co.za> Message-ID: <1233767257.97.0.779394684682.issue3959@psf.upfronthosting.co.za> Guido van Rossum added the comment: I don't think a PEP is needed, and I do think ipaddr.py is ready for inclusion. All that you really need is a core developer to champion the inclusion. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 18:15:18 2009 From: report at bugs.python.org (David Moss) Date: Wed, 04 Feb 2009 17:15:18 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <1222298050.73.0.172554962966.issue3959@psf.upfronthosting.co.za> Message-ID: <1233767718.64.0.762806407251.issue3959@psf.upfronthosting.co.za> Changes by David Moss : ---------- nosy: -drkjam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 18:19:22 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Wed, 04 Feb 2009 17:19:22 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <1222298050.73.0.172554962966.issue3959@psf.upfronthosting.co.za> Message-ID: <1233767962.43.0.454442309268.issue3959@psf.upfronthosting.co.za> Changes by Jean-Paul Calderone : ---------- nosy: -exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 18:43:57 2009 From: report at bugs.python.org (Yannick Gingras) Date: Wed, 04 Feb 2009 17:43:57 +0000 Subject: [issue2204] document ConfigParser behaviour when a file has same section multiple times In-Reply-To: <1204236720.35.0.634026900248.issue2204@psf.upfronthosting.co.za> Message-ID: <1233769437.94.0.760647332001.issue2204@psf.upfronthosting.co.za> Yannick Gingras added the comment: The attached patch is a proof of concept for throwing an exception. As discussed on the mailing list [1], it has some shortcomings that should be addressed before it is merged. [1]: http://mail.python.org/pipermail/python-dev/2009- ---------- keywords: +patch nosy: +ygingras Added file: http://bugs.python.org/file12938/no-dups-configparser.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 19:02:13 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 04 Feb 2009 18:02:13 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <1222298050.73.0.172554962966.issue3959@psf.upfronthosting.co.za> Message-ID: <1233770533.77.0.503229956109.issue3959@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Probably it has already been said, but for the record: is ipaddr's current API ok for other libraries (mainly: netaddr) to build upon it and provide compatible extensions or replacements, or would netaddr become an incompatible alternative to the stdlib-provided ipaddr? The latter would be a shame. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 19:22:21 2009 From: report at bugs.python.org (Duncan McGreggor) Date: Wed, 04 Feb 2009 18:22:21 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <1222298050.73.0.172554962966.issue3959@psf.upfronthosting.co.za> Message-ID: <1233771741.66.0.82320520385.issue3959@psf.upfronthosting.co.za> Duncan McGreggor added the comment: Antione, We're (netaddr) going to try to use ipaddr if possible, but there are operations which we are providing to API users that aren't directly supported by ipaddr. We haven't yet determined the level of effort involved in trying to work with ipaddr's base classes in supporting these, but it may be more effort (and code) than it's worth (the benefits of using ipaddr may be lost). In a sense, it would be a shame. But on the other hand, we have examples where 3-rd party web frameworks don't use the built-in HTTP server, and that hasn't been a problem. In many ways, netaddr is evolving into an IP manipulation framework. Those that need its features can use it; those that just need the basics will be able to get that in the stdlib. In any case, it will be in our best interest to provide some compatibility layer between the two :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 19:27:31 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 Feb 2009 18:27:31 +0000 Subject: [issue4285] Use a named tuple for sys.version_info In-Reply-To: <1233755793.57.0.687776200099.issue4285@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Wed, Feb 4, 2009 at 05:56, Eric Smith wrote: > > Eric Smith added the comment: > > The doc string for sys includes: > version_info -- version information as a tuple > > I'm not sure changing this to "... as a structseq" makes it any more > useful, but it's more correct. Does anyone have a preference? Does "... as a named tuple" make sense? -Brett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 19:30:22 2009 From: report at bugs.python.org (Eric Smith) Date: Wed, 04 Feb 2009 18:30:22 +0000 Subject: [issue4285] Use a named tuple for sys.version_info In-Reply-To: <1226189092.93.0.524804334834.issue4285@psf.upfronthosting.co.za> Message-ID: <1233772222.18.0.994924780881.issue4285@psf.upfronthosting.co.za> Eric Smith added the comment: "... as a named tuple" works for me. I'll go with that. Thanks! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 19:45:45 2009 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 04 Feb 2009 18:45:45 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <1222298050.73.0.172554962966.issue3959@psf.upfronthosting.co.za> Message-ID: <1233773145.69.0.349046392019.issue3959@psf.upfronthosting.co.za> Guido van Rossum added the comment: If changes to ipaddr could make things easier for netaddr's support of advanced features, please do propose those changes! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 20:27:35 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 04 Feb 2009 19:27:35 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <8517e9350902040825p7688703ycb9430363a3f16aa@mail.gmail.com> Message-ID: <4989EC23.1060201@v.loewis.de> Martin v. L?wis added the comment: > in light of david's email, would you agree that the bar for buy-in has > been met or should I now start writing a PEP and preparing offerings > for the BDFL? Yes, I think it can be integrated now. I'll look into it, unless somebody is faster (it could well take some weeks until I find some time) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 20:30:15 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 04 Feb 2009 19:30:15 +0000 Subject: [issue5151] extractall method for TarFile objects not setting owner:group on directories In-Reply-To: <1233765836.67.0.207576838338.issue5151@psf.upfronthosting.co.za> Message-ID: <1233775815.46.0.653195386918.issue5151@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Does the problem exist in 2.6 still? If you can't determine that easily, can you please provide a reproducible test case (e.g. some tar(1) created tar file plus a Python script) ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 21:11:30 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 04 Feb 2009 20:11:30 +0000 Subject: [issue5152] Add a JSON-RPC module In-Reply-To: <1233778290.63.0.330214687259.issue5152@psf.upfronthosting.co.za> Message-ID: <1233778290.63.0.330214687259.issue5152@psf.upfronthosting.co.za> New submission from Raymond Hettinger : Add a JSON analogue to xmlrpclib. See: http://en.wikipedia.org/wiki/JSON-RPC In some ways, it is much nicer than its XML cousin with bi-directional communication, faster/simpler parsing, and ability to use TCP/IP directly (not requiring HTTP transport). ---------- assignee: rhettinger messages: 81153 nosy: rhettinger priority: normal severity: normal status: open title: Add a JSON-RPC module type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 21:13:58 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 04 Feb 2009 20:13:58 +0000 Subject: [issue4124] Patch for adding "default" to itemgetter and attrgetter In-Reply-To: <1224022053.76.0.0750871741065.issue4124@psf.upfronthosting.co.za> Message-ID: <1233778438.58.0.308987024226.issue4124@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 21:17:56 2009 From: report at bugs.python.org (Adam Vandenberg) Date: Wed, 04 Feb 2009 20:17:56 +0000 Subject: [issue5153] Extra ) in optparse sample In-Reply-To: <1233778676.16.0.751248384993.issue5153@psf.upfronthosting.co.za> Message-ID: <1233778676.16.0.751248384993.issue5153@psf.upfronthosting.co.za> New submission from Adam Vandenberg : In the "Callback example 6: variable arguments" section of the optparse documentation, the example code has an extra ) at the end of the last line of the function: setattr(parser.values, option.dest, value)) ---------- assignee: georg.brandl components: Documentation messages: 81154 nosy: adamvan, georg.brandl severity: normal status: open title: Extra ) in optparse sample versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 21:18:57 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 04 Feb 2009 20:18:57 +0000 Subject: [issue3783] dbm.sqlite proof of concept In-Reply-To: <1220572652.24.0.256023256295.issue3783@psf.upfronthosting.co.za> Message-ID: <1233778737.02.0.756821171877.issue3783@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, I put an alternative in the sandbox /dbm_sqlite/alt/dbdict.py and am attaching a copy here. The idea is to emulate gdbm's fast mode and delay all writes until closing. That lets us subclass from dict and get high-speed lookups, sets, and deletions. Freeing ourselves from an DB also gets us a choice of ultra-portable file formats (json, csv, pickle, eval). ---------- priority: -> low Added file: http://bugs.python.org/file12939/dbdict.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 21:19:42 2009 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Wed, 04 Feb 2009 20:19:42 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1233778782.02.0.242593338615.issue5135@psf.upfronthosting.co.za> Walter D?rwald added the comment: The patch looks fine to me. Tests pass. I have no opinion about the name. Both "simplegeneric" and "generic" are OK to me. I wonder if being able to use register() directly instead of as a decorator should be dropped. Also IMHO the Python 2.3 backwards compatibility (__name__ isn't setable) can be dropped. ---------- nosy: +doerwalter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 21:21:38 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 04 Feb 2009 20:21:38 +0000 Subject: [issue5152] Add a JSON-RPC module In-Reply-To: <1233778290.63.0.330214687259.issue5152@psf.upfronthosting.co.za> Message-ID: <1233778898.99.0.0517405524897.issue5152@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think this feature request is out of scope for this bug tracker. To fulfill the request, one not only has to *add* the module, but to *implement* it first. Since there is no inherent need for such a module to be provided with the standard library, somebody implementing it should well first publish it on PyPI, build a community, have it used for some time, and then propose it for inclusion (e.g. through this bug tracker). That's the same route that the XML-RPC implementation took. If nobody volunteers to implement such a module, chances are high that it is because nobody actually needs a Python implementation of a JSON-RPC client module. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 21:21:47 2009 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 04 Feb 2009 20:21:47 +0000 Subject: [issue5148] gzip.open breaks with 'U' flag In-Reply-To: <1233709542.39.0.638969424034.issue5148@psf.upfronthosting.co.za> Message-ID: <1233778907.58.0.976798725537.issue5148@psf.upfronthosting.co.za> Skip Montanaro added the comment: Seems like this should be fairly easy to do right. 'U' needs to be removed from the flags but then applied to the lines read from the stream. ---------- keywords: +easy nosy: +skip.montanaro stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 21:23:13 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 04 Feb 2009 20:23:13 +0000 Subject: [issue2527] Pass a namespace to timeit In-Reply-To: <1207052027.28.0.27225375953.issue2527@psf.upfronthosting.co.za> Message-ID: <1233778993.22.0.40586641383.issue2527@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: -> normal versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 21:29:15 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Wed, 04 Feb 2009 20:29:15 +0000 Subject: [issue3783] dbm.sqlite proof of concept In-Reply-To: <1220572652.24.0.256023256295.issue3783@psf.upfronthosting.co.za> Message-ID: <1233779355.85.0.955697225886.issue3783@psf.upfronthosting.co.za> Changes by Jean-Paul Calderone : ---------- nosy: -exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 21:46:16 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 04 Feb 2009 20:46:16 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233780376.89.0.170940385812.issue4804@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Here is the patch implementing msg81093. (check_fd.patch) I tested this on VC6. (test_os passed) I hope this also works on VC9 as well. Added file: http://bugs.python.org/file12942/check_fd.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 21:51:56 2009 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Wed, 04 Feb 2009 20:51:56 +0000 Subject: [issue5151] extractall method for TarFile objects not setting owner:group on directories In-Reply-To: <1233765836.67.0.207576838338.issue5151@psf.upfronthosting.co.za> Message-ID: <1233780716.54.0.0154434804781.issue5151@psf.upfronthosting.co.za> Lars Gust?bel added the comment: This is probably a duplicate of issue1735, which was fixed in r59713, i.e. between 2.5.1 and 2.5.2. Are you by any chance using Python 2.5.1? ---------- assignee: -> lars.gustaebel nosy: +lars.gustaebel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 21:54:05 2009 From: report at bugs.python.org (Nicholas Patterson) Date: Wed, 04 Feb 2009 20:54:05 +0000 Subject: [issue5151] extractall method for TarFile objects not setting owner:group on directories In-Reply-To: <1233780716.54.0.0154434804781.issue5151@psf.upfronthosting.co.za> Message-ID: <0063677D5AB35E409C1EB1C886D24F1002CA951B@cos-us-mb01.cos.agilent.com> Nicholas Patterson added the comment: Using 2.5.0 on SLES 10 servers and 2.5.1 on Solaris 10 servers. Have only tested SLES so far since that's our main platform. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 22:02:21 2009 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Wed, 04 Feb 2009 21:02:21 +0000 Subject: [issue5151] extractall method for TarFile objects not setting owner:group on directories In-Reply-To: <1233765836.67.0.207576838338.issue5151@psf.upfronthosting.co.za> Message-ID: <1233781341.69.0.705213501498.issue5151@psf.upfronthosting.co.za> Lars Gust?bel added the comment: Could you try to do a test with the patch from issue1735? It is rather trivial to apply. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 22:11:08 2009 From: report at bugs.python.org (Nicholas Patterson) Date: Wed, 04 Feb 2009 21:11:08 +0000 Subject: [issue5151] extractall method for TarFile objects not setting owner:group on directories In-Reply-To: <1233781341.69.0.705213501498.issue5151@psf.upfronthosting.co.za> Message-ID: <0063677D5AB35E409C1EB1C886D24F1002CA954B@cos-us-mb01.cos.agilent.com> Nicholas Patterson added the comment: Yep that fixed it, sorry to have used up your time. Still a bit new to the search feature on the site, didn't notice the form defaulted to only searching on open bugs/issues. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 22:35:32 2009 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Wed, 04 Feb 2009 21:35:32 +0000 Subject: [issue5151] extractall method for TarFile objects not setting owner:group on directories In-Reply-To: <1233765836.67.0.207576838338.issue5151@psf.upfronthosting.co.za> Message-ID: <1233783332.0.0.731695002048.issue5151@psf.upfronthosting.co.za> Lars Gust?bel added the comment: Never mind! Thank you anyway for your report. ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 22:42:11 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Wed, 04 Feb 2009 21:42:11 +0000 Subject: [issue4753] Faster opcode dispatch on gcc In-Reply-To: <1230325778.98.0.752974375077.issue4753@psf.upfronthosting.co.za> Message-ID: <1233783731.71.0.437875202977.issue4753@psf.upfronthosting.co.za> Gabriel Genellina added the comment: > Might I suggest that the TARGET and TARGET_WITH_IMPL macros not > include the trailing colon? Yes, please! ---------- nosy: +gagenellina _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 22:49:57 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Wed, 04 Feb 2009 21:49:57 +0000 Subject: [issue5015] The Py_SetPythonHome C API function is undocumented In-Reply-To: <1232493833.95.0.946934351035.issue5015@psf.upfronthosting.co.za> Message-ID: <1233784197.57.0.789587746796.issue5015@psf.upfronthosting.co.za> Changes by Gabriel Genellina : ---------- nosy: +gagenellina _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 22:53:10 2009 From: report at bugs.python.org (Duncan McGreggor) Date: Wed, 04 Feb 2009 21:53:10 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <1222298050.73.0.172554962966.issue3959@psf.upfronthosting.co.za> Message-ID: <1233784390.79.0.375667727936.issue3959@psf.upfronthosting.co.za> Duncan McGreggor added the comment: > If changes to ipaddr could make things easier for netaddr's support > of advanced features, please do propose those changes! Thanks, Guido -- we will :-) We'll be watching closely for that and participating as much as possible. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 23:02:59 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Wed, 04 Feb 2009 22:02:59 +0000 Subject: [issue1079] decode_header does not follow RFC 2047 In-Reply-To: <1188637019.25.0.0476259625696.issue1079@psf.upfronthosting.co.za> Message-ID: <1233784979.22.0.946132991365.issue1079@psf.upfronthosting.co.za> Changes by Gabriel Genellina : ---------- nosy: +gagenellina _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 23:13:23 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Wed, 04 Feb 2009 22:13:23 +0000 Subject: [issue5141] C API for appending to arrays In-Reply-To: <1233654934.43.0.515749486926.issue5141@psf.upfronthosting.co.za> Message-ID: <1233785603.73.0.952674913718.issue5141@psf.upfronthosting.co.za> Gabriel Genellina added the comment: Arrays already support the buffer interface ---------- nosy: +gagenellina _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 23:16:55 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Wed, 04 Feb 2009 22:16:55 +0000 Subject: [issue5125] Strange locale problem with Python 3 In-Reply-To: <1233517710.32.0.869509955584.issue5125@psf.upfronthosting.co.za> Message-ID: <1233785815.75.0.735510675214.issue5125@psf.upfronthosting.co.za> Changes by Gabriel Genellina : ---------- nosy: +gagenellina _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 23:31:12 2009 From: report at bugs.python.org (Christian Heimes) Date: Wed, 04 Feb 2009 22:31:12 +0000 Subject: [issue4285] Use a named tuple for sys.version_info In-Reply-To: <1226189092.93.0.524804334834.issue4285@psf.upfronthosting.co.za> Message-ID: <1233786672.44.0.776700478344.issue4285@psf.upfronthosting.co.za> Christian Heimes added the comment: Technically it's not a named tuple. Calling it named tuple may cause confusing. http://docs.python.org/library/os.html#os.stat calls it a structure. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 23:31:23 2009 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 04 Feb 2009 22:31:23 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1233786683.23.0.478668475463.issue3871@psf.upfronthosting.co.za> Roumen Petrov added the comment: attached patch for trunk-20090204: - removed patch from issue4587 (not relevant for mingw) ; - improved static build now succeed (use --disable-shared). this is follow-up of issue4494 + ... (don't expect loadable modules to work on windows) ; - restore win32.S removed in r69260. thanks thomas. Added file: http://bugs.python.org/file12943/python-trunk-20090204-MINGW.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 23:31:53 2009 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 04 Feb 2009 22:31:53 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1233786713.3.0.959716038638.issue3871@psf.upfronthosting.co.za> Changes by Roumen Petrov : Removed file: http://bugs.python.org/file11665/python-trunk-MINGW.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 23:31:59 2009 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 04 Feb 2009 22:31:59 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1233786719.08.0.696623833169.issue3871@psf.upfronthosting.co.za> Changes by Roumen Petrov : Removed file: http://bugs.python.org/file12272/python-trunk-MINGW.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 23:32:22 2009 From: report at bugs.python.org (Ben Bangert) Date: Wed, 04 Feb 2009 22:32:22 +0000 Subject: [issue5154] OSX broken poll testing doesn't work In-Reply-To: <1233786742.9.0.12404457396.issue5154@psf.upfronthosting.co.za> Message-ID: <1233786742.9.0.12404457396.issue5154@psf.upfronthosting.co.za> New submission from Ben Bangert : OSX 10.5 has a broken poll, this is an already known issue as I noticed there's even a HAVE_BROKEN_POLL option that is in the source: http://mail.python.org/pipermail/python-checkins/2006-April/051710.html However, this run-time check apparently does not work, as I continue to get socket errors related to the broken poll (On *any* version of Python I compile from 2.4 through 2.6) unless I recompile Python and manually comment out HAVE_POLL like the first line of Apple's Python patch here: http://www.opensource.apple.com/darwinsource/10.5.6/python-30.1.2/fix/pyconfig.ed Further, I think its quite likely that other bugs being submitted all over the place from users running MacPorts on OSX are misdiagnosing this bug as they believe its related to other software, when it is in fact specific to custom compiles (MacPorts included) of Python. This bug usually manifests itself as a Socket 35 error like so: http://bugs.python.org/issue1085 http://www.cherrypy.org/ticket/598 This issue was diagnosed for me by Phil Jenvey, who believes that all versions of OSX to date have had a broken poll (which reflects my paste experience with this socket 35 bug as well). I'm not sure of the most appropriate fix, I've submitted a bug to MacPorts as well with the recommendation that for now they apply a patch to undef HAVE_POLL, as Apple does. ---------- components: Library (Lib) messages: 81171 nosy: bbangert severity: normal status: open title: OSX broken poll testing doesn't work type: behavior versions: Python 2.4, Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 23:33:51 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 04 Feb 2009 22:33:51 +0000 Subject: [issue4285] Use a named tuple for sys.version_info In-Reply-To: <1226189092.93.0.524804334834.issue4285@psf.upfronthosting.co.za> Message-ID: <1233786831.81.0.770356348674.issue4285@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Eric Smith added the comment: > "... as a named tuple" works for me. I'll go with that. Thanks! +1 Remember, "named tuple" is a concept, not a class. It is anything that provides attribute access as an alternative to indexed access (see the definition in the glossary where time.struct_time is given as an example). Running the collections.named_tuple() factory function creates a new class with named tuple features, but it is just one of several ways of creating named tuples. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 23:36:53 2009 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 04 Feb 2009 22:36:53 +0000 Subject: [issue2942] mingw/cygwin do not accept asm file as extension source In-Reply-To: <1211451880.92.0.894703588073.issue2942@psf.upfronthosting.co.za> Message-ID: <1233787013.82.0.904076427773.issue2942@psf.upfronthosting.co.za> Roumen Petrov added the comment: Hi shura_zam, I test this patch in issue3871 but without success - setup.py don't try to build ctypes module. May I ask you to post a sample. ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 23:39:59 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 04 Feb 2009 22:39:59 +0000 Subject: [issue5154] OSX broken poll testing doesn't work In-Reply-To: <1233786742.9.0.12404457396.issue5154@psf.upfronthosting.co.za> Message-ID: <1233787199.07.0.00535441874591.issue5154@psf.upfronthosting.co.za> Martin v. L?wis added the comment: In what specific way is poll() broken? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 23:41:58 2009 From: report at bugs.python.org (Ben Bangert) Date: Wed, 04 Feb 2009 22:41:58 +0000 Subject: [issue5154] OSX broken poll testing doesn't work In-Reply-To: <1233786742.9.0.12404457396.issue5154@psf.upfronthosting.co.za> Message-ID: <1233787318.68.0.635446322956.issue5154@psf.upfronthosting.co.za> Ben Bangert added the comment: I don't know specifically, Phil Jenvey probably would as he's the one that told me it is. Apple apparently knows this an turns it off in their version of Python that is supplied. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 23:48:17 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 04 Feb 2009 22:48:17 +0000 Subject: [issue5154] OSX broken poll testing doesn't work In-Reply-To: <1233787318.68.0.635446322956.issue5154@psf.upfronthosting.co.za> Message-ID: <498A1B2E.7070508@v.loewis.de> Martin v. L?wis added the comment: > I don't know specifically, Phil Jenvey probably would as he's the one > that told me it is. Apple apparently knows this an turns it off in their > version of Python that is supplied. That's not a sufficient reason to copy their work-around. A problem must be understood fully before any solution is attempted. I'm -1 on work-arounds. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 23:52:49 2009 From: report at bugs.python.org (Paul Moore) Date: Wed, 04 Feb 2009 22:52:49 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1233787969.4.0.642255862126.issue5135@psf.upfronthosting.co.za> Paul Moore added the comment: Agreed about the compatibility. It's there from pkgutil, where to be honest, it's even less necessary, as simplegeneric was for internal use only, there. I'm certainly not aware of any backward compatibility requirements for functools. Assuming nobody speaks up to the contrary, I'll rip out the compatibility bits in the next version of the patch. I'm unsure about the non-decorator version of register. I can imagine use cases for it - consider pprint, for example, where you might want to register str as the overload for your particular type. But it's not a big deal either way. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 4 23:58:51 2009 From: report at bugs.python.org (Ben Bangert) Date: Wed, 04 Feb 2009 22:58:51 +0000 Subject: [issue5154] OSX broken poll testing doesn't work In-Reply-To: <1233786742.9.0.12404457396.issue5154@psf.upfronthosting.co.za> Message-ID: <1233788331.98.0.521533989898.issue5154@psf.upfronthosting.co.za> Ben Bangert added the comment: Ah, sorry, misunderstanding. I'm not recommending that Python copy Apple's patch. I was pointing out that the HAVE_BROKEN_POLL test apparently doesn't work, and that *all* manually compiled copies of Python done on OSX will suffer this socket 35 error without having HAVE_POLL commented out. As I mention in the original message, I'm not sure of the most appropriate fix. :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 00:37:55 2009 From: report at bugs.python.org (Akira Kitada) Date: Wed, 04 Feb 2009 23:37:55 +0000 Subject: [issue1520877] Distutils bugfix: Read $AR from the environment/Makefile. Message-ID: <1233790675.33.0.721971528611.issue1520877@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 00:42:39 2009 From: report at bugs.python.org (Akira Kitada) Date: Wed, 04 Feb 2009 23:42:39 +0000 Subject: [issue1276768] dirutils.mkpath (verbose option does not work) Message-ID: <1233790959.07.0.470263374255.issue1276768@psf.upfronthosting.co.za> Akira Kitada added the comment: Still present in 2.6/3.0 ---------- nosy: +akitada, tarek type: feature request -> behavior versions: +Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 00:45:08 2009 From: report at bugs.python.org (Akira Kitada) Date: Wed, 04 Feb 2009 23:45:08 +0000 Subject: [issue2236] Distutils' mkpath implementation ignoring the "mode" parameter In-Reply-To: <1204664208.81.0.312695054648.issue2236@psf.upfronthosting.co.za> Message-ID: <1233791108.59.0.152694061781.issue2236@psf.upfronthosting.co.za> Akira Kitada added the comment: Still present in 2.6/3.0 ---------- nosy: +akitada, tarek type: resource usage -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 02:39:07 2009 From: report at bugs.python.org (Sam) Date: Thu, 05 Feb 2009 01:39:07 +0000 Subject: [issue3766] socket.socket.recv broken (unbearably slow) In-Reply-To: <1220479128.18.0.248146469424.issue3766@psf.upfronthosting.co.za> Message-ID: <1233797947.38.0.50011285301.issue3766@psf.upfronthosting.co.za> Sam added the comment: I know this bug is closed, but I too am experiencing it under Linux 2.6.24-22 and Python 2.5.2. I'm using urllib2, and it's just spending an obscene amount of cpu time in {method 'recv' of '_socket.socket' objects}.... Anyone have any ideas? Would switching to httplib2 help? ---------- nosy: +samslists _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 02:42:22 2009 From: report at bugs.python.org (And Clover) Date: Thu, 05 Feb 2009 01:42:22 +0000 Subject: [issue691291] codecs.open(filename, 'U', 'UTF-16') corrupts text Message-ID: <1233798142.36.0.399908566423.issue691291@psf.upfronthosting.co.za> And Clover added the comment: > The problem is that codecs.open() forces binary mode on the underlying file object, and this defeats the U mode. Actually the problem is it doesn't defeat it! The function is documented to force binary, but it actually only does "mode = mode + 'b'", which can leave you with a mode of 'rUb'. This mode should be invalid but in practice the 'U' wins out, and causes the expected problems for UTF-16 and some East Asian codecs. Until such time as text/universal mode is supported at the overlying decoded stream level, I suggest that 'U' should be .replace()d out of the mode as well as 'b' being added, as the documentation would imply. ---------- nosy: +aclover _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 02:52:53 2009 From: report at bugs.python.org (Beau Butler) Date: Thu, 05 Feb 2009 01:52:53 +0000 Subject: [issue5155] Multiprocessing.Queue created by subprocess fails when used in sub-sub-process In-Reply-To: <1233798773.64.0.357189782395.issue5155@psf.upfronthosting.co.za> Message-ID: <1233798773.64.0.357189782395.issue5155@psf.upfronthosting.co.za> New submission from Beau Butler : (Note: This issue only happens on linux - on Windows things work fine.) Please see the attached script. The script creates a process (TestProcess()). That process runs and creates a sub-process (TestSubProcess()). When TestSubProcess tries to access a Queue created by TestProcess, the .get() call fails with the following stack trace: Process Process-1:1: Traceback (most recent call last): File "/opt/python2.6/lib/python2.6/multiprocessing/process.py", line 231, in _bootstrap self.run() File "/opt/python2.6/lib/python2.6/multiprocessing/process.py", line 88, in run self._target(*self._args, **self._kwargs) File "queue_test.py", line 7, in TestSubProcess item = q.get() # Fails with IOError if queue created in TestProcess File "/opt/python2.6/lib/python2.6/multiprocessing/queues.py", line 91, in get res = self._recv() IOError: [Errno 9] Bad file descriptor If the same queue is created by main (top level), TestSubProcess accesses it with no errors. This behavior can be stimulated by uncommenting the q = multiprocessing.Queue() line in TestProcess. Tested using: Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on win32 (Installed using binary installer, windows XPSP2) *No problems* Python 2.6.1 (r261:67515, Jan 6 2009, 15:23:19) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2 (Compiled from source due to ubuntu 8.04 (Hardy) not having python2.6 yet) *Fails on q.get() in TestSubProcess* ---------- components: Library (Lib) files: queue_test.py messages: 81183 nosy: bbutler severity: normal status: open title: Multiprocessing.Queue created by subprocess fails when used in sub-sub-process type: crash versions: Python 2.6 Added file: http://bugs.python.org/file12944/queue_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 02:54:51 2009 From: report at bugs.python.org (Beau Butler) Date: Thu, 05 Feb 2009 01:54:51 +0000 Subject: [issue5155] Multiprocessing.Queue created by sub-process fails when used in sub-sub-process In-Reply-To: <1233798773.64.0.357189782395.issue5155@psf.upfronthosting.co.za> Message-ID: <1233798891.07.0.0358294697591.issue5155@psf.upfronthosting.co.za> Changes by Beau Butler : ---------- title: Multiprocessing.Queue created by subprocess fails when used in sub-sub-process -> Multiprocessing.Queue created by sub-process fails when used in sub-sub-process _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 02:56:40 2009 From: report at bugs.python.org (Beau Butler) Date: Thu, 05 Feb 2009 01:56:40 +0000 Subject: [issue5155] Multiprocessing.Queue created by sub-process fails when used in sub-sub-process ("bad file descriptor" in q.get()) In-Reply-To: <1233798773.64.0.357189782395.issue5155@psf.upfronthosting.co.za> Message-ID: <1233799000.47.0.911054975733.issue5155@psf.upfronthosting.co.za> Changes by Beau Butler : ---------- title: Multiprocessing.Queue created by sub-process fails when used in sub-sub-process -> Multiprocessing.Queue created by sub-process fails when used in sub-sub-process ("bad file descriptor" in q.get()) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 03:30:44 2009 From: report at bugs.python.org (Beau Butler) Date: Thu, 05 Feb 2009 02:30:44 +0000 Subject: [issue5155] Multiprocessing.Queue created by sub-process fails when used in sub-sub-process ("bad file descriptor" in q.get()) In-Reply-To: <1233798773.64.0.357189782395.issue5155@psf.upfronthosting.co.za> Message-ID: <1233801044.55.0.712890967452.issue5155@psf.upfronthosting.co.za> Beau Butler added the comment: Also reproduced in Python3.0 on OSX 10.5 ---------- versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 03:36:18 2009 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 05 Feb 2009 02:36:18 +0000 Subject: [issue5148] gzip.open breaks with 'U' flag In-Reply-To: <1233709542.39.0.638969424034.issue5148@psf.upfronthosting.co.za> Message-ID: <1233801378.88.0.799972134366.issue5148@psf.upfronthosting.co.za> Skip Montanaro added the comment: Here's a patch against trunk. Extra test case and minor doc tweak included. ---------- keywords: +patch Added file: http://bugs.python.org/file12945/gzipU.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 04:30:03 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 05 Feb 2009 03:30:03 +0000 Subject: [issue5155] Multiprocessing.Queue created by sub-process fails when used in sub-sub-process ("bad file descriptor" in q.get()) In-Reply-To: <1233798773.64.0.357189782395.issue5155@psf.upfronthosting.co.za> Message-ID: <1233804603.78.0.00145430145056.issue5155@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> jnoller nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 04:30:17 2009 From: report at bugs.python.org (Ryan Freckleton) Date: Thu, 05 Feb 2009 03:30:17 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1233804617.11.0.115711783268.issue5135@psf.upfronthosting.co.za> Ryan Freckleton added the comment: I think that registering existing functions is an important use case, so I vote for keeping the non-decorator version of register. Another thing that we may want to document is that [simple]generic doesn't dispatch based on registered abstract base classes. >>> class A: ... pass ... >>> class C: ... __metaclass__ = abc.ABCMeta ... >>> C.register(A) >>> @generic ... def pprint(obj): ... print str(obj) ... >>> @pprint.register(C) ... def pprint_C(obj): ... print "Charlie", obj ... >>> pprint(C()) Charlie <__main__.C object at 0xb7c5336c> >>> pprint(A()) <__main__.A instance at 0xb7c5336c> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 04:36:15 2009 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 05 Feb 2009 03:36:15 +0000 Subject: [issue5148] gzip.open breaks with 'U' flag In-Reply-To: <1233709542.39.0.638969424034.issue5148@psf.upfronthosting.co.za> Message-ID: <1233804975.76.0.496253366435.issue5148@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- keywords: +needs review stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 05:38:10 2009 From: report at bugs.python.org (Philip Jenvey) Date: Thu, 05 Feb 2009 04:38:10 +0000 Subject: [issue1757126] [PATCH] Fix ptcp154 encoding cyrillic_asian alias Message-ID: <1233808690.2.0.415869281118.issue1757126@psf.upfronthosting.co.za> Changes by Philip Jenvey : ---------- title: Fix ptcp154 encoding cyrillic_asian alias -> [PATCH] Fix ptcp154 encoding cyrillic_asian alias _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 09:54:43 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Thu, 05 Feb 2009 08:54:43 +0000 Subject: [issue1520877] Distutils bugfix: Read $AR from the environment/Makefile. Message-ID: <1233824083.95.0.911404599862.issue1520877@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 09:56:14 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Thu, 05 Feb 2009 08:56:14 +0000 Subject: [issue1276768] dirutils.mkpath (verbose option does not work) Message-ID: <1233824174.94.0.566303994912.issue1276768@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 10:11:29 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Thu, 05 Feb 2009 09:11:29 +0000 Subject: [issue1835] Update version number in __init__.py In-Reply-To: <1200417671.24.0.488273286588.issue1835@psf.upfronthosting.co.za> Message-ID: <1233825089.33.0.330362818416.issue1835@psf.upfronthosting.co.za> Tarek Ziad? added the comment: fixed on r69285 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 10:12:11 2009 From: report at bugs.python.org (Paul Melis) Date: Thu, 05 Feb 2009 09:12:11 +0000 Subject: [issue4137] update SIG web pages In-Reply-To: <1224230964.55.0.983457546691.issue4137@psf.upfronthosting.co.za> Message-ID: <1233825131.14.0.63722623536.issue4137@psf.upfronthosting.co.za> Paul Melis added the comment: The "archive" and "subscribe" links for the C++ SIG is incorrect, as the URL seems to have changed from http://mail.python.org/pipermail/c++-sig to http://mail.python.org/pipermail/cplusplus-sig ---------- nosy: +paulmelis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 10:20:37 2009 From: report at bugs.python.org (=?utf-8?q?Hrvoje_Nik=C5=A1i=C4=87?=) Date: Thu, 05 Feb 2009 09:20:37 +0000 Subject: [issue5141] C API for appending to arrays In-Reply-To: <1233654934.43.0.515749486926.issue5141@psf.upfronthosting.co.za> Message-ID: <1233825637.2.0.915099840477.issue5141@psf.upfronthosting.co.za> Hrvoje Nik?i? added the comment: Yes, and I use it in the second example, but the buffer interface doesn't really help with adding new elements into the array. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 11:02:44 2009 From: report at bugs.python.org (Peter Harris) Date: Thu, 05 Feb 2009 10:02:44 +0000 Subject: [issue5156] IDLE exits with UnicodeDecodeError on Ctrl+Space In-Reply-To: <1233828164.4.0.121104337122.issue5156@psf.upfronthosting.co.za> Message-ID: <1233828164.4.0.121104337122.issue5156@psf.upfronthosting.co.za> New submission from Peter Harris : Using Python3.1 built from svn, on RedHat EL4, with Tcl/Tk 8.5 built from source. Traceback: ------------------ File "/usr/mlocal/lib/python3.1/runpy.py", line 122, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/mlocal/lib/python3.1/runpy.py", line 34, in _run_code exec(code, run_globals) File "/usr/mlocal/lib/python3.1/idlelib/idle.py", line 22, in idlelib.PyShell.main() File "/usr/mlocal/lib/python3.1/idlelib/PyShell.py", line 1407, in main root.mainloop() File "/usr/mlocal/lib/python3.1/tkinter/__init__.py", line 1009, in mainloop self.tk.mainloop(n) UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: illegal encoding ---------------- The list of completions appears just before the crash. I can't tell whether the error occurs within tkinter or IDLE. If I find out where to put the try/except I'll submit a patch. ---------- components: IDLE messages: 81190 nosy: scav severity: normal status: open title: IDLE exits with UnicodeDecodeError on Ctrl+Space versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 11:27:28 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 10:27:28 +0000 Subject: [issue4137] update SIG web pages In-Reply-To: <1224230964.55.0.983457546691.issue4137@psf.upfronthosting.co.za> Message-ID: <1233829649.0.0.251087099483.issue4137@psf.upfronthosting.co.za> Georg Brandl added the comment: As this is not a tracker for the website, closing is good, especially when we know it's being worked on. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 11:31:09 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 10:31:09 +0000 Subject: [issue5153] Extra ) in optparse sample In-Reply-To: <1233778676.16.0.751248384993.issue5153@psf.upfronthosting.co.za> Message-ID: <1233829869.4.0.750141054823.issue5153@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r69288. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 11:31:56 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 10:31:56 +0000 Subject: [issue901727] extra_path kwarg to setup() undocumented Message-ID: <1233829916.17.0.734260157582.issue901727@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: georg.brandl -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 11:33:26 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 10:33:26 +0000 Subject: [issue5145] struct.calcsize('cd') returns 16 instead of 9 In-Reply-To: <1233687223.75.0.372489916628.issue5145@psf.upfronthosting.co.za> Message-ID: <1233830006.05.0.481807115944.issue5145@psf.upfronthosting.co.za> Georg Brandl added the comment: The docs have this sentence: """ By default, C numbers are represented in the machine's native format and byte order, and properly aligned by skipping pad bytes if necessary (according to the rules used by the C compiler). """ What would you suggest be added? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 11:37:21 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 10:37:21 +0000 Subject: [issue5144] PySys_SetArgv has wrong documentation In-Reply-To: <1233680218.31.0.635713677458.issue5144@psf.upfronthosting.co.za> Message-ID: <1233830241.13.0.499261652773.issue5144@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, added docs in r69289. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 11:39:02 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 10:39:02 +0000 Subject: [issue5140] Some Built-in Functions entries in Library Manual are missing Permalinks In-Reply-To: <1233640123.76.0.469214114608.issue5140@psf.upfronthosting.co.za> Message-ID: <1233830342.38.0.724690996865.issue5140@psf.upfronthosting.co.za> Georg Brandl added the comment: This is because these types are fully documented in the "standard types" section, and the entry in "functions" just serves a pointer. (And yes, this will happen to the remaining types too, at some point.) ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 11:40:56 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 10:40:56 +0000 Subject: [issue5130] Obsolete reference to "unicode" in glossary In-Reply-To: <1233589391.96.0.438188518405.issue5130@psf.upfronthosting.co.za> Message-ID: <1233830456.59.0.222359440128.issue5130@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r69290. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 11:46:53 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Feb 2009 10:46:53 +0000 Subject: [issue5145] struct.calcsize('cd') returns 16 instead of 9 In-Reply-To: <1233687223.75.0.372489916628.issue5145@psf.upfronthosting.co.za> Message-ID: <1233830813.42.0.156777317454.issue5145@psf.upfronthosting.co.za> STINNER Victor added the comment: The default endiand and alignment is "native". Using <, >, = or ! endian, the alignement is standard. Python 3.1a0 (py3k:69105M, Feb 3 2009, 15:04:35) >>> struct.calcsize('cd') 12 >>> struct.calcsize('=cd') 9 >>> struct.calcsize(' _______________________________________ From report at bugs.python.org Thu Feb 5 11:47:57 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 10:47:57 +0000 Subject: [issue5107] built-in open(..., encoding=vague_default) In-Reply-To: <1233291628.48.0.339738109946.issue5107@psf.upfronthosting.co.za> Message-ID: <1233830877.43.0.232229634686.issue5107@psf.upfronthosting.co.za> Georg Brandl added the comment: The device_encoding(buffer.fileno()) doesn't matter for open(), so I've documented that getpreferredencoding() is used in r69291. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 11:56:53 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 10:56:53 +0000 Subject: [issue5096] strange thing after call PyObject_CallMethod In-Reply-To: <1233229375.88.0.463699429869.issue5096@psf.upfronthosting.co.za> Message-ID: <1233831413.41.0.403606587245.issue5096@psf.upfronthosting.co.za> Georg Brandl added the comment: Documented PyErr_PrintEx() in r69292. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 11:57:57 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 10:57:57 +0000 Subject: [issue5066] IDLE documentation for Unix obsolete/incorrect In-Reply-To: <1232942217.99.0.191249551049.issue5066@psf.upfronthosting.co.za> Message-ID: <1233831477.28.0.333879953096.issue5066@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, having nice full docs for IDLE would be nice, but I won't do anything on this matter except committing a full patch :) ---------- assignee: georg.brandl -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 11:58:20 2009 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 05 Feb 2009 10:58:20 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1233831500.79.0.653322774387.issue5135@psf.upfronthosting.co.za> Nick Coghlan added the comment: Failure to respect isinstance() should be fixed, not documented :) As far as registering existing functions goes, I also expect registering lambdas and functools.partial will be popular approaches, so keeping direct registration is a good idea. There isn't any ambiguity between the one-argument and two-argument forms. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 11:59:39 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 10:59:39 +0000 Subject: [issue5059] Policy.DomainStrict in cookielib example code In-Reply-To: <1232912756.19.0.0105064644084.issue5059@psf.upfronthosting.co.za> Message-ID: <1233831579.59.0.598761930361.issue5059@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r69293. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 12:02:23 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 11:02:23 +0000 Subject: [issue4992] yield's documentation not updated In-Reply-To: <1232319312.46.0.667626052793.issue4992@psf.upfronthosting.co.za> Message-ID: <1233831743.39.0.148808689123.issue4992@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r69294. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 12:03:16 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 11:03:16 +0000 Subject: [issue4760] cmp gone documentations In-Reply-To: <1230436607.02.0.835606741355.issue4760@psf.upfronthosting.co.za> Message-ID: <1233831796.76.0.84911313242.issue4760@psf.upfronthosting.co.za> Georg Brandl added the comment: Seems to be gone now. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 12:06:28 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 11:06:28 +0000 Subject: [issue2527] Pass a namespace to timeit In-Reply-To: <1207052027.28.0.27225375953.issue2527@psf.upfronthosting.co.za> Message-ID: <1233831988.7.0.833833187105.issue2527@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: rhettinger -> pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 12:32:31 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 11:32:31 +0000 Subject: [issue5015] The Py_SetPythonHome C API function is undocumented In-Reply-To: <1232493833.95.0.946934351035.issue5015@psf.upfronthosting.co.za> Message-ID: <1233833551.75.0.0599121875342.issue5015@psf.upfronthosting.co.za> Georg Brandl added the comment: Documented in r69297. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 12:33:42 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 11:33:42 +0000 Subject: [issue4827] optparse: Callback example 1 is confusing In-Reply-To: <1231051843.8.0.720726802561.issue4827@psf.upfronthosting.co.za> Message-ID: <1233833622.18.0.34655926254.issue4827@psf.upfronthosting.co.za> Georg Brandl added the comment: You're right, I've fixed that in r69298. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 12:35:39 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 11:35:39 +0000 Subject: [issue4820] ctypes.util.find_library incorrectly documented In-Reply-To: <1230994100.6.0.728617029399.issue4820@psf.upfronthosting.co.za> Message-ID: <1233833739.54.0.130584326825.issue4820@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r69299. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 12:38:36 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 11:38:36 +0000 Subject: [issue4563] Wrong formatting of contributor list in About page In-Reply-To: <1228573767.66.0.95540674758.issue4563@psf.upfronthosting.co.za> Message-ID: <1233833916.85.0.538154121434.issue4563@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r69300. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 12:40:49 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 11:40:49 +0000 Subject: [issue5031] Thread.daemon docs In-Reply-To: <1232616390.21.0.0351753883552.issue5031@psf.upfronthosting.co.za> Message-ID: <1233834049.26.0.628843264895.issue5031@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r69301. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 12:59:37 2009 From: report at bugs.python.org (Paul Moore) Date: Thu, 05 Feb 2009 11:59:37 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1233835177.48.0.886593944329.issue5135@psf.upfronthosting.co.za> Paul Moore added the comment: Agreed (in principle). However, in practice the subtleties of override order must be documented (and a method of implementation must be established!!!) Consider: >>> class A: ... pass ... >>> class C: ... __metaclass__ = abc.ABCMeta ... >>> class D: ... __metaclass__ = abc.ABCMeta ... >>> C.register(A) >>> D.register(A) >>> @generic ... def pprint(obj): ... print "Base", str(obj) ... >>> @pprint.register(C) ... def pprint_C(obj): ... print "Charlie", obj ... >>> @pprint.register(D) ... def pprint_D(obj): ... print "Delta", obj ... >>> pprint(A()) What should be printed? A() is a C and a D, but which takes precedence? There is no concept of a MRO for ABCs, so how would the "correct" answer be defined? "Neither" may not be perfect, but at least it's clearly defined. Relying on order of registration for overloads of the generic function seems to me to be unacceptable, before anyone suggests it, as it introduces a dependency on what order code is imported. So while the theory makes sense, the practice is not so clear. Respecting ABCs seems to me to contradict the "simple" aspect of simplegeneric, so a documented limitation is appropriate. (But given the above, I'm more inclined now to leave the name as "simplegeneric", precisely to make this point :-)) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 13:16:26 2009 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 05 Feb 2009 12:16:26 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1233836186.01.0.648190837659.issue5135@psf.upfronthosting.co.za> Nick Coghlan added the comment: Hmm, there is such a thing as being *too* simple... a generic function implementation that doesn't even respect ABCs seems pretty pointless to me (e.g. I'd like to be able to register a default Sequence implementation for pprint and have all declared Sequences use it automatically if there isn't a more specific override). I'll wait until I have a chance to actually play with the code a bit before I comment further though. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 14:20:04 2009 From: report at bugs.python.org (Paul Moore) Date: Thu, 05 Feb 2009 13:20:04 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1233840004.54.0.796824957215.issue5135@psf.upfronthosting.co.za> Paul Moore added the comment: Very good point. Registering for the standard ABCs seems like an important use case. Unfortunately, it seems to me that ABCs simply don't provide that capability - is there a way, for a given class, of listing all the ABCs it's registered under? Even if the order is arbitrary, that's OK. Without that, I fail to see how *any* generic function implementation ("simple" or not) could support ABCs. (Excluding obviously broken approaches such as registration-order dependent overload resolution). The problem is that ABCs are all about isinstance testing, where generic functions are all about *avoiding* isinstance testing. (As a compromise, you could have a base generic function that did isinstance testing for the sequence ABC). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 14:23:46 2009 From: report at bugs.python.org (Thomas Heller) Date: Thu, 05 Feb 2009 13:23:46 +0000 Subject: [issue1835] Update version number in __init__.py In-Reply-To: <1200417671.24.0.488273286588.issue1835@psf.upfronthosting.co.za> Message-ID: <1233840226.95.0.67471578595.issue1835@psf.upfronthosting.co.za> Thomas Heller added the comment: > The distutils version number is now updated automatically by the Python > release process, so the comment in that file can be removed. How does this mechanism work? I'm wondering if I should use a similar mechanism for the ctypes version number... ---------- nosy: +theller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 15:16:46 2009 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Feb 2009 14:16:46 +0000 Subject: [issue5105] sqlite3.Row class, handling duplicate column names resulting from a SQL join In-Reply-To: <1233273211.24.0.156313751238.issue5105@psf.upfronthosting.co.za> Message-ID: <1233843406.94.0.0643937676045.issue5105@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 16:02:02 2009 From: report at bugs.python.org (Antoine Calando) Date: Thu, 05 Feb 2009 15:02:02 +0000 Subject: [issue5157] os.stat('foo') succeds if 'foo.exe' exists on cygwin In-Reply-To: <1233846122.88.0.160860469386.issue5157@psf.upfronthosting.co.za> Message-ID: <1233846122.88.0.160860469386.issue5157@psf.upfronthosting.co.za> New submission from Antoine Calando : On cygwin platform, with python cygwin package: Python 2.5.2 (r252:60911, Dec 2 2008, 09:26:14) When doing an os.stat('file') in a directory where no 'file' exists but a 'file.exe' do, the function return a stat object, as if the call was done on os.stat('file.exe'). After a few investigations, the problem come from the posix builtin library used by python-cygwin. I guess this is a workaround to have some calls like os.stat('/bin/ls') not failing, but is a dirty workaround. 'file' and 'file.exe' are two different files whatever the system you are on. This problem was found due to a strange behaviour from scons. I also check with other functions like os.lstat() and os.access() and it is the same problem. ---------- components: Windows messages: 81214 nosy: calandoa severity: normal status: open title: os.stat('foo') succeds if 'foo.exe' exists on cygwin type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 16:07:48 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Feb 2009 15:07:48 +0000 Subject: [issue2527] Pass a namespace to timeit In-Reply-To: <1207052027.28.0.27225375953.issue2527@psf.upfronthosting.co.za> Message-ID: <1233846468.63.0.101579756178.issue2527@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Georg, why did you reassign this? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 16:09:17 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Feb 2009 15:09:17 +0000 Subject: [issue5152] Add a JSON-RPC module In-Reply-To: <1233778290.63.0.330214687259.issue5152@psf.upfronthosting.co.za> Message-ID: <1233846557.97.0.146570121602.issue5152@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This is a reminder to me to submit a patch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 16:55:34 2009 From: report at bugs.python.org (Manuel Balsera) Date: Thu, 05 Feb 2009 15:55:34 +0000 Subject: [issue5158] Document distutils 'depends' option for extensions In-Reply-To: <1233849334.58.0.0898669443765.issue5158@psf.upfronthosting.co.za> Message-ID: <1233849334.58.0.0898669443765.issue5158@psf.upfronthosting.co.za> New submission from Manuel Balsera : Add a paragraph describing distuils depends option. Its my first patch, let me know if I messed up formmating, etc. ---------- components: Distutils files: setupscript.diff keywords: patch messages: 81217 nosy: mbalsera severity: normal status: open title: Document distutils 'depends' option for extensions versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file12946/setupscript.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 17:26:35 2009 From: report at bugs.python.org (Akira Kitada) Date: Thu, 05 Feb 2009 16:26:35 +0000 Subject: [issue5158] Document distutils 'depends' option for extensions In-Reply-To: <1233849334.58.0.0898669443765.issue5158@psf.upfronthosting.co.za> Message-ID: <1233851195.88.0.492091395496.issue5158@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 17:34:13 2009 From: report at bugs.python.org (Akira Kitada) Date: Thu, 05 Feb 2009 16:34:13 +0000 Subject: [issue1371826] distutils is silent about multiple -I/-L/-R Message-ID: <1233851653.59.0.211278856686.issue1371826@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek type: -> feature request versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 17:34:59 2009 From: report at bugs.python.org (Akira Kitada) Date: Thu, 05 Feb 2009 16:34:59 +0000 Subject: [issue1481347] parse_makefile doesn't handle $$ correctly Message-ID: <1233851699.73.0.399896480263.issue1481347@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 17:38:21 2009 From: report at bugs.python.org (Akira Kitada) Date: Thu, 05 Feb 2009 16:38:21 +0000 Subject: [issue1032] Improve the hackish runtime_library_dirs support for gcc In-Reply-To: <1188169656.44.0.377858080562.issue1032@psf.upfronthosting.co.za> Message-ID: <1233851901.52.0.669663779381.issue1032@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek type: compile error -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 17:40:25 2009 From: report at bugs.python.org (Akira Kitada) Date: Thu, 05 Feb 2009 16:40:25 +0000 Subject: [issue793069] Add --remove-source option Message-ID: <1233852025.17.0.05498579222.issue793069@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek versions: +Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 17:46:03 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Thu, 05 Feb 2009 16:46:03 +0000 Subject: [issue793069] Add --remove-source option Message-ID: <1233852363.24.0.378598687295.issue793069@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 17:47:07 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Thu, 05 Feb 2009 16:47:07 +0000 Subject: [issue1032] Improve the hackish runtime_library_dirs support for gcc In-Reply-To: <1188169656.44.0.377858080562.issue1032@psf.upfronthosting.co.za> Message-ID: <1233852427.4.0.0837953164419.issue1032@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 17:51:19 2009 From: report at bugs.python.org (Akira Kitada) Date: Thu, 05 Feb 2009 16:51:19 +0000 Subject: [issue763043] unable to specify another compiler Message-ID: <1233852679.72.0.778904331225.issue763043@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek versions: +Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 17:52:40 2009 From: report at bugs.python.org (Farshad Khoshkhui) Date: Thu, 05 Feb 2009 16:52:40 +0000 Subject: [issue4732] Object allocation stress leads to segfault on RHEL In-Reply-To: <1230063151.81.0.473433386181.issue4732@psf.upfronthosting.co.za> Message-ID: <1233852760.76.0.639428730653.issue4732@psf.upfronthosting.co.za> Farshad Khoshkhui added the comment: This happens for me on several debian and ubuntu machines with python 2.5 as well as 2.6 as I reported in #571885. I'll try your script and linking with tcmalloc and get back with results. ---------- nosy: +farshad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 17:54:22 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Thu, 05 Feb 2009 16:54:22 +0000 Subject: [issue763043] unable to specify another compiler Message-ID: <1233852862.58.0.731831496328.issue763043@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 17:55:17 2009 From: report at bugs.python.org (Farshad Khoshkhui) Date: Thu, 05 Feb 2009 16:55:17 +0000 Subject: [issue4732] Object allocation stress leads to segfault on RHEL In-Reply-To: <1230063151.81.0.473433386181.issue4732@psf.upfronthosting.co.za> Message-ID: <1233852917.06.0.975308193543.issue4732@psf.upfronthosting.co.za> Farshad Khoshkhui added the comment: Sorry wrong issue number. The correct one is #4358 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 20:18:11 2009 From: report at bugs.python.org (David W. Lambert) Date: Thu, 05 Feb 2009 19:18:11 +0000 Subject: [issue5157] os.stat('foo') succeds if 'foo.exe' exists on cygwin In-Reply-To: <1233846122.88.0.160860469386.issue5157@psf.upfronthosting.co.za> Message-ID: <1233861491.38.0.717972534436.issue5157@psf.upfronthosting.co.za> Changes by David W. Lambert : ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 20:32:57 2009 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 05 Feb 2009 19:32:57 +0000 Subject: [issue1519638] Unmatched Group issue - workaround Message-ID: <1233862377.85.0.128945377463.issue1519638@psf.upfronthosting.co.za> Matthew Barnett added the comment: This has been addressed in issue #2636. ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 20:51:21 2009 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 05 Feb 2009 19:51:21 +0000 Subject: [issue1693050] \w not helpful for non-Roman scripts Message-ID: <1233863481.54.0.335459112514.issue1693050@psf.upfronthosting.co.za> Matthew Barnett added the comment: In issue #2636 I'm using the following: Alpha is Ll, Lo, Lt, Lu. Digit is Nd. Word is Ll, Lo, Lt, Lu, Mc, Me, Mn, Nd, Nl, No, Pc. These are what are specified at http://www.regular-expressions.info/posixbrackets.html ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 21:03:23 2009 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 05 Feb 2009 20:03:23 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1233864203.64.0.725211739823.issue5135@psf.upfronthosting.co.za> Nick Coghlan added the comment: Even more inconveniently, the existence of unregister() on ABCs makes it difficult for the generic to cache the results of the isinstance() checks (you don't want to be going through the chain of registered ABCs every time calling isinstance(), since that would be painfully slow). That said, it is already the case that if you only *register* with an ABC, you don't get any of the methods - you have to implement them yourself. It's only when you actually *inherit* from the ABC that the methods are provided "for free". I guess the case isn't really any different here - if you changed your example so that A inherited from C and D rather than merely registering with them, then C & D would appear in the MRO and the generic would recognise them. So perhaps just documenting the limitation is the right answer after all. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 21:08:25 2009 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 05 Feb 2009 20:08:25 +0000 Subject: [issue5159] Indicating packages to be loaded when a Tcl interpreter is created in tkinter In-Reply-To: <1233864505.11.0.366828040714.issue5159@psf.upfronthosting.co.za> Message-ID: <1233864505.11.0.366828040714.issue5159@psf.upfronthosting.co.za> New submission from Guilherme Polo : Hi, It seems to me that it would be useful to add something to indicate which packages should be loaded, and how they should be loaded, when a Tcl interpreter is created through Tkinter.Tk. Right now every extension has to add some boilerplate code to load a package before starting the use of extension, and this code tends to be very similar -- like this: if not required_extension_loaded: extlib = os.environ.get('OPTIONAL_VAR_THAT_POINTS_TO_EXT') if extlib: master.tk.eval('global auto_path; ' 'lappend auto_path {%s}' % extlib) master.tk.call('package', 'require', 'Extlibname') required_extension_loaded = True master is an instance of Tkinter.Tk which has to be created before this, of course. Some extensions do it in different places in their code, but tend to involve basically the same code. The patch attached adds a new module in lib-tk named tkdeploader (not very nice eh) which handles these "indications". Each dependence to be loaded can define its own preloader callable, but the module adds a basic one, named basic_preloader, that should be enough for most situations. The patch also includes the changes necessary in Tkinter.py, just two lines. ---------- components: Tkinter files: tkdeploader.diff keywords: patch messages: 81223 nosy: gpolo severity: normal status: open title: Indicating packages to be loaded when a Tcl interpreter is created in tkinter versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file12947/tkdeploader.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 21:09:49 2009 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 05 Feb 2009 20:09:49 +0000 Subject: [issue5159] Indicating packages to be loaded when a Tcl interpreter is created in tkinter In-Reply-To: <1233864505.11.0.366828040714.issue5159@psf.upfronthosting.co.za> Message-ID: <1233864589.96.0.798353402643.issue5159@psf.upfronthosting.co.za> Guilherme Polo added the comment: Attaching patch to show how ttk.py would be with this new module. Added file: http://bugs.python.org/file12948/ttk_withdeploader.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 21:24:56 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 05 Feb 2009 20:24:56 +0000 Subject: [issue5157] os.stat('foo') succeds if 'foo.exe' exists on cygwin In-Reply-To: <1233846122.88.0.160860469386.issue5157@psf.upfronthosting.co.za> Message-ID: <1233865496.34.0.963154643176.issue5157@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Why do you think this is a bug in Python? It sounds like a bug in Cygwin to me? Python delegates to the C library as-is, with not attempt to second-guessing the C library. So if the C library says "file" exists, then this is also what Python must tell you. Closing as third-party bug. ---------- nosy: +loewis resolution: -> invalid status: open -> closed versions: +3rd party -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 21:26:48 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 05 Feb 2009 20:26:48 +0000 Subject: [issue5152] Add a JSON-RPC module In-Reply-To: <1233846557.97.0.146570121602.issue5152@psf.upfronthosting.co.za> Message-ID: <498B4B85.6000408@v.loewis.de> Martin v. L?wis added the comment: > This is a reminder to me to submit a patch. Is it really necessary to use the public bug tracker for that? All other committers, as well as users, will see your reminder, and get bothered by this (non-)issue. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 21:29:20 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 05 Feb 2009 20:29:20 +0000 Subject: [issue5066] IDLE documentation for Unix obsolete/incorrect In-Reply-To: <1233831477.28.0.333879953096.issue5066@psf.upfronthosting.co.za> Message-ID: <498B4C21.8000906@udel.edu> Terry J. Reedy added the comment: Is there an HTML to acceptable RST converter? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 22:11:53 2009 From: report at bugs.python.org (Corey Goldberg) Date: Thu, 05 Feb 2009 21:11:53 +0000 Subject: [issue5160] Intermittant segmentation fault with ctrl-c (threads and queues) In-Reply-To: <1233868312.9.0.87638822413.issue5160@psf.upfronthosting.co.za> Message-ID: <1233868312.9.0.87638822413.issue5160@psf.upfronthosting.co.za> New submission from Corey Goldberg : I can get the Python interpreter to core dump when running the following code: http://pastebin.com/f261f398f To reproduce: - run the above code and press ctrl-c to quit while it is running. It crashes (segfault) the interpreter every few times you stop it like this. I think it has something to do with the thread launching another thread containing a queue. - Tested on Windows XP and Ubuntu Linux 8.10 (both running Python 2.5.2) ---------- components: Interpreter Core messages: 81228 nosy: cgoldberg severity: normal status: open title: Intermittant segmentation fault with ctrl-c (threads and queues) type: crash versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 22:12:22 2009 From: report at bugs.python.org (John Levon) Date: Thu, 05 Feb 2009 21:12:22 +0000 Subject: [issue4111] Add DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1233868342.66.0.9525184679.issue4111@psf.upfronthosting.co.za> John Levon added the comment: I haven't seen "shorter than expected" message before, sounds like a Mac OS X specific thing. As for never getting any probes out, this is where it gets fun. Debugging this is very tricky indeed: it involves you dropping into the kernel debugger and looking at the interpreter's state. Most likely, the compiler is doing something different with the relevant Python functions, causing the logic in the DTrace ustack probe to fail. I don't even know how the Apple guys debug this sort of thing, but they'd definitely need to be involved. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 22:12:54 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Feb 2009 21:12:54 +0000 Subject: [issue5152] Add a JSON-RPC module In-Reply-To: <1233778290.63.0.330214687259.issue5152@psf.upfronthosting.co.za> Message-ID: <1233868374.28.0.15493236149.issue5152@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 22:14:47 2009 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 05 Feb 2009 21:14:47 +0000 Subject: [issue4151] Separate build dir broken In-Reply-To: <1224522256.17.0.820973690454.issue4151@psf.upfronthosting.co.za> Message-ID: <1233868487.08.0.126727132766.issue4151@psf.upfronthosting.co.za> Neil Schemenauer added the comment: I committed my proposed changes in several chunks, ending with r69305. I think building in a separate directory again works and that non-POSIX platforms are not adversely affected by this change. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 22:17:36 2009 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 05 Feb 2009 21:17:36 +0000 Subject: [issue4151] Separate build dir broken In-Reply-To: <1224522256.17.0.820973690454.issue4151@psf.upfronthosting.co.za> Message-ID: <1233868656.39.0.944051468221.issue4151@psf.upfronthosting.co.za> Neil Schemenauer added the comment: I committed my proposed changes in several chunks, ending with r69305. I think building in a separate directory again works and that non-POSIX platforms are not adversely affected by this change. ---------- nosy: +nascheme resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 22:17:53 2009 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 05 Feb 2009 21:17:53 +0000 Subject: [issue4151] Separate build dir broken In-Reply-To: <1224522256.17.0.820973690454.issue4151@psf.upfronthosting.co.za> Message-ID: <1233868673.83.0.102971104832.issue4151@psf.upfronthosting.co.za> Changes by Neil Schemenauer : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 22:18:49 2009 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 05 Feb 2009 21:18:49 +0000 Subject: [issue4070] python tests failure if builddir <> sourcedir In-Reply-To: <1223418786.48.0.948441318912.issue4070@psf.upfronthosting.co.za> Message-ID: <1233868729.62.0.711974559825.issue4070@psf.upfronthosting.co.za> Changes by Neil Schemenauer : ---------- assignee: -> nascheme nosy: +nascheme resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 23:30:26 2009 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 05 Feb 2009 22:30:26 +0000 Subject: [issue4151] Separate build dir broken In-Reply-To: <1224522256.17.0.820973690454.issue4151@psf.upfronthosting.co.za> Message-ID: <1233873026.71.0.670196058267.issue4151@psf.upfronthosting.co.za> Roumen Petrov added the comment: May be not related to the commit but after clean make fail to build a number of modules, as example _bisect. Second run of make build all left. The value of srcdir (from Makefile) is ".." without quotes. About cleanup: one use of '(srcdir,)==...' left in setup.py . _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 23:38:50 2009 From: report at bugs.python.org (Corey Goldberg) Date: Thu, 05 Feb 2009 22:38:50 +0000 Subject: [issue5160] Intermittant segmentation fault with ctrl-c (threads and queues) In-Reply-To: <1233868312.9.0.87638822413.issue5160@psf.upfronthosting.co.za> Message-ID: <1233873530.6.0.0973059515858.issue5160@psf.upfronthosting.co.za> Corey Goldberg added the comment: little more info: If you create a Queue in the main thread and pass this to each worker thread, it works fine. If you create the Queue inside the worker thread and then pass it to a new thread, it can crash. when it crashes, you get an immediate core dump with no error messages or stack trace. This happens very intermittently but can be reproduced easily. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 23:41:03 2009 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 05 Feb 2009 22:41:03 +0000 Subject: [issue4151] Separate build dir broken In-Reply-To: <1224522256.17.0.820973690454.issue4151@psf.upfronthosting.co.za> Message-ID: <1233873663.65.0.494082768416.issue4151@psf.upfronthosting.co.za> Roumen Petrov added the comment: The "clean build' mean missing subdirectory build in . Now module objects go in build/Modules/. I guess that second make succeed as libffi create build directory. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 23:59:31 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Thu, 05 Feb 2009 22:59:31 +0000 Subject: [issue5132] distutils: libpython not found when building python extensions on Solaris when Python was built with --enable-shared In-Reply-To: <1233599293.13.0.516383193111.issue5132@psf.upfronthosting.co.za> Message-ID: <1233874771.54.0.764421137833.issue5132@psf.upfronthosting.co.za> Tarek Ziad? added the comment: fixed in r69316 Thanks for the patch ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 00:13:08 2009 From: report at bugs.python.org (Bobby Xiao) Date: Thu, 05 Feb 2009 23:13:08 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1233875588.85.0.656042893958.issue2636@psf.upfronthosting.co.za> Bobby Xiao added the comment: I'm glad to see that the unmatched group issue is finally being addressed. Thanks! ---------- nosy: +nneonneo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 00:40:04 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Thu, 05 Feb 2009 23:40:04 +0000 Subject: [issue1276768] dirutils.mkpath (verbose option does not work) Message-ID: <1233877204.07.0.667233720455.issue1276768@psf.upfronthosting.co.za> Tarek Ziad? added the comment: I don't see the point of making mkpath and remove_tree more verbose than what they are now. log.info is called in both function and verbose is never used. So I guess the best way to activate verbose is to make its default value to 1 and change the code so log.info calls are made when verbose=1, and are not made if verbose=0. This way, the known verbosity is not changed and can be cut down if needed. Now for create_tree, it will pass the verbose value to mkpath. Last, copy_tree will act the same way and pass along verbose to copy_file. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 00:52:51 2009 From: report at bugs.python.org (Russ Cox) Date: Thu, 05 Feb 2009 23:52:51 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1233702489.78.0.189591899391.issue2636@psf.upfronthosting.co.za> Message-ID: Russ Cox added the comment: > Named Unicode characters eg \N{LATIN CAPITAL LETTER A} These descriptions are not as stable as, say, Unicode code point values or language names. Are you sure it is a good idea to depend on them not being adjusted in the future? It's certainly nice and self-documenting, but it doesn't seem better from a future-proofing point of view than \u0041. Do other languages implement this? Russ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 01:03:02 2009 From: report at bugs.python.org (Matthew Barnett) Date: Fri, 06 Feb 2009 00:03:02 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1233878582.09.0.789986855116.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: Python 2.6 does (and probably Python 3.x, although I haven't checked): >>> u"\N{LATIN CAPITAL LETTER A}" u'A' If it's good enough for Python's Unicode string literals then it's good enough for Python's re module. :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 01:06:05 2009 From: report at bugs.python.org (Robert Xiao) Date: Fri, 06 Feb 2009 00:06:05 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1233878765.89.0.438235798747.issue2636@psf.upfronthosting.co.za> Robert Xiao added the comment: In fact, it works for Python 2.4, 2.5, 2.6 and 3.0 from my rather limited testing. In Python 2.4: >>> u"\N{LATIN CAPITAL LETTER A}" u'A' >>> u"\N{MUSICAL SYMBOL DOUBLE SHARP}" u'\U0001d12a' In Python 3.0: >>> "\N{LATIN CAPITAL LETTER A}" 'A' >>> ord("\N{MUSICAL SYMBOL DOUBLE SHARP}") 119082 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 01:32:56 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 00:32:56 +0000 Subject: [issue1276768] dirutils.mkpath (verbose option does not work) Message-ID: <1233880376.25.0.233209994944.issue1276768@psf.upfronthosting.co.za> Tarek Ziad? added the comment: done in r69324. Won't merge it in 2.6/3.0 ---------- versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 01:38:52 2009 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 06 Feb 2009 00:38:52 +0000 Subject: [issue4151] Separate build dir broken In-Reply-To: <1224522256.17.0.820973690454.issue4151@psf.upfronthosting.co.za> Message-ID: <1233880732.28.0.881091217581.issue4151@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Roumen, thanks for reporting the bug. It seems that distutils requires an absolute path (although I didn't waste time digging too deep into the issue). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 01:40:36 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 00:40:36 +0000 Subject: [issue1276768] dirutils.mkpath (verbose option does not work) Message-ID: <1233880836.99.0.95184505034.issue1276768@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 01:45:44 2009 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 06 Feb 2009 00:45:44 +0000 Subject: [issue5161] wrong paths for ctypes cleanup In-Reply-To: <1233881144.37.0.958366280661.issue5161@psf.upfronthosting.co.za> Message-ID: <1233881144.37.0.958366280661.issue5161@psf.upfronthosting.co.za> New submission from Neil Schemenauer : The following code was added to Makefile.pre.in when ctypes was merged: find $(srcdir)/build -name 'fficonfig.h' -exec rm -f {} ';' || true find $(srcdir)/build -name 'fficonfig.py' -exec rm -f {} ';' || true If Python is compiled in a directory other than the source directory than $(srcdir)/build does not exist and these commands don't work as intended. I think that proper path would be simply "build". ---------- assignee: theller components: Build messages: 81243 nosy: nascheme, theller priority: low severity: normal status: open title: wrong paths for ctypes cleanup type: compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 01:55:36 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 00:55:36 +0000 Subject: [issue4987] update distutils.README In-Reply-To: <1232291903.8.0.000403573304081.issue4987@psf.upfronthosting.co.za> Message-ID: <1233881736.7.0.40955739946.issue4987@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 02:10:46 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 01:10:46 +0000 Subject: [issue1520877] Distutils bugfix: Read $AR from the environment/Makefile. Message-ID: <1233882646.84.0.728411440923.issue1520877@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 02:19:33 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 01:19:33 +0000 Subject: [issue1520877] Distutils bugfix: Read $AR from the environment/Makefile. Message-ID: <1233883173.95.0.591576080802.issue1520877@psf.upfronthosting.co.za> Tarek Ziad? added the comment: done in r69342 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 02:28:03 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 01:28:03 +0000 Subject: [issue4931] distutils does not show any error msg when can't build C module extensions due to a missing C compiler In-Reply-To: <1231867865.54.0.174725758904.issue4931@psf.upfronthosting.co.za> Message-ID: <1233883683.76.0.0826165016829.issue4931@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 02:29:17 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 01:29:17 +0000 Subject: [issue4636] bdist_wininst installer with install script raises exception In-Reply-To: <1229030167.98.0.0716327891895.issue4636@psf.upfronthosting.co.za> Message-ID: <1233883757.17.0.607334760037.issue4636@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 02:30:28 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 01:30:28 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1233883828.92.0.420287433928.issue4015@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 02:31:22 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 01:31:22 +0000 Subject: [issue2461] test_util.py for distutils In-Reply-To: <1206271007.7.0.519259374853.issue2461@psf.upfronthosting.co.za> Message-ID: <1233883882.31.0.691887595119.issue2461@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 02:31:45 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 01:31:45 +0000 Subject: [issue3985] removed string module from distutils [patch] In-Reply-To: <1222597888.29.0.260615260643.issue3985@psf.upfronthosting.co.za> Message-ID: <1233883905.83.0.907631048052.issue3985@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 02:31:59 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 01:31:59 +0000 Subject: [issue3986] removed string and type usage from distutils.cmd [patch] In-Reply-To: <1222599260.36.0.588546522414.issue3986@psf.upfronthosting.co.za> Message-ID: <1233883919.9.0.0166696964705.issue3986@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 02:32:10 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 01:32:10 +0000 Subject: [issue3987] removed types from distutils.core [patch] In-Reply-To: <1222599591.35.0.056010303755.issue3987@psf.upfronthosting.co.za> Message-ID: <1233883930.56.0.605684917435.issue3987@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 02:32:24 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 01:32:24 +0000 Subject: [issue3992] removed custom log from distutils In-Reply-To: <1222645256.9.0.167855735394.issue3992@psf.upfronthosting.co.za> Message-ID: <1233883944.22.0.46938023666.issue3992@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 02:33:28 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 06 Feb 2009 01:33:28 +0000 Subject: [issue4285] Use a named tuple for sys.version_info In-Reply-To: <1226189092.93.0.524804334834.issue4285@psf.upfronthosting.co.za> Message-ID: <1233884008.36.0.817789228205.issue4285@psf.upfronthosting.co.za> Eric Smith added the comment: Committed in r69331 (trunk) and r69346 (py3k). ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 02:34:07 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 01:34:07 +0000 Subject: [issue3386] [PATCH] distutils.sysconfig.get_python_lib prefix argument broken In-Reply-To: <1216242653.79.0.3968685363.issue3386@psf.upfronthosting.co.za> Message-ID: <1233884047.21.0.342800171216.issue3386@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek nosy: +tarek priority: -> high versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 02:36:11 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 01:36:11 +0000 Subject: [issue3031] distutils package_dir/package_data failure In-Reply-To: <1212498369.04.0.406397412231.issue3031@psf.upfronthosting.co.za> Message-ID: <1233884171.16.0.414493801124.issue3031@psf.upfronthosting.co.za> Tarek Ziad? added the comment: will test it on 2.6 (no more fixed for 2.4/2.5) ---------- assignee: -> tarek nosy: +tarek resolution: -> wont fix versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 03:00:32 2009 From: report at bugs.python.org (Volodymyr Orlenko) Date: Fri, 06 Feb 2009 02:00:32 +0000 Subject: [issue5162] multiprocessing cannot spawn child from a Windows service In-Reply-To: <1233885632.9.0.0484597105973.issue5162@psf.upfronthosting.co.za> Message-ID: <1233885632.9.0.0484597105973.issue5162@psf.upfronthosting.co.za> New submission from Volodymyr Orlenko : I think I've found a small bug with multiprocessing package on Windows. If you try to start a multiprocessing.Process from a Python- based Windows service, the child process will fail to run. When running the parent process as a regular Python program, everything works as expected. I've tracked the problem down to how main_path is prepared in multiprocessing.forking.get_preparation_data() (lines 370-377): def get_preparation_data(name): [...skipped a few lines...] if not WINEXE: main_path = getattr(sys.modules['__main__'], '__file__', None) if not main_path and sys.argv[0] not in ('', '-c'): main_path = sys.argv[0] if main_path is not None: if not os.path.isabs(main_path) and \ process.ORIGINAL_DIR is not None: main_path = os.path.join(process.ORIGINAL_DIR, main_path) d['main_path'] = os.path.normpath(main_path) return d When the program is running as a Windows service, but is not packaged into a single executable, main_path will become the path to the service executable (typically, pythonservice.exe). When this data makes it to the child process, the prepare() function will treat main_path as a path to a python module, and will try to import it. This causes it to fail. My quick-and-dirty solution was to check in get_preparation_data() if main_path ends with '.exe', and if it does, to not pass it at all. This solves the problem in my case, but perhaps there's a better way to fix this? Here is my version of get_preparation_data(): def get_preparation_data(name): ''' Return info about parent needed by child to unpickle process object ''' from .util import _logger, _log_to_stderr d = dict( name=name, sys_path=sys.path, sys_argv=sys.argv, log_to_stderr=_log_to_stderr, orig_dir=process.ORIGINAL_DIR, authkey=process.current_process().authkey, ) if _logger is not None: d['log_level'] = _logger.getEffectiveLevel() if not WINEXE: main_path = getattr(sys.modules['__main__'], '__file__', None) if not main_path and sys.argv[0] not in ('', '-c'): main_path = sys.argv[0] if main_path is not None: if not os.path.isabs(main_path) and \ process.ORIGINAL_DIR is not None: main_path = os.path.join(process.ORIGINAL_DIR, main_path) if not main_path.endswith('.exe'): d['main_path'] = os.path.normpath(main_path) return d ---------- components: Library (Lib) files: forking-patch messages: 81247 nosy: jnoller, orlenko severity: normal status: open title: multiprocessing cannot spawn child from a Windows service type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file12949/forking-patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 06:48:51 2009 From: report at bugs.python.org (David Schultz) Date: Fri, 06 Feb 2009 05:48:51 +0000 Subject: [issue5163] tkinter.scrolledtext: new text is hidden after using insert() In-Reply-To: <1233899331.85.0.574945693305.issue5163@psf.upfronthosting.co.za> Message-ID: <1233899331.85.0.574945693305.issue5163@psf.upfronthosting.co.za> New submission from David Schultz : I've added a "keep at bottom" option to the scrolledtext class. This way, if a user wants to always see the text added via "insert()", it will be visible. ---------- components: Tkinter messages: 81248 nosy: ringhome severity: normal status: open title: tkinter.scrolledtext: new text is hidden after using insert() type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 09:17:30 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 08:17:30 +0000 Subject: [issue3031] distutils package_dir/package_data failure In-Reply-To: <1212498369.04.0.406397412231.issue3031@psf.upfronthosting.co.za> Message-ID: <1233908250.19.0.27730219058.issue3031@psf.upfronthosting.co.za> Tarek Ziad? added the comment: works, and even tested in test_build_py.test_empty_package_dir ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 09:20:41 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 08:20:41 +0000 Subject: [issue3987] removed types from distutils.core [patch] In-Reply-To: <1222599591.35.0.056010303755.issue3987@psf.upfronthosting.co.za> Message-ID: <1233908441.6.0.907161558329.issue3987@psf.upfronthosting.co.za> Tarek Ziad? added the comment: done in r69356 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 09:27:45 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 08:27:45 +0000 Subject: [issue3386] [PATCH] distutils.sysconfig.get_python_lib prefix argument broken In-Reply-To: <1216242653.79.0.3968685363.issue3386@psf.upfronthosting.co.za> Message-ID: <1233908865.95.0.51616873747.issue3386@psf.upfronthosting.co.za> Tarek Ziad? added the comment: The patch looks fine to me. I'll send a mail to Andrew to ask him for a demonstration, and wait a week to commit it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 09:56:01 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 08:56:01 +0000 Subject: [issue3986] removed string and type usage from distutils.cmd [patch] In-Reply-To: <1222599260.36.0.588546522414.issue3986@psf.upfronthosting.co.za> Message-ID: <1233910561.98.0.63979859628.issue3986@psf.upfronthosting.co.za> Tarek Ziad? added the comment: worked started in r3986 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 10:06:35 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 09:06:35 +0000 Subject: [issue5164] backport distutils 3.x changes into 2.7 when appliabl In-Reply-To: <1233911195.36.0.922992904897.issue5164@psf.upfronthosting.co.za> Message-ID: <1233911195.36.0.922992904897.issue5164@psf.upfronthosting.co.za> New submission from Tarek Ziad? : It's annoying to get conflicts on changes in distutils in the trunk, when forward-porting to 3.x, because other changes where made there and only there. Things like PEP8-ification and modern syntax changes needs to be backported to 2.7 when appliable to reduce the gap. ---------- assignee: tarek components: Distutils messages: 81253 nosy: tarek priority: high severity: normal status: open title: backport distutils 3.x changes into 2.7 when appliabl type: behavior versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 10:12:54 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 09:12:54 +0000 Subject: [issue2445] Use The CygwinCCompiler Under Cygwin In-Reply-To: <1206117698.01.0.240143600903.issue2445@psf.upfronthosting.co.za> Message-ID: <1233911574.31.0.349987867916.issue2445@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek nosy: +tarek versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 10:13:35 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 09:13:35 +0000 Subject: [issue2279] distutils sdist add_defaults does not add data_files In-Reply-To: <1205333612.66.0.693918609529.issue2279@psf.upfronthosting.co.za> Message-ID: <1233911615.96.0.367443371552.issue2279@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek nosy: +tarek versions: +Python 2.7, Python 3.1 -Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 10:14:22 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 09:14:22 +0000 Subject: [issue2624] swig support in distutils should use the build and temp dirs In-Reply-To: <1208004805.0.0.253675871958.issue2624@psf.upfronthosting.co.za> Message-ID: <1233911662.09.0.931412140463.issue2624@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek nosy: +tarek versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 10:14:44 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 09:14:44 +0000 Subject: [issue2943] Distutils should generate a better error message when the SDK is not installed In-Reply-To: <1211455981.94.0.404413935613.issue2943@psf.upfronthosting.co.za> Message-ID: <1233911684.56.0.881314532516.issue2943@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek nosy: +tarek type: -> behavior versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 10:15:16 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 09:15:16 +0000 Subject: [issue2945] bdist_rpm does not list dist files (should effect upload) In-Reply-To: <1211466871.95.0.658180804984.issue2945@psf.upfronthosting.co.za> Message-ID: <1233911716.16.0.55301175043.issue2945@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek nosy: +tarek versions: +Python 2.7, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 10:15:42 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 09:15:42 +0000 Subject: [issue3621] it would be nice if installers made by bdist_wininst stored an EstimatedSize property in the Windows registry In-Reply-To: <1219248850.4.0.277642755083.issue3621@psf.upfronthosting.co.za> Message-ID: <1233911742.49.0.484035827637.issue3621@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek nosy: +tarek versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 10:17:05 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 09:17:05 +0000 Subject: [issue3902] distutils does not correctly create packages for compiled extensions In-Reply-To: <1221761506.23.0.180859211428.issue3902@psf.upfronthosting.co.za> Message-ID: <1233911825.74.0.63883129346.issue3902@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek nosy: +tarek versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 10:17:25 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 09:17:25 +0000 Subject: [issue4032] distutils cannot recognize ".dll.a" as library on cygwin In-Reply-To: <1223055534.39.0.439061882395.issue4032@psf.upfronthosting.co.za> Message-ID: <1233911845.54.0.350157053581.issue4032@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 10:17:53 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 09:17:53 +0000 Subject: [issue4359] at runtime, distutils uses buildtime files In-Reply-To: <1227138737.98.0.796971482315.issue4359@psf.upfronthosting.co.za> Message-ID: <1233911873.57.0.989804213317.issue4359@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek nosy: +tarek versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 10:31:16 2009 From: report at bugs.python.org (Ulrich Eckhardt) Date: Fri, 06 Feb 2009 09:31:16 +0000 Subject: [issue5134] Compiler warnings in sqlite module In-Reply-To: <1233600780.48.0.187282999033.issue5134@psf.upfronthosting.co.za> Message-ID: <1233912676.41.0.866793885882.issue5134@psf.upfronthosting.co.za> Ulrich Eckhardt added the comment: Technically, both changes (or neither of them) generate the same output binaries, so I Don't Care(tm). My approach for disabling the warnings in the code has (to me) two advantages: 1. You immediately see that warnings are disabled. I would otherwise never expect that to happen in any serious project, because warnings are valuable. 2. You only have to do it once for the single source file, not in every VC project file. Happy weekend! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 10:36:05 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 06 Feb 2009 09:36:05 +0000 Subject: [issue5160] Intermittant segmentation fault with ctrl-c (threads and queues) In-Reply-To: <1233868312.9.0.87638822413.issue5160@psf.upfronthosting.co.za> Message-ID: <1233912965.8.0.654495411744.issue5160@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Here is stack trace. PyEval_EvalFrameEx(_frame * 0x00a62060, int 83) line 2841 + 6 bytes fast_function(_object * 0x00000000, _object * * * 0x00fbfa98, int 1, int 1, int 9870576) line 3946 call_function(_object * * * 0x00fbfa98, int 0) line 3880 + 16 bytes PyEval_EvalFrameEx(_frame * 0x00a60ac0, int 131) line 2515 fast_function(_object * 0x00000000, _object * * * 0x00fbfbe0, int 1, int 1, int 9870576) line 3946 call_function(_object * * * 0x00fbfbe0, int 0) line 3880 + 16 bytes PyEval_EvalFrameEx(_frame * 0x00a60918, int 131) line 2515 PyEval_EvalCodeEx(PyCodeObject * 0x00a142c8, _object * 0x00a60918, _object * 0x00000001, _object * * 0x00a194ac, int 1, _object * * 0x00000000, int 0, _object * * 0x00000000, int 0, _object * 0x00000000) line 3104 + 11 bytes function_call(_object * 0x00a35350, _object * 0x00a19498, _object * 0x00000000) line 529 + 64 bytes PyObject_Call(_object * 0x00a35350, _object * 0x00a19498, _object * 0x00000000) line 2506 + 15 bytes instancemethod_call(_object * 0x00a35350, _object * 0x00a19498, _object * 0x00000000) line 2579 + 17 bytes PyObject_Call(_object * 0x009fdef8, _object * 0x008c1038, _object * 0x00000000) line 2506 + 15 bytes PyEval_CallObjectWithKeywords(_object * 0x009fdef8, _object * 0x008c1038, _object * 0x00000000) line 3729 t_bootstrap(void * 0x008c7608) line 426 + 26 bytes bootstrap(void * 0x00234d08) line 122 + 7 bytes _threadstartex(void * 0x009aeaf0) line 227 + 13 bytes KERNEL32! 77e5b3bc() ////////////////////////////////////////// if (tstate->frame->f_exc_type != NULL) /* crash: tstate->frame is NULL */ reset_exc_info(tstate); else { assert(tstate->frame->f_exc_value == NULL); assert(tstate->frame->f_exc_traceback == NULL); } ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 11:20:34 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 06 Feb 2009 10:20:34 +0000 Subject: [issue5165] os.rename and other raise WindowsError In-Reply-To: <1233915634.72.0.359575992053.issue5165@psf.upfronthosting.co.za> Message-ID: <1233915634.72.0.359575992053.issue5165@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson : in lib/test/test_os.py, there is a test class, Win32ErrorTests, that tests that certain functions return a WindowsError on failure. And indeed they do that, but that is in contradiction with the documentation. From the 2.6 docs: Note All functions in this module raise OSError in the case of invalid or inaccessible file names and paths, or other arguments that have the correct type, but are not accepted by the operating system. ---------- components: Interpreter Core messages: 81256 nosy: krisvale severity: normal status: open title: os.rename and other raise WindowsError type: behavior versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 11:21:38 2009 From: report at bugs.python.org (Antoine Calando) Date: Fri, 06 Feb 2009 10:21:38 +0000 Subject: [issue5157] os.stat('foo') succeds if 'foo.exe' exists on cygwin In-Reply-To: <1233865496.34.0.963154643176.issue5157@psf.upfronthosting.co.za> Message-ID: <1549662372.236651233915694700.JavaMail.root@zimbra1-e1.priv.proxad.net> Antoine Calando added the comment: Hi Martin, Actually, I just investigated the problem in the libs and did not check the python exe source code. I guess you are right, this looks more like an issue from cygwin. I was a bit irritated by hours of debugging when entering the bug, and also tired of thinking it seems :) Regards, Antoine ----- Martin v. L?wis a ?crit : > > Martin v. L?wis added the comment: > > Why do you think this is a bug in Python? It sounds like a bug in Cygwin > to me? > > Python delegates to the C library as-is, with not attempt to > second-guessing the C library. So if the C library says "file" exists, > then this is also what Python must tell you. > > Closing as third-party bug. > > ---------- > nosy: +loewis > resolution: -> invalid > status: open -> closed > versions: +3rd party -Python 2.5 > > _______________________________________ > Python tracker > > _______________________________________ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 11:45:54 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 06 Feb 2009 10:45:54 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233917154.76.0.275966645182.issue4804@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: I've taken the patch from Hirokazu and enhanced it: 1) it needed work to function with Visual Studio 2008 2) It now exposes a function so that _fileio.c can make use of it too. 3) Turned off the CRT manipulation in exceptions.c 4) Fixed minor problems, e.g. with dup2 5) Added comments A VS2008 compilation runs the testsuite just fine. Maybe Hirozaku can test this with his VS2005? Added file: http://bugs.python.org/file12950/__pioinfo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 12:13:45 2009 From: report at bugs.python.org (Denis S. Otkidach) Date: Fri, 06 Feb 2009 11:13:45 +0000 Subject: [issue5166] ElementTree and minidom don't prevent creation of not well-formed XML In-Reply-To: <1233918825.25.0.360851750395.issue5166@psf.upfronthosting.co.za> Message-ID: <1233918825.25.0.360851750395.issue5166@psf.upfronthosting.co.za> New submission from Denis S. Otkidach : ElementTree and minidom allow creation of not well-formed XML, that can't be parsed: >>> from xml.etree import ElementTree >>> element = ElementTree.Element('element') >>> element.text = u'\0' >>> xml = ElementTree.tostring(element, encoding='utf-8') >>> ElementTree.fromstring(xml) [...] xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 9 >>> from xml.dom import minidom >>> doc = minidom.getDOMImplementation().createDocument(None, None, None) >>> element = doc.createElement('element') >>> element.appendChild(doc.createTextNode(u'\0')) >>> doc.appendChild(element) >>> xml = doc.toxml(encoding='utf-8') >>> minidom.parseString(xml) [...] xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, colum I believe they should raise some exception when there are characters not allowed in XML (http://www.w3.org/TR/REC-xml/#NT-Char) are used in attribute values, text nodes and CDATA sections. ---------- components: Library (Lib) messages: 81259 nosy: ods severity: normal status: open title: ElementTree and minidom don't prevent creation of not well-formed XML type: behavior versions: Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 12:22:05 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 06 Feb 2009 11:22:05 +0000 Subject: [issue1835] Update version number in __init__.py In-Reply-To: <1233840226.95.0.67471578595.issue1835@psf.upfronthosting.co.za> Message-ID: <498C1D5B.2040706@egenix.com> Marc-Andre Lemburg added the comment: On 2009-02-05 14:23, Thomas Heller wrote: > Thomas Heller added the comment: > >> The distutils version number is now updated automatically by the Python >> release process, so the comment in that file can be removed. > > How does this mechanism work? I'm wondering if I should use a similar > mechanism for the ctypes version number... This is done by Barry's release.py script: http://svn.python.org/view/sandbox/trunk/release/release.py in bump(). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 13:56:38 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 06 Feb 2009 12:56:38 +0000 Subject: [issue5167] distutils/test_customize_compiler fails on windows In-Reply-To: <1233924998.48.0.430995834835.issue5167@psf.upfronthosting.co.za> Message-ID: <1233924998.48.0.430995834835.issue5167@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : test_customize_compiler fails on windows with following error message. ERROR: test_customize_compiler (distutils.tests.test_sysconfig.SysconfigTestCase ) ---------------------------------------------------------------------- Traceback (most recent call last): File "e:\python-dev\trunk\lib\distutils\tests\test_sysconfig.py", line 54, in test_customize_compiler sysconfig.customize_compiler(comp) File "e:\python-dev\trunk\lib\distutils\sysconfig.py", line 181, in customize_ compiler cpp = cc + " -E" # not always TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' I hope attached patch will fix this. ---------- components: Distutils, Tests files: fix_distutils_test.patch keywords: patch messages: 81261 nosy: ocean-city, tarek severity: normal stage: patch review status: open title: distutils/test_customize_compiler fails on windows versions: Python 2.7 Added file: http://bugs.python.org/file12951/fix_distutils_test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 14:09:26 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 06 Feb 2009 13:09:26 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233925766.94.0.742767248776.issue4804@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Sorry, I don't have VS2005. By the way, _PyVerify_fd seems to be required to VC6 too. Because fdopen(fd >= _NHANDLE_) crashes on debug build and fdopen(bad fd < _NHANDLE_) won't set errno to EBADF. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 14:18:38 2009 From: report at bugs.python.org (=?utf-8?q?Horv=C3=A1th_Istv=C3=A1n_R=C3=B3bert?=) Date: Fri, 06 Feb 2009 13:18:38 +0000 Subject: [issue5168] shutil.copystat does not copy the "hidden" flag on windows In-Reply-To: <1233926318.17.0.887740362056.issue5168@psf.upfronthosting.co.za> Message-ID: <1233926318.17.0.887740362056.issue5168@psf.upfronthosting.co.za> New submission from Horv?th Istv?n R?bert : Hi! While copying hidden files on windows, the hidden flag is lost (surprisingly the read-only flag is copied). Is this a bug or a feature? The documentation only says that flags are also copied by shutil.copystat, but no details. See the attached file for an example. Cheers, Robert ---------- components: Windows files: copyHiddenFile.zip messages: 81263 nosy: throbi severity: normal status: open title: shutil.copystat does not copy the "hidden" flag on windows type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file12952/copyHiddenFile.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 14:28:08 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 13:28:08 +0000 Subject: [issue5167] distutils/test_customize_compiler fails on windows In-Reply-To: <1233924998.48.0.430995834835.issue5167@psf.upfronthosting.co.za> Message-ID: <1233926888.99.0.141168217518.issue5167@psf.upfronthosting.co.za> Tarek Ziad? added the comment: fixed in r69366 thanks for the patch ---------- assignee: -> tarek status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 14:32:07 2009 From: report at bugs.python.org (Matthew Barnett) Date: Fri, 06 Feb 2009 13:32:07 +0000 Subject: [issue5165] os.rename and other raise WindowsError In-Reply-To: <1233915634.72.0.359575992053.issue5165@psf.upfronthosting.co.za> Message-ID: <1233927127.99.0.695605141239.issue5165@psf.upfronthosting.co.za> Matthew Barnett added the comment: WindowsError is a subclass of OSError, so it's not entirely contradictory, just a little misleading... :-) ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 14:36:41 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 06 Feb 2009 13:36:41 +0000 Subject: [issue5165] os.rename and other raise WindowsError In-Reply-To: <1233915634.72.0.359575992053.issue5165@psf.upfronthosting.co.za> Message-ID: <1233927401.22.0.839981164498.issue5165@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: ah, well, silly me. then I'll just close this as "Invalid". ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 14:47:49 2009 From: report at bugs.python.org (Georg Brandl) Date: Fri, 06 Feb 2009 13:47:49 +0000 Subject: [issue2527] Pass a namespace to timeit In-Reply-To: <1207052027.28.0.27225375953.issue2527@psf.upfronthosting.co.za> Message-ID: <1233928069.5.0.805959036628.issue2527@psf.upfronthosting.co.za> Georg Brandl added the comment: I'm sorry, this should have been another issue. Reassigning to you. ---------- assignee: pitrou -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 14:50:14 2009 From: report at bugs.python.org (Georg Brandl) Date: Fri, 06 Feb 2009 13:50:14 +0000 Subject: [issue5066] IDLE documentation for Unix obsolete/incorrect In-Reply-To: <1232942217.99.0.191249551049.issue5066@psf.upfronthosting.co.za> Message-ID: <1233928214.73.0.108680076672.issue5066@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't know any. But since rst is so lightweight, it is usually not too much of a pain to just copy the text from the browser and reintroduce formatting because you're likely to have to go over and edit the whole content anyway. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 14:52:28 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 13:52:28 +0000 Subject: [issue5158] Document distutils 'depends' option for extensions In-Reply-To: <1233849334.58.0.0898669443765.issue5158@psf.upfronthosting.co.za> Message-ID: <1233928348.69.0.375090732008.issue5158@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: georg.brandl -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 15:16:28 2009 From: report at bugs.python.org (=?utf-8?q?Chema_Cort=C3=A9s?=) Date: Fri, 06 Feb 2009 14:16:28 +0000 Subject: [issue5169] Default hash not equal to id on AMD Sempron In-Reply-To: <1233929788.34.0.870033033845.issue5169@psf.upfronthosting.co.za> Message-ID: <1233929788.34.0.870033033845.issue5169@psf.upfronthosting.co.za> New submission from Chema Cort?s : Sometimes, the default hash for user-defined object is not equal to the id of the object: In [1]: class A: ...: pass In [2]: a=A() In [3]: id(a),hash(a) Out[3]: (3082955212L, -1212012084) The test box has an AMD Sempron, a 64bit CPU archictecture emulating a 32bit one. This following relation can be deduced: hash(a)=id(a)-2**32 ---------- components: Interpreter Core messages: 81269 nosy: chemacortes, jcea severity: normal status: open title: Default hash not equal to id on AMD Sempron type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 16:46:53 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 06 Feb 2009 15:46:53 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1233935213.82.0.720947424429.issue5122@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 16:50:08 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Feb 2009 15:50:08 +0000 Subject: [issue5169] Default hash not equal to id on AMD Sempron In-Reply-To: <1233929788.34.0.870033033845.issue5169@psf.upfronthosting.co.za> Message-ID: <1233935408.58.0.0250616789136.issue5169@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I wouldn't qualify this as a bug. hash() doesn't need to be equal to the id() even in the default case. Actually, it may be better for hash() to be equal to id()/4 or id()/8, depending on the standard alignment of the memory allocator. ---------- nosy: +pitrou, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 16:57:31 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 06 Feb 2009 15:57:31 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233935851.1.0.0377952265875.issue4804@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: I see. I had thought your code was for VS2005 (VC8) I have changed the patch to work with VS2005 as well. I don't think we need to worry about VS2003 so much, as I don't think it is an officially supported compiler for the current python versions. Also, the problem with close() et al only started when we ported the code to Visual Studio 2005, and this is the version of VisualStudio that starts to make assertions about its file descriptors. Anyway, I upload an updated version of the patch, which copes with VS2005 as well as VS2008 Added file: http://bugs.python.org/file12953/__pioinfo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 17:01:27 2009 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 06 Feb 2009 16:01:27 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233935213.91.0.578426386285.issue5122@psf.upfronthosting.co.za> Message-ID: Guilherme Polo added the comment: Eric, I noticed you said Fedora 6, so I checked which tcl/tk it includes and apparently it is 8.4.13, is that correct ? I tried using tcl/tk 8.4.13 and I managed to hang it too :) Try running test_tcl followed by test_ttk_guionly with regrtest. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 17:07:12 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 06 Feb 2009 16:07:12 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1233936432.1.0.599861762028.issue5122@psf.upfronthosting.co.za> Eric Smith added the comment: Yes, I have these installed: tcl-8.4.13-3.fc6 tcl-devel-8.4.13-3.fc6 tk-8.4.13-3.fc6 tk-devel-8.4.13-3.fc6 When I run "./python Lib/test/regrtest.py test_tcl test_ttk_guionly", it hangs. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 17:07:47 2009 From: report at bugs.python.org (shamilbi) Date: Fri, 06 Feb 2009 16:07:47 +0000 Subject: [issue5170] logging to file + encoding In-Reply-To: <1233936467.22.0.152712476213.issue5170@psf.upfronthosting.co.za> Message-ID: <1233936467.22.0.152712476213.issue5170@psf.upfronthosting.co.za> New submission from shamilbi : if i configure logging into a file with encoding = 'cp1251' and do logger.debug(u'...') then i get crash with UnicodeError i suggest reimplementing method FileHandler.emit(): ... if isinstance(msg, unicode): stream.write(f % msg) # it works! ... ---------- components: Library (Lib) messages: 81274 nosy: shamilbi severity: normal status: open title: logging to file + encoding type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 17:08:53 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 06 Feb 2009 16:08:53 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233936533.19.0.910568381321.issue4804@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I agree. Please focus on _MSC_VER >= 1400. I'll post new issue about VC6 after this issue will be solved. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 17:12:16 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 06 Feb 2009 16:12:16 +0000 Subject: [issue5170] logging to file + encoding In-Reply-To: <1233936467.22.0.152712476213.issue5170@psf.upfronthosting.co.za> Message-ID: <1233936736.8.0.463965943863.issue5170@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> vsajip nosy: +vsajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 17:18:02 2009 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 06 Feb 2009 16:18:02 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233936432.1.0.599861762028.issue5122@psf.upfronthosting.co.za> Message-ID: Guilherme Polo added the comment: > When I run "./python Lib/test/regrtest.py test_tcl test_ttk_guionly", it > hangs. I have isolated it now: Traceback (most recent call last): File "", line 1, in File "/home/gpolo/python-dev/python-trunk/Lib/lib-tk/Tkinter.py", line 1649, in loadtk self.tk.loadtk() _tkinter.TclError: no display name and no $DISPLAY environment variable >>> Tkinter.Tk() hang! Very nice, much more "solvable" now after getting to know the tcl/tk version. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 17:24:20 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 06 Feb 2009 16:24:20 +0000 Subject: [issue5169] Default hash not equal to id on AMD Sempron In-Reply-To: <1233929788.34.0.870033033845.issue5169@psf.upfronthosting.co.za> Message-ID: <1233937460.25.0.839498414048.issue5169@psf.upfronthosting.co.za> Mark Dickinson added the comment: It looks like this is a platform with sizeof(long) == 4 and sizeof(void *) == 8. Is that right? As Antoine says, I can't see any problem here. Why do you think that hash(a) should be equal to id(a) in this case? Antoine, in what way would id()/4 be better than id()? ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 17:26:04 2009 From: report at bugs.python.org (Akira Kitada) Date: Fri, 06 Feb 2009 16:26:04 +0000 Subject: [issue4010] configure options don't trickle down to distutils In-Reply-To: <1222879433.22.0.765704464081.issue4010@psf.upfronthosting.co.za> Message-ID: <1233937564.23.0.51486845868.issue4010@psf.upfronthosting.co.za> Changes by Akira Kitada : Removed file: http://bugs.python.org/file12868/issue4010.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 17:27:25 2009 From: report at bugs.python.org (Akira Kitada) Date: Fri, 06 Feb 2009 16:27:25 +0000 Subject: [issue4010] configure options don't trickle down to distutils In-Reply-To: <1222879433.22.0.765704464081.issue4010@psf.upfronthosting.co.za> Message-ID: <1233937645.99.0.635574199045.issue4010@psf.upfronthosting.co.za> Akira Kitada added the comment: s/get_config_vars/get_config_var/ ---------- versions: +Python 3.1 Added file: http://bugs.python.org/file12954/issue4010.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 17:32:15 2009 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 06 Feb 2009 16:32:15 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1233937935.37.0.415107400805.issue5122@psf.upfronthosting.co.za> Guilherme Polo added the comment: After "I have isolated it now:", there should be this interactive session (but gmail ate it apparently): >>> import os >>> del os.environ['DISPLAY'] >>> import Tkinter >>> t = Tkinter.Tcl() >>> t.loadtk() Traceback (most recent call last): File "", line 1, in File "/home/gpolo/python-dev/python-trunk/Lib/lib-tk/Tkinter.py", line 1649, in loadtk self.tk.loadtk() _tkinter.TclError: no display name and no $DISPLAY environment variable >>> Tkinter.Tk() hang! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 17:45:58 2009 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 06 Feb 2009 16:45:58 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1233938758.49.0.192519648065.issue5122@psf.upfronthosting.co.za> Guilherme Polo added the comment: Ok, I've found the cause of the problem and the patch attached should solve it but shouldn't be applied! This was just a quick fix I did to confirm what I expected, I will add something more correct later. _tkinter is aware of this deadlock that we are getting (see Tkapp_TkInit), but it is not collaborating to solve it. The problem is avoided if we always use "loadtk" in Tkinter.py instead of using "create" to load tk. ---------- keywords: +patch Added file: http://bugs.python.org/file12955/dont_load_tk_in_tkintercreate.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 17:49:05 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 06 Feb 2009 16:49:05 +0000 Subject: [issue5171] itertools.product docstring missing 'repeat' argument In-Reply-To: <1233938945.33.0.092220516904.issue5171@psf.upfronthosting.co.za> Message-ID: <1233938945.33.0.092220516904.issue5171@psf.upfronthosting.co.za> New submission from Mark Dickinson : The docstring for itertools.product seems to be missing any mention of the repeat keyword argument, in both the trunk and py3k, and the maintenance branches. (The itertools.rst docs are fine, though.) ---------- assignee: rhettinger components: Library (Lib) messages: 81281 nosy: marketdickinson, rhettinger severity: normal status: open title: itertools.product docstring missing 'repeat' argument versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 17:53:36 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Feb 2009 16:53:36 +0000 Subject: [issue5169] Default hash not equal to id on AMD Sempron In-Reply-To: <1233929788.34.0.870033033845.issue5169@psf.upfronthosting.co.za> Message-ID: <1233939216.47.0.236675186409.issue5169@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Because with hash() == id() == address of the PyObject, the hash is always a multiple of 4 or 8 (I think it's 8), so (hash() % dict_or_set_table_size) is non-uniformly distributed in most cases. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 18:06:56 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 06 Feb 2009 17:06:56 +0000 Subject: [issue5169] Default hash not equal to id on AMD Sempron In-Reply-To: <1233929788.34.0.870033033845.issue5169@psf.upfronthosting.co.za> Message-ID: <1233940016.39.0.919771933885.issue5169@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hah. Good point. I'd forgotten about the taking-the-low-order-bits thing. Should probably do some timings (and possibly also number-of- collisions measurements) to find out whether using id() >> 3 actually makes any significant difference (either way) for dicts of objects. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 18:19:38 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Feb 2009 17:19:38 +0000 Subject: [issue4704] Update pybench for python 3.0 In-Reply-To: <1229770440.73.0.84111592631.issue4704@psf.upfronthosting.co.za> Message-ID: <1233940778.57.0.152393635659.issue4704@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch. Added file: http://bugs.python.org/file12956/pybench3.0-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 18:21:28 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Fri, 06 Feb 2009 17:21:28 +0000 Subject: [issue5172] python-dev tracker summary emails contain incorrect "median duration of open issues" information In-Reply-To: <1233940888.36.0.479497649391.issue5172@psf.upfronthosting.co.za> Message-ID: <1233940888.36.0.479497649391.issue5172@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : The weekly tracker summary emails sent to python-dev contain incorrect information. The value for the "median duration of open issues" it reports has recently wrapped around to 0 and started growing from there. Looking at older reports, it's clear that there's a bug in the calculation of this value, since it jumps from a median of several years to a median of one day in the span of one week. ---------- messages: 81285 nosy: exarkun severity: normal status: open title: python-dev tracker summary emails contain incorrect "median duration of open issues" information type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 18:35:54 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 06 Feb 2009 17:35:54 +0000 Subject: [issue4704] Update pybench for python 3.0 In-Reply-To: <1233940778.57.0.152393635659.issue4704@psf.upfronthosting.co.za> Message-ID: <498C74F5.1080902@egenix.com> Marc-Andre Lemburg added the comment: Perfect ! Thanks, Antoine. Please check it in. On 2009-02-06 18:19, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > > Updated patch. > > Added file: http://bugs.python.org/file12956/pybench3.0-3.patch > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > Python-bugs-list mailing list > Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/mal%40egenix.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 18:39:08 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 06 Feb 2009 17:39:08 +0000 Subject: [issue4704] Update pybench for python 3.0 In-Reply-To: <498C74F5.1080902@egenix.com> Message-ID: <498C75BA.6010701@egenix.com> Marc-Andre Lemburg added the comment: On 2009-02-06 18:35, Marc-Andre Lemburg wrote: > Marc-Andre Lemburg added the comment: > > Perfect ! Thanks, Antoine. Please check it in. Well, except for this part that sneaked in: @@ -4,8 +4,6 @@ """ # -# Note: Please keep this module compatible to Python 1.5.2. -# # Tests may include features in later Python versions, but these # should then be embedded in try-except clauses in the configuration # module Setup.py. It's ok to bump this to Python 2.3, though :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 19:07:58 2009 From: report at bugs.python.org (Matthew Woodcraft) Date: Fri, 06 Feb 2009 18:07:58 +0000 Subject: [issue5173] "What's new" claims StandardError was removed in 2.6 In-Reply-To: <1233943678.15.0.95933788083.issue5173@psf.upfronthosting.co.za> Message-ID: <1233943678.15.0.95933788083.issue5173@psf.upfronthosting.co.za> New submission from Matthew Woodcraft : In the current "What's New In Python 3.0" documentation, under "Changes To Exceptions", it is claimed that the removal of StandardError is "in 2.6 already". But according to the 2.6.1 documentation, StandardError is still there in its usual place. ---------- assignee: georg.brandl components: Documentation messages: 81288 nosy: georg.brandl, mjwpp severity: normal status: open title: "What's new" claims StandardError was removed in 2.6 versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 19:11:14 2009 From: report at bugs.python.org (Georg Brandl) Date: Fri, 06 Feb 2009 18:11:14 +0000 Subject: [issue5173] "What's new" claims StandardError was removed in 2.6 In-Reply-To: <1233943678.15.0.95933788083.issue5173@psf.upfronthosting.co.za> Message-ID: <1233943874.21.0.427906229344.issue5173@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r69372. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 19:21:30 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 06 Feb 2009 18:21:30 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1233944490.92.0.243598704624.issue5122@psf.upfronthosting.co.za> Eric Smith added the comment: The patch does solve the problem for me. It no longer hangs when running either: ./python Lib/test/regrtest.py test_tcl test_ttk_guionly or: ./python Lib/test/regrtest.py ------------- ... test_traceback test_transformer test_ttk_guionly test_ttk_guionly skipped -- ttk not available: Calling Tk_Init again after a previous call failed might deadlock test_ttk_textonly test_tuple ... ------------- Thanks for tracking this down. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 19:30:59 2009 From: report at bugs.python.org (Forest Wilkinson) Date: Fri, 06 Feb 2009 18:30:59 +0000 Subject: [issue1194378] sendmsg() and recvmsg() for C socket module Message-ID: <1233945059.41.0.812150592703.issue1194378@psf.upfronthosting.co.za> Changes by Forest Wilkinson : ---------- nosy: +forest _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 20:03:19 2009 From: report at bugs.python.org (Paul Moore) Date: Fri, 06 Feb 2009 19:03:19 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1233946999.93.0.859582092029.issue5135@psf.upfronthosting.co.za> Paul Moore added the comment: Here's an updated patch. I've reverted to the name "simplegeneric" and documented the limitation around ABCs (I've tried to give an explanation why it's there, as well as a hint on now to work around the limitation - let me know if I'm overdoing it, or the text needs rewording). I've also fixed the wrapper to use update_wrapper to copy the attributes. That way, there's no duplication. Added file: http://bugs.python.org/file12957/generic.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 20:21:08 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 06 Feb 2009 19:21:08 +0000 Subject: [issue5169] Default hash not equal to id on AMD Sempron In-Reply-To: <1233929788.34.0.870033033845.issue5169@psf.upfronthosting.co.za> Message-ID: <1233948068.25.0.749030423905.issue5169@psf.upfronthosting.co.za> Mark Dickinson added the comment: Some preliminary timings indicate that it may well be worth replacing 'return (long)p' with 'return (long)p >> 3' in _Py_HashPointer (in Objects/object.c): I'm getting a 10% speedup in dict-building and dict-lookup for dicts of plain objects. I'll open a separate issue for this and post details of the timings. In the meantime, I think this issue can be closed as invalid: there's no reason that id(a) and hash(a) have to be equal. (chemacortes, if you disagree then please do comment; we'll still see the comments even though the issue is closed). ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 20:34:50 2009 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 06 Feb 2009 19:34:50 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1233948890.11.0.421699578168.issue5122@psf.upfronthosting.co.za> Guilherme Polo added the comment: Here is a better patch, for some definition of better. It syncs the failed attempt to load tk that may occur in _tkinter.Tkapp_TkInit, _tkinter.Tcl_AppInit and tkappinit.Tcl_AppInit. And that is done only for tk < 8.4.14 now. Said that, I'm a bit worried about the (new macro) TK_VERSION_HEX in _tkinter and tkappinit, maybe it is time to add a _tkinter.h ? Added file: http://bugs.python.org/file12958/checking_for_failed_tk_load.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 20:39:47 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 06 Feb 2009 19:39:47 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1233949187.39.0.582613321705.issue5139@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If you semi-optimize the implementation by pre-cancelling out the larger of the denominators, then these functions would be justified as more efficient than the naive use of the factorial function indicated by the formulas. Possible shorter names: ncombos nperms ncombos_with_reps I would prefer that these and other integer-only functions be in a separate imath module. I have the impression that this was not done with the first because "we can't have a module with just one function", but these would make at least 4 or 5, which is enough for a module. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 20:42:17 2009 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 06 Feb 2009 19:42:17 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1233949337.99.0.232485684283.issue5122@psf.upfronthosting.co.za> Guilherme Polo added the comment: Any chance you can look at the proposed patch, Martin ? I found out that it was you who reported this deadlock back then, so you might want to review the patch. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 20:58:28 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 06 Feb 2009 19:58:28 +0000 Subject: [issue5172] python-dev tracker summary emails contain incorrect "median duration of open issues" information In-Reply-To: <1233940888.36.0.479497649391.issue5172@psf.upfronthosting.co.za> Message-ID: <1233950308.12.0.807781191257.issue5172@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This should be reported to the meta-tracker: http://psf.upfronthosting.co.za/roundup/meta/ ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 21:02:53 2009 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 06 Feb 2009 20:02:53 +0000 Subject: [issue5170] logging to file + encoding In-Reply-To: <1233936467.22.0.152712476213.issue5170@psf.upfronthosting.co.za> Message-ID: <1233950573.06.0.550412903061.issue5170@psf.upfronthosting.co.za> Vinay Sajip added the comment: The attached test script and output file appear to show logging working correctly. The script writes a log message including the Cyrillic text ?????? ???? (Good morning) to a CP1251-encoded file, test.log. Opening this file in a Unicode-aware editor (I used BabelPad, http://www.babelstone.co.uk/Software/BabelPad.html) appears to show the Cyrillic characters correctly: see the screenshot at http://img5.imageshack.us/img5/799/cp1251zw2.png Marking as pending. Can you give more specifics about your problem? ---------- resolution: -> works for me status: open -> pending Added file: http://bugs.python.org/file12959/encoding-test.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 21:11:15 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 06 Feb 2009 20:11:15 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1233951075.93.0.064531450734.issue5122@psf.upfronthosting.co.za> Eric Smith added the comment: The second patch (checking_for_failed_tk_load.diff) also works for me. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 21:57:43 2009 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 06 Feb 2009 20:57:43 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1233953863.77.0.295386333878.issue5122@psf.upfronthosting.co.za> Guilherme Polo added the comment: Found a place still out of sync, it is fixed on this new patch. To reproduce the problem with the previous patch try this: import os del os.environ['DISPLAY'] import Tkinter Tkinter.Tk() Tkinter.Tcl().loadtk() # should hang now (with a proper tk version) Added file: http://bugs.python.org/file12960/checking_for_failed_tk_load-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 22:11:27 2009 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 06 Feb 2009 21:11:27 +0000 Subject: [issue2472] Fixed block ordering code in compiler.pyassem In-Reply-To: <1206360580.92.0.370388118897.issue2472@psf.upfronthosting.co.za> Message-ID: <1233954687.11.0.349316644366.issue2472@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Thanks Antoine. For some reason I don't think I ever got an email about this issue. I did some further cleanups and optimizations. Committed as SVN rev 69373. Lib/compiler is still in need of some fixing since it doesn't handle decorators and some other new language features. I'll try to keep at it. ---------- assignee: -> nascheme resolution: -> accepted stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 22:50:40 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 06 Feb 2009 21:50:40 +0000 Subject: [issue5150] IDLE to support reindent.py In-Reply-To: <1233736664.4.0.115705275626.issue5150@psf.upfronthosting.co.za> Message-ID: <1233957040.09.0.0783883775572.issue5150@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If the interactive interpreter did not require blank lines within blocks to have at least one 'trailing' space to avoid prematurely ending the block (as when copy from editor window and paste), IDLE could automatically rstrip lines. Given that that should not be done, a menu item would be nice. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 22:51:10 2009 From: report at bugs.python.org (Georg Brandl) Date: Fri, 06 Feb 2009 21:51:10 +0000 Subject: [issue5166] ElementTree and minidom don't prevent creation of not well-formed XML In-Reply-To: <1233918825.25.0.360851750395.issue5166@psf.upfronthosting.co.za> Message-ID: <1233957070.94.0.448931296043.issue5166@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> effbot nosy: +effbot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 22:53:45 2009 From: report at bugs.python.org (Georg Brandl) Date: Fri, 06 Feb 2009 21:53:45 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1233957225.55.0.886443323011.issue4965@psf.upfronthosting.co.za> Georg Brandl added the comment: I've experimented with a style variant that keeps the sidebar fixed on the left side, however I did not manage to get it to show a separate scrollbar. Maybe I was just stupid though. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 22:57:53 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 06 Feb 2009 21:57:53 +0000 Subject: [issue5156] IDLE exits with UnicodeDecodeError on Ctrl+Space In-Reply-To: <1233828164.4.0.121104337122.issue5156@psf.upfronthosting.co.za> Message-ID: <1233957473.35.0.888238766981.issue5156@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On IDLE 3.0, win xp, cntl-space brings up a selection box with known names to select. What was your actual input? ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 23:02:30 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 06 Feb 2009 22:02:30 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1233957750.29.0.900173477667.issue5122@psf.upfronthosting.co.za> Eric Smith added the comment: With the second patch installed, your code snippet does indeed hang for me. With the third patch installed, I get: [trunk]$ ./python Python 2.7a0 (trunk:69369M, Feb 6 2009, 14:59:32) [GCC 4.1.2 20070626 (Red Hat 4.1.2-13)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> del os.environ['DISPLAY'] >>> import Tkinter Tkinter.Tk() >>> Tkinter.Tk() Traceback (most recent call last): File "", line 1, in File "/root/python/trunk/Lib/lib-tk/Tkinter.py", line 1643, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable >>> Tkinter.Tcl().loadtk() # should hang now (with a proper tk version) Traceback (most recent call last): File "", line 1, in File "/root/python/trunk/Lib/lib-tk/Tkinter.py", line 1649, in loadtk self.tk.loadtk() _tkinter.TclError: Calling Tk_Init again after a previous call failed might deadlock Which I assume is the expected behavior. Also with the third patch installed, the regrtest's all pass. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 23:03:09 2009 From: report at bugs.python.org (Roumen Petrov) Date: Fri, 06 Feb 2009 22:03:09 +0000 Subject: [issue5161] wrong paths for ctypes cleanup In-Reply-To: <1233881144.37.0.958366280661.issue5161@psf.upfronthosting.co.za> Message-ID: <1233957789.66.0.579827237691.issue5161@psf.upfronthosting.co.za> Roumen Petrov added the comment: Exactly but I don't open issue as I address it in issue5060 . ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 23:08:28 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 06 Feb 2009 22:08:28 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1233958108.88.0.988757641202.issue4965@psf.upfronthosting.co.za> Ezio Melotti added the comment: Something like this maybe? div.sphinxsidebar { float: left; width: 230px; height: 100%; font-size: 90% /* add these: */ margin-top: 30px; height: 100%; overflow: auto; position: fixed; } ... div.related { background-color: #133f52; color: #fff; width: 100%; line-height: 30px; font-size: 90%; /* add this: */ position: fixed; } I tested it only with Firefox3 and the Webdeveloper plugin and it looks ok. "position: fixed" doesn't work on IE6 and there could be other problems, but it may be a good starting point. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 23:09:22 2009 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Fri, 06 Feb 2009 22:09:22 +0000 Subject: [issue5169] Default hash not equal to id on AMD Sempron In-Reply-To: <1233929788.34.0.870033033845.issue5169@psf.upfronthosting.co.za> Message-ID: <1233958162.22.0.388795047901.issue5169@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: The issue is trivially reproductible in any 32 bits platform, simply allocating objects until you go up the 2GB mark. Since __hash__() wants to take advantage of every bit in a 32 bit platform, and we don't have unsigned integers in python, I vote for "invalid" too. There is no promise of "id(obj)==hash(obj)": you can overload "__hash__()" anytime, and that is already done for strings, integers, tuples, etc. The speed advantage is interesting, though. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 23:16:20 2009 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 06 Feb 2009 22:16:20 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233957750.29.0.900173477667.issue5122@psf.upfronthosting.co.za> Message-ID: Guilherme Polo added the comment: > Eric Smith added the comment: > . > . > Which I assume is the expected behavior. Yes it is expected. > > Also with the third patch installed, the regrtest's all pass. > Very nice. And Eric, thanks for the patience and for testing them all. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 23:19:29 2009 From: report at bugs.python.org (Calvin Spealman) Date: Fri, 06 Feb 2009 22:19:29 +0000 Subject: [issue5174] xmlrpclib docs include incorrect file closing In-Reply-To: <1233958767.06.0.465205017873.issue5174@psf.upfronthosting.co.za> Message-ID: <1233958767.06.0.465205017873.issue5174@psf.upfronthosting.co.za> New submission from Calvin Spealman : The following example from the xmlrpclib docs has an obviously erronous call to close() after the actual return. (http://docs.python.org/library/xmlrpclib.html) def python_logo(): handle = open("python_logo.jpg") return xmlrpclib.Binary(handle.read()) handle.close() The patch included also makes the whitespace PEP-8 compliant. ---------- assignee: georg.brandl components: Documentation files: xmlrpc_doc.patch keywords: patch messages: 81309 nosy: georg.brandl, ironfroggy severity: normal status: open title: xmlrpclib docs include incorrect file closing versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file12961/xmlrpc_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 23:20:03 2009 From: report at bugs.python.org (Calvin Spealman) Date: Fri, 06 Feb 2009 22:20:03 +0000 Subject: [issue5174] xmlrpclib docs include incorrect file closing In-Reply-To: <1233958767.06.0.465205017873.issue5174@psf.upfronthosting.co.za> Message-ID: <1233958803.28.0.929531757537.issue5174@psf.upfronthosting.co.za> Calvin Spealman added the comment: The patch attached uses a with statement for proper file closing in the examples. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 23:25:41 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Feb 2009 22:25:41 +0000 Subject: [issue4704] Update pybench for python 3.0 In-Reply-To: <498C75BA.6010701@egenix.com> Message-ID: <1233959128.10020.0.camel@fsol> Antoine Pitrou added the comment: > It's ok to bump this to Python 2.3, though :-) The current version only works with 3.x, due to the use of the print function with the "end" keyword argument. Should it be fixed? Regards Antoine. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 23:27:29 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Feb 2009 22:27:29 +0000 Subject: [issue2472] Fixed block ordering code in compiler.pyassem In-Reply-To: <1233954687.11.0.349316644366.issue2472@psf.upfronthosting.co.za> Message-ID: <1233959225.10020.1.camel@fsol> Antoine Pitrou added the comment: > Thanks Antoine. For some reason I don't think I ever got an email about > this issue. I did some further cleanups and optimizations. Committed > as SVN rev 69373. Thanks! If I knew you hadn't received any notification I would have tried to ping you... I'm glad this is finally accepted :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 23:44:11 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 06 Feb 2009 22:44:11 +0000 Subject: [issue5139] Add combinatoric counting functions to the math module. In-Reply-To: <1233637067.11.0.307954732355.issue5139@psf.upfronthosting.co.za> Message-ID: <1233960251.59.0.605035503616.issue5139@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Ezio, itertools currently has combinations with and without > *replacement*, not repetition. > I think you're talking about something slightly different > (repetitions in the *iterable*, rather than allowing > repeated *drawings* of the same element). The two terms should be interchangeable (I just used repetitions because is the one I learnt at school). > itertools already has 'permutations_with_replacement': it's > called 'product'. > combinations(it, r): select r elements from it, no replacement, no order > permutations(it, r): select r elements, no replacement, order is relevant > combinations_with_replacement(it, r): replacement, no order > product(it, repeat=r): replacement, order Isn't this name (product) not coherent with the others? Also is not immediately clear to me what a function named 'product' is supposed to do (but probably it is too late to change it now). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 23:49:07 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 06 Feb 2009 22:49:07 +0000 Subject: [issue4704] Update pybench for python 3.0 In-Reply-To: <1233959128.10020.0.camel@fsol> Message-ID: <498CBE24.90301@egenix.com> Marc-Andre Lemburg added the comment: On 2009-02-06 23:25, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > >> It's ok to bump this to Python 2.3, though :-) > > The current version only works with 3.x, due to the use of the print > function with the "end" keyword argument. > Should it be fixed? If possible, pybench should work unchanged in both Python 2.x and 3.x. If the only change needed for this is a new print function, then it's better to replace all print function calls with a new helper function: def print3(*args, end='\r'): sys.stdout.write(' '.join(*args)) sys.stdout.write(end) sys.stdout.flush() (untested, but the idea should be clear) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 00:34:19 2009 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 06 Feb 2009 23:34:19 +0000 Subject: [issue1731706] tkinter memory leak problem Message-ID: <1233963259.11.0.0682895431288.issue1731706@psf.upfronthosting.co.za> Guilherme Polo added the comment: Committed now. trunk: r69376, r69377 release26-maint: r69378 py3k: r69380 release30-maint: r69381 (hand-merged, as you may notice I forgot to split the patch in two again in py3k) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 00:37:46 2009 From: report at bugs.python.org (Lisandro Dalcin) Date: Fri, 06 Feb 2009 23:37:46 +0000 Subject: [issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError? In-Reply-To: <1233963466.4.0.0489916221286.issue5175@psf.upfronthosting.co.za> Message-ID: <1233963466.4.0.0489916221286.issue5175@psf.upfronthosting.co.za> New submission from Lisandro Dalcin : At Objects/longobject.c, in almost all cases OverflowError is raised when a unsigned integral is requested from a negative PyLong. However, this one breaks the rules: int _PyLong_AsByteArray(PyLongObject* v, unsigned char* bytes, size_t n, int little_endian, int is_signed) { <...> if (!is_signed) { PyErr_SetString(PyExc_TypeError, "can't convert negative long to unsigned"); return -1; } <...> } ---------- components: Interpreter Core messages: 81316 nosy: dalcinl severity: normal status: open title: negative PyLong -> C unsigned integral, TypeError or OverflowError? type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 00:42:29 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 06 Feb 2009 23:42:29 +0000 Subject: [issue5164] backport distutils 3.x changes into 2.7 when appliabl In-Reply-To: <1233911195.36.0.922992904897.issue5164@psf.upfronthosting.co.za> Message-ID: <1233963749.7.0.626262155866.issue5164@psf.upfronthosting.co.za> Martin v. L?wis added the comment: What specific changes do you have in mind? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 00:49:49 2009 From: report at bugs.python.org (Collin Winter) Date: Fri, 06 Feb 2009 23:49:49 +0000 Subject: [issue5176] Special-case string formatting in BINARY_MODULO implementation In-Reply-To: <1233964189.56.0.504237250684.issue5176@psf.upfronthosting.co.za> Message-ID: <1233964189.56.0.504237250684.issue5176@psf.upfronthosting.co.za> New submission from Collin Winter : This patch speeds up the string formatting % operator by avoiding the unnecessary indirection in PyNumber_Remainder(). This particularly benefits templating systems that do a lot of string formatting via %. Performance tested with gcc 4.3.1 x86_64 on Linux 2.6.18: 2to3: Min: 22.443 -> 22.306: 0.61% faster Avg: 22.465 -> 22.324: 0.63% faster Django: Min: 0.598 -> 0.591: 1.24% faster Avg: 0.601 -> 0.595: 1.03% faster Spitfire [1]: Min: 0.752 -> 0.717: 4.91% faster Avg: 0.754 -> 0.719: 4.83% faster The Django test renders a 150x150 cell table 100 times. The Spitfire test renders a 1000x1000 cell table 100 times. The 2to3 test translates all of 2to3 with `-f all` five times. There is no significant impact on PyBench. Less important code like the pure-Python pickle implementation also shows an improvement: Pickling: Min: 6.680 -> 6.535: 2.22% faster Avg: 6.740 -> 6.576: 2.50% faster This is pickling a list of 40000 dicts 100 times. This does not impact unpickling. About the patch: I tested various combinations of PyString_Check and PyString_CheckExact and what you see in the patch demonstrated the best performance across all benchmarks. I also tested changing the definition of PyString_Check to include a short-circuit on PyString_CheckExact, but that did not provide a consistent benefit. [1] - http://code.google.com/p/spitfire/ ---------- assignee: jyasskin components: Interpreter Core files: faster_modulo.patch keywords: needs review, patch, patch messages: 81319 nosy: collinwinter, jyasskin severity: normal status: open title: Special-case string formatting in BINARY_MODULO implementation type: performance versions: Python 2.7 Added file: http://bugs.python.org/file12962/faster_modulo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 00:50:34 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 06 Feb 2009 23:50:34 +0000 Subject: [issue5134] Compiler warnings in sqlite module In-Reply-To: <1233912676.41.0.866793885882.issue5134@psf.upfronthosting.co.za> Message-ID: <498CCB35.4080006@v.loewis.de> Martin v. L?wis added the comment: > My approach for disabling the > warnings in the code has (to me) two advantages: What specific file would you put these pragmas into? Are you perhaps proposing to change upstream code? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 00:52:02 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 06 Feb 2009 23:52:02 +0000 Subject: [issue5164] backport distutils 3.x changes into 2.7 when appliabl In-Reply-To: <1233911195.36.0.922992904897.issue5164@psf.upfronthosting.co.za> Message-ID: <1233964322.03.0.162011038269.issue5164@psf.upfronthosting.co.za> Tarek Ziad? added the comment: PEP8 : - removing space between function names and () like: function () -> function() - function(arg1, arg2, arg3) becomes function(arg1, arg2, arg3) - remove the usage of string.translate, type(foo) is StringType etc.. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 00:57:53 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 06 Feb 2009 23:57:53 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1233964673.18.0.997263827668.issue4804@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think the comment (an invalid fd would be a C program bug) misrepresents the facts. Please don't check it in as-is. An invalid file descriptor is *not* assertable. The authority on file descriptors, the POSIX standard, specifies for, say, write(2) [...] Otherwise, -1 shall be returned and errno set to indicate the error. [...] [EBADF] The fildes argument is not a valid file descriptor open for writing. This is consistent throughout the entire API: the behavior for invalid file descriptors is *not* undefined, and not even implementation-defined. If the CRT would conform to the relevant, long-existing specifications it tries to emulate, it would just set errno to EBADF, and be done. There should be a global declaration of _Py_verify_fd. I would also suggest that it becomes a constant macro unless _MSC_VER is defined. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 01:05:38 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 07 Feb 2009 00:05:38 +0000 Subject: [issue5168] shutil.copystat does not copy the "hidden" flag on windows In-Reply-To: <1233926318.17.0.887740362056.issue5168@psf.upfronthosting.co.za> Message-ID: <1233965138.65.0.296146966685.issue5168@psf.upfronthosting.co.za> Martin v. L?wis added the comment: It's neither a bug nor a feature. It's simply not possible to copy the hidden flag (or system flag, for that matter), since there is no API for doing so. copystat only copies Unix attributes. If you were to copy the hidden flag, you would also have to copy the read-only flag, the access control list, and possible alternative file streams. You better use the CopyFile API function of Windows for that. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 01:13:04 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 07 Feb 2009 00:13:04 +0000 Subject: [issue3986] removed string and type usage from distutils.cmd [patch] In-Reply-To: <1222599260.36.0.588546522414.issue3986@psf.upfronthosting.co.za> Message-ID: <1233965584.39.0.137389497067.issue3986@psf.upfronthosting.co.za> Tarek Ziad? added the comment: done in r69385 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 01:16:48 2009 From: report at bugs.python.org (Neil Schemenauer) Date: Sat, 07 Feb 2009 00:16:48 +0000 Subject: [issue1544277] python compiler support for with stmt Message-ID: <1233965808.12.0.0279488826291.issue1544277@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Looks like this has already been fixed in SVN rev 53575. ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 01:23:55 2009 From: report at bugs.python.org (Lorenzo M. Catucci) Date: Sat, 07 Feb 2009 00:23:55 +0000 Subject: [issue4471] IMAP4 missing support for starttls In-Reply-To: <1228062796.45.0.215183772699.issue4471@psf.upfronthosting.co.za> Message-ID: <1233966235.68.0.32739872727.issue4471@psf.upfronthosting.co.za> Lorenzo M. Catucci added the comment: As the tests are new, I hope sending the real file is the right way to proceed. Added file: http://bugs.python.org/file12963/test_imapnet.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 01:24:37 2009 From: report at bugs.python.org (Lorenzo M. Catucci) Date: Sat, 07 Feb 2009 00:24:37 +0000 Subject: [issue4470] smtplib SMTP_SSL not working. In-Reply-To: <1228062214.03.0.955455415588.issue4470@psf.upfronthosting.co.za> Message-ID: <1233966277.65.0.0814573747135.issue4470@psf.upfronthosting.co.za> Changes by Lorenzo M. Catucci : Added file: http://bugs.python.org/file12964/test_smtpnet.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 01:25:03 2009 From: report at bugs.python.org (Lorenzo M. Catucci) Date: Sat, 07 Feb 2009 00:25:03 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <1233966303.29.0.173800975924.issue4473@psf.upfronthosting.co.za> Changes by Lorenzo M. Catucci : Added file: http://bugs.python.org/file12965/test_popnet.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 01:25:37 2009 From: report at bugs.python.org (Neil Schemenauer) Date: Sat, 07 Feb 2009 00:25:37 +0000 Subject: [issue1754094] Tighter co_stacksize computation in stackdepth_walk Message-ID: <1233966337.93.0.842120631019.issue1754094@psf.upfronthosting.co.za> Changes by Neil Schemenauer : ---------- assignee: -> nascheme nosy: +nascheme _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 01:26:20 2009 From: report at bugs.python.org (Lorenzo M. Catucci) Date: Sat, 07 Feb 2009 00:26:20 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <1233966380.76.0.982621215753.issue4473@psf.upfronthosting.co.za> Changes by Lorenzo M. Catucci : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 01:31:13 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 07 Feb 2009 00:31:13 +0000 Subject: [issue5164] backport distutils 3.x changes into 2.7 when appliabl In-Reply-To: <1233964322.03.0.162011038269.issue5164@psf.upfronthosting.co.za> Message-ID: <498CD378.6070309@v.loewis.de> Martin v. L?wis added the comment: Hmm. Ok. I was hoping you could point to a revision number... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 01:49:22 2009 From: report at bugs.python.org (Lorenzo M. Catucci) Date: Sat, 07 Feb 2009 00:49:22 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <1233967762.87.0.149099373616.issue4473@psf.upfronthosting.co.za> Lorenzo M. Catucci added the comment: There is a problem I forgot to state with test_anonlogin: since I try and test both SSL and starttls, the DoS checker at cmu kicks in and refuse the login attempt in PopSSLTest. Since I'd rather avoid cheating, I'm leaning to try logging in as SomeUser, and expecting a failure in both cases. Comments? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 01:59:03 2009 From: report at bugs.python.org (Neil Schemenauer) Date: Sat, 07 Feb 2009 00:59:03 +0000 Subject: [issue999042] Compiler module doesn't handle global statement correctly Message-ID: <1233968343.19.0.405092351877.issue999042@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Fixed in SVN rev 69394 (finally). This was done by having the symbol table differentiate between explicit and implicit globals. ---------- assignee: jhylton -> nascheme nosy: +nascheme resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 02:00:38 2009 From: report at bugs.python.org (Neil Schemenauer) Date: Sat, 07 Feb 2009 01:00:38 +0000 Subject: [issue999444] compiler module doesn't support unicode characters in laiter Message-ID: <1233968438.88.0.0630878895815.issue999444@psf.upfronthosting.co.za> Changes by Neil Schemenauer : ---------- assignee: jhylton -> nascheme nosy: +nascheme _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 02:01:08 2009 From: report at bugs.python.org (Neil Schemenauer) Date: Sat, 07 Feb 2009 01:01:08 +0000 Subject: [issue5064] compiler.parse raises SyntaxErrors without line number information In-Reply-To: <1232940344.37.0.615917855536.issue5064@psf.upfronthosting.co.za> Message-ID: <1233968468.63.0.596116766839.issue5064@psf.upfronthosting.co.za> Changes by Neil Schemenauer : ---------- assignee: -> nascheme nosy: +nascheme _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 02:02:24 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 07 Feb 2009 01:02:24 +0000 Subject: [issue4792] PythonCmd in Modules/_tkinter.c should use the given "interp" parameter In-Reply-To: <1230737398.34.0.470687906349.issue4792@psf.upfronthosting.co.za> Message-ID: <1233968544.2.0.381486551009.issue4792@psf.upfronthosting.co.za> Guilherme Polo added the comment: Another way to reproduce it (tested using debug build): Python 2.7a0 (trunk:69375:69376M, Feb 6 2009, 20:27:09) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Tkinter >>> Tkinter.Tk() >>> Tkinter.Tk() # close both windows now, get a segfault _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 02:04:18 2009 From: report at bugs.python.org (Lorenzo M. Catucci) Date: Sat, 07 Feb 2009 01:04:18 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <1233968658.6.0.352452231873.issue4473@psf.upfronthosting.co.za> Lorenzo M. Catucci added the comment: I'm enclosing the expected-failure version of test_popnet. It's much simpler to talk and comment about something you can see! Added file: http://bugs.python.org/file12966/test_popnet.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 02:53:11 2009 From: report at bugs.python.org (Jeffrey Yasskin) Date: Sat, 07 Feb 2009 01:53:11 +0000 Subject: [issue5176] Special-case string formatting in BINARY_MODULO implementation In-Reply-To: <1233964189.56.0.504237250684.issue5176@psf.upfronthosting.co.za> Message-ID: <1233971591.18.0.60199775894.issue5176@psf.upfronthosting.co.za> Jeffrey Yasskin added the comment: I think this is only valid when PyString_CheckExact is true. A subclass could override __mod__, right? I'm somewhat interested to see how a primarily-numeric benchmark responds to this patch. I'd expect it to get very slightly slower for % operations. Probably, given that there's an indirect call in the way, the extra test would hide in the noise, but it's worth checking. What's a good numeric benchmark suite? `time ./python Lib/test/test_decimal.py`? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 03:35:27 2009 From: report at bugs.python.org (Brett Cannon) Date: Sat, 07 Feb 2009 02:35:27 +0000 Subject: [issue3652] Remove DeprecationWarning in _warnings about 'line' In-Reply-To: <1219453990.4.0.253900549478.issue3652@psf.upfronthosting.co.za> Message-ID: <1233974127.42.0.0941058017787.issue3652@psf.upfronthosting.co.za> Brett Cannon added the comment: Here is a patch to remove the DeprecationWarning. ---------- keywords: +patch Added file: http://bugs.python.org/file12967/issue3652.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 05:41:35 2009 From: report at bugs.python.org (=?utf-8?q?Chema_Cort=C3=A9s?=) Date: Sat, 07 Feb 2009 04:41:35 +0000 Subject: [issue5169] Default hash not equal to id on AMD Sempron In-Reply-To: <1233948068.25.0.749030423905.issue5169@psf.upfronthosting.co.za> Message-ID: <6ffdb0b60902062041q65845716hfeda06e20b7d1807@mail.gmail.com> Chema Cort?s added the comment: I also agree to close this bug as invalid. Indeed, there is not any reason to make equal id(a) and hash(a), but the description of "hashable" object from the documentation (but this is a different issue). 'hash' and 'id' returns the same-wordsize integer (32bit): 'id' as unsigned long (Py_uintptr_t), and 'hash' as signed long casted from 'id'. Thanks for your time, Chema _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 09:03:01 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 07 Feb 2009 08:03:01 +0000 Subject: [issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError? In-Reply-To: <1233963466.4.0.0489916221286.issue5175@psf.upfronthosting.co.za> Message-ID: <1233993781.48.0.00341848390123.issue5175@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> marketdickinson nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 11:50:39 2009 From: report at bugs.python.org (Jan) Date: Sat, 07 Feb 2009 10:50:39 +0000 Subject: [issue1528074] difflib.SequenceMatcher.find_longest_match() wrong result Message-ID: <1234003839.15.0.615749802724.issue1528074@psf.upfronthosting.co.za> Jan added the comment: hi all, just got bitten by this, so i took the time to reiterate the issue. according to the docs: http://docs.python.org/library/difflib.html find_longest_match() should return the longest matching string: "If isjunk was omitted or None, find_longest_match() returns (i, j, k) such that a[i:i+k] is equal to b[j:j+k], where alo <= i <= i+k <= ahi and blo <= j <= j+k <= bhi. For all (i', j', k') meeting those conditions, the additional conditions k >= k', i <= i', and if i == i', j <= j' are also met. In other words, of all maximal matching blocks, return one that starts earliest in a, and of all those maximal matching blocks that start earliest in a, return the one that starts earliest in b." but after a couple of hours debugging i finally convinced myself that the bug was in the library ... and i ended up here :) any ideas on how to work around this bug/feature, and just get the longest matching string ? (from a normal/newbie user perspective, that is, without patching the C++ library code and recompiling?) from the comments (which i couldn't follow entirely), does it use some concept of popularity that is not exposed by the API ? How is "popularity" defined ? many thanks! - jan ps.: using ubuntu's python 2.5.2 ps2.: and example of a string pair where the issue shows up: s1='Floor Box SystemsFBS Floor Box Systems - Manufacturer & supplier of FBS floor boxes, electrical ... experience, FBS Floor Box Systems continue ... raceways, floor box. ...www.floorboxsystems.com' s2='FBS Floor Box SystemsFBS Floor Box Systems - Manufacturer & supplier of FBS floor boxes, electrical floor boxes, wood floor box, concrete floor box, surface mount floor box, raised floor ...www.floorboxsystems.com' ---------- nosy: +janpf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 13:21:29 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 07 Feb 2009 12:21:29 +0000 Subject: [issue5174] xmlrpclib docs include incorrect file closing In-Reply-To: <1233958767.06.0.465205017873.issue5174@psf.upfronthosting.co.za> Message-ID: <1234009289.28.0.236830722548.issue5174@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r69409. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 15:13:04 2009 From: report at bugs.python.org (Jon Dee) Date: Sat, 07 Feb 2009 14:13:04 +0000 Subject: [issue5177] multiprocessing: SocketListener should use SO_REUSEADDR In-Reply-To: <1234015984.6.0.0454721510443.issue5177@psf.upfronthosting.co.za> Message-ID: <1234015984.6.0.0454721510443.issue5177@psf.upfronthosting.co.za> New submission from Jon Dee : Without this flag it is necessary to wait for e.g. 120s after closing down a 'BaseManager' server before restarting, due to the socket being in the TIME_WAIT state. Example error, which occurs if a server is started, data transmitted down the socket, the server shut down, then restarted: File "/usr/local/lib/python2.6/multiprocessing/connection.py", line 220, in __init__ self._socket.bind(address) File "", line 1, in bind error: [Errno 48] Address already in use I added (locally): self._socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) to SocketListener.__init__, and it resolves the issue. ---------- components: Library (Lib) messages: 81336 nosy: jon_dee severity: normal status: open title: multiprocessing: SocketListener should use SO_REUSEADDR type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 16:03:54 2009 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 07 Feb 2009 15:03:54 +0000 Subject: [issue5177] multiprocessing: SocketListener should use SO_REUSEADDR In-Reply-To: <1234015984.6.0.0454721510443.issue5177@psf.upfronthosting.co.za> Message-ID: <1234019034.1.0.821038647182.issue5177@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 16:46:01 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 07 Feb 2009 15:46:01 +0000 Subject: [issue5134] Compiler warnings in sqlite module In-Reply-To: <1233600780.48.0.187282999033.issue5134@psf.upfronthosting.co.za> Message-ID: <1234021561.26.0.409061006644.issue5134@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Here is a patch that works similar to sqlite3_warnings, but moves all sqlite3.dll settings into a separate property file. Added file: http://bugs.python.org/file12968/sqlite.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 17:58:42 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 07 Feb 2009 16:58:42 +0000 Subject: [issue5137] SystemError when __len__ returns a non-number In-Reply-To: <1233636317.07.0.926088600598.issue5137@psf.upfronthosting.co.za> Message-ID: <1234025922.32.0.660029169406.issue5137@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Here's patch that raises a TypeError like 2.x. ---------- keywords: +needs review, patch nosy: +benjamin.peterson Added file: http://bugs.python.org/file12969/SystemError_bad_len.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 17:58:55 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Feb 2009 16:58:55 +0000 Subject: [issue4704] Update pybench for python 3.0 In-Reply-To: <498CBE24.90301@egenix.com> Message-ID: <1234025972.7982.4.camel@fsol> Antoine Pitrou added the comment: > If possible, pybench should work unchanged in both Python 2.x and 3.x. Ok, the best I can do is to make it 2.6-compatible. For versions before 2.6, stuff like "except Exception as e" does not make compatibility reasonably achievable. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 18:29:55 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Feb 2009 17:29:55 +0000 Subject: [issue4704] Update pybench for python 3.0 In-Reply-To: <1229770440.73.0.84111592631.issue4704@psf.upfronthosting.co.za> Message-ID: <1234027795.95.0.733912431802.issue4704@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r69411, r69412. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 18:33:45 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Feb 2009 17:33:45 +0000 Subject: [issue5177] multiprocessing: SocketListener should use SO_REUSEADDR In-Reply-To: <1234015984.6.0.0454721510443.issue5177@psf.upfronthosting.co.za> Message-ID: <1234028025.45.0.67573439988.issue5177@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 18:43:45 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Feb 2009 17:43:45 +0000 Subject: [issue4753] Faster opcode dispatch on gcc In-Reply-To: <1230325778.98.0.752974375077.issue4753@psf.upfronthosting.co.za> Message-ID: <1234028625.95.0.503588086595.issue4753@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Skip, removing the colon doesn't work if the macro adds code after the colon :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 18:54:21 2009 From: report at bugs.python.org (Neil Schemenauer) Date: Sat, 07 Feb 2009 17:54:21 +0000 Subject: [issue5178] Add content manager for temporary directory In-Reply-To: <1234029261.42.0.975383428204.issue5178@psf.upfronthosting.co.za> Message-ID: <1234029261.42.0.975383428204.issue5178@psf.upfronthosting.co.za> New submission from Neil Schemenauer : I noticed that it would be nice to have a temporary directory context manager while trying to fix a broken unittest. The attached patch provides a pretty minimal implementation. There appears to be lots of unit tests that could use such a thing (just search for "rmtree"). I'm not sure if TemporaryDirectory is the best name. Also, perhaps it should have a __del__ method although that's tricky business. ---------- assignee: ncoghlan files: tempdir.patch keywords: patch messages: 81342 nosy: nascheme, ncoghlan severity: normal stage: patch review status: open title: Add content manager for temporary directory type: feature request Added file: http://bugs.python.org/file12970/tempdir.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 19:42:36 2009 From: report at bugs.python.org (Senthil) Date: Sat, 07 Feb 2009 18:42:36 +0000 Subject: [issue2047] shutil.destinsrc returns wrong result when source path matches beginning of destination path In-Reply-To: <1202451338.42.0.378471584702.issue2047@psf.upfronthosting.co.za> Message-ID: <1234032156.2.0.372756803605.issue2047@psf.upfronthosting.co.za> Senthil added the comment: Sorry to bring this fixed-closed issue back again. I see that this was committed in a hurry. Either, shutil.destinsrc should be Documented, there currently does not exists any documentation to explain what destinsrc is supposed to do, or the function should be made _destinsrc to be internal only. I vote for the second approach of making it _destinsrc as it is used only in the shutil.move(). If no action can be taken on a closed bug, I shall open a new one and also attach a patch to make the method private. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 20:09:44 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 07 Feb 2009 19:09:44 +0000 Subject: [issue2047] shutil.destinsrc returns wrong result when source path matches beginning of destination path In-Reply-To: <1202451338.42.0.378471584702.issue2047@psf.upfronthosting.co.za> Message-ID: <1234033784.27.0.0601953139193.issue2047@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Made private in r69415. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 20:12:13 2009 From: report at bugs.python.org (Senthil) Date: Sat, 07 Feb 2009 19:12:13 +0000 Subject: [issue2047] shutil.destinsrc returns wrong result when source path matches beginning of destination path In-Reply-To: <1234033784.27.0.0601953139193.issue2047@psf.upfronthosting.co.za> Message-ID: <7c42eba10902071112r73fbe72drfbe78ecd4d4bc34e@mail.gmail.com> Senthil added the comment: Thanks for the quick action. Really nice. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 20:27:55 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 07 Feb 2009 19:27:55 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1234034875.44.0.578201346187.issue5122@psf.upfronthosting.co.za> Guilherme Polo added the comment: A bit cleaner patch. Added file: http://bugs.python.org/file12971/protect_tk_loading.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 20:28:01 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 07 Feb 2009 19:28:01 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1234034881.75.0.608163076144.issue5122@psf.upfronthosting.co.za> Changes by Guilherme Polo : Removed file: http://bugs.python.org/file12960/checking_for_failed_tk_load-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 20:28:06 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 07 Feb 2009 19:28:06 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1234034886.29.0.965678789932.issue5122@psf.upfronthosting.co.za> Changes by Guilherme Polo : Removed file: http://bugs.python.org/file12958/checking_for_failed_tk_load.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 21:04:40 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 07 Feb 2009 20:04:40 +0000 Subject: [issue5179] subprocess leaves open fds on construction error In-Reply-To: <1234037080.37.0.0531724857804.issue5179@psf.upfronthosting.co.za> Message-ID: <1234037080.37.0.0531724857804.issue5179@psf.upfronthosting.co.za> New submission from Georg Brandl : The test case below will (on Linux here) eventually quit with "OSError: [Errno 24] Too many open files". I assume that some additional cleaning up is in order. ------------------------------------------------------------------- from subprocess import Popen, PIPE while 1: try: Popen(['nonexisting'], stdout=PIPE, stderr=PIPE) except OSError, err: if err.errno != 2: # ignore "no such file" raise ---------- components: Library (Lib) messages: 81347 nosy: georg.brandl priority: high severity: normal status: open title: subprocess leaves open fds on construction error versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 21:17:56 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 07 Feb 2009 20:17:56 +0000 Subject: [issue5179] subprocess leaves open fds on construction error In-Reply-To: <1234037080.37.0.0531724857804.issue5179@psf.upfronthosting.co.za> Message-ID: <1234037876.63.0.411838030444.issue5179@psf.upfronthosting.co.za> Georg Brandl added the comment: Proposed patch attached. Added file: http://bugs.python.org/file12972/sp-patch.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 22:31:12 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 07 Feb 2009 21:31:12 +0000 Subject: [issue5178] Add content manager for temporary directory In-Reply-To: <1234029261.42.0.975383428204.issue5178@psf.upfronthosting.co.za> Message-ID: <1234042272.7.0.822737224826.issue5178@psf.upfronthosting.co.za> Nick Coghlan added the comment: A __del__ method is definitely desirable (tempfile._TemporaryFileWrapper gives an example of how to cache the relevant globals on the class object to avoid attempting calls to None during interpreter shutdown). The new examples are good, but may give the misleading impression that TemporaryFile can't be used as a context manager (it can, and the file will be closed at the end of the with statement). A second file example showing it being used as a context manager would probably be helpful. There is also at least one existing contextlib based temp_dir context managers that could be replaced given the addition of this (i.e. in test_cmd_line_script.py, "test_dir" could be changed to a class that inherits from tempfile.TemporaryDirectory and overrides __enter__ to invoke realname() on the directory name). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 22:47:53 2009 From: report at bugs.python.org (Eric Smith) Date: Sat, 07 Feb 2009 21:47:53 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1234043273.06.0.0889394107026.issue5122@psf.upfronthosting.co.za> Eric Smith added the comment: protect_tk_loading.diff works for me. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 23:28:55 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Feb 2009 22:28:55 +0000 Subject: [issue5180] 3.1 cannot unpickle 2.7-created pickle In-Reply-To: <1234045735.61.0.752787259691.issue5180@psf.upfronthosting.co.za> Message-ID: <1234045735.61.0.752787259691.issue5180@psf.upfronthosting.co.za> New submission from Antoine Pitrou : The pickle was generated by pybench. You can try to display it by running: ./python Tools/pybench/pybench.py --debug -s 27.bench It fails with the following traceback: Traceback (most recent call last): File "Tools/pybench/pybench.py", line 954, in PyBenchCmdline() File "/home/antoine/py3k/__svn__/Tools/pybench/CommandLine.py", line 349, in __init__ rc = self.main() File "Tools/pybench/pybench.py", line 888, in main bench = pickle.load(f) File "/home/antoine/py3k/__svn__/Lib/pickle.py", line 1335, in load return Unpickler(file, encoding=encoding, errors=errors).load() _pickle.UnpicklingError: bad pickle data ---------- components: Extension Modules messages: 81351 nosy: alexandre.vassalotti, pitrou priority: high severity: normal status: open title: 3.1 cannot unpickle 2.7-created pickle type: behavior versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 23:35:25 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Feb 2009 22:35:25 +0000 Subject: [issue5180] 3.1 cannot unpickle 2.7-created pickle In-Reply-To: <1234045735.61.0.752787259691.issue5180@psf.upfronthosting.co.za> Message-ID: <1234046125.69.0.597593331317.issue5180@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is the pickle file. Added file: http://bugs.python.org/file12973/27.bench _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 23:47:39 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Feb 2009 22:47:39 +0000 Subject: [issue5181] test_urllib failures on the 3.1 buildbots In-Reply-To: <1234046859.35.0.878327501712.issue5181@psf.upfronthosting.co.za> Message-ID: <1234046859.35.0.878327501712.issue5181@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This failure happens on all 3.x buildbots: ====================================================================== ERROR: test_empty_socket (test.test_urllib.urlopen_HttpTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/test/test_urllib.py", line 194, in test_empty_socket self.assertRaises(IOError, urlopen, "http://something") File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/unittest.py", line 344, in failUnlessRaises callableObj(*args, **kwargs) File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/test/test_urllib.py", line 33, in urlopen return opener.open(url) File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line 1444, in open return getattr(self, name)(url) File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line 1618, in open_http return self._open_generic_http(http.client.HTTPConnection, url, data) File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line 1601, in _open_generic_http response = http_conn.getresponse() File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/http/client.py", line 937, in getresponse method=self._method) File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/http/client.py", line 275, in __init__ self.fp = sock.makefile("rb") TypeError: makefile() takes exactly 3 positional arguments (2 given) ====================================================================== ERROR: test_read (test.test_urllib.urlopen_HttpTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/test/test_urllib.py", line 168, in test_read fp = urlopen("http://python.org/") File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/test/test_urllib.py", line 33, in urlopen return opener.open(url) File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line 1444, in open return getattr(self, name)(url) File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line 1618, in open_http return self._open_generic_http(http.client.HTTPConnection, url, data) File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line 1601, in _open_generic_http response = http_conn.getresponse() File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/http/client.py", line 937, in getresponse method=self._method) File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/http/client.py", line 275, in __init__ self.fp = sock.makefile("rb") TypeError: makefile() takes exactly 3 positional arguments (2 given) ====================================================================== ERROR: test_read_bogus (test.test_urllib.urlopen_HttpTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/test/test_urllib.py", line 185, in test_read_bogus self.assertRaises(IOError, urlopen, "http://python.org/") File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/unittest.py", line 344, in failUnlessRaises callableObj(*args, **kwargs) File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/test/test_urllib.py", line 33, in urlopen return opener.open(url) File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line 1444, in open return getattr(self, name)(url) File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line 1618, in open_http return self._open_generic_http(http.client.HTTPConnection, url, data) File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/urllib/request.py", line 1601, in _open_generic_http response = http_conn.getresponse() File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/http/client.py", line 937, in getresponse method=self._method) File "/home/pybot/buildarea/3.x.klose-debian-ppc/build/Lib/http/client.py", line 275, in __init__ self.fp = sock.makefile("rb") TypeError: makefile() takes exactly 3 positional arguments (2 given) ---------- messages: 81353 nosy: krisvale, pitrou priority: critical severity: normal stage: needs patch status: open title: test_urllib failures on the 3.1 buildbots type: behavior versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 23:56:02 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 07 Feb 2009 22:56:02 +0000 Subject: [issue5181] test_urllib failures on the 3.1 buildbots In-Reply-To: <1234046859.35.0.878327501712.issue5181@psf.upfronthosting.co.za> Message-ID: <1234047362.9.0.278732895434.issue5181@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r69416. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 00:40:57 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 07 Feb 2009 23:40:57 +0000 Subject: [issue5181] test_urllib failures on the 3.1 buildbots In-Reply-To: <1234046859.35.0.878327501712.issue5181@psf.upfronthosting.co.za> Message-ID: <1234050057.9.0.324803977862.issue5181@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Now test_docxmlrpc fails and test_httpservers times out... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 00:44:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 07 Feb 2009 23:44:08 +0000 Subject: [issue5181] test_urllib failures on the 3.1 buildbots In-Reply-To: <1234046859.35.0.878327501712.issue5181@psf.upfronthosting.co.za> Message-ID: <1234050248.71.0.238444572686.issue5181@psf.upfronthosting.co.za> Daniel Diniz added the comment: Benjamin, r69416 breaks at least test_docxmlrpc and test_httplib, and hangs on test_httpservers (Gentoo, Debian ppc, OSX buildbots show it). ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 01:27:24 2009 From: report at bugs.python.org (Corey Goldberg) Date: Sun, 08 Feb 2009 00:27:24 +0000 Subject: [issue5160] Intermittant segmentation fault with ctrl-c (threads and queues) In-Reply-To: <1233868312.9.0.87638822413.issue5160@psf.upfronthosting.co.za> Message-ID: <1234052844.46.0.601213870391.issue5160@psf.upfronthosting.co.za> Corey Goldberg added the comment: note: on Windows Vista it is not ery intermittant :) crashes every time the program is stopped. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 01:29:47 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Feb 2009 00:29:47 +0000 Subject: [issue5181] test_urllib failures on the 3.1 buildbots In-Reply-To: <1234046859.35.0.878327501712.issue5181@psf.upfronthosting.co.za> Message-ID: <1234052987.25.0.718759541805.issue5181@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Apparently, I don't know what I'm doing. reverted in r69418. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 01:39:47 2009 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 08 Feb 2009 00:39:47 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1234053586.89.0.9560759204.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-features-2.diff is based on Python 2.6. Bugfix. No new features. Added file: http://bugs.python.org/file12974/issue2636-features-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 02:17:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sun, 08 Feb 2009 01:17:59 +0000 Subject: [issue4631] urlopen returns extra, spurious bytes In-Reply-To: <1228994582.88.0.234313374656.issue4631@psf.upfronthosting.co.za> Message-ID: <1234055879.82.0.822474620716.issue4631@psf.upfronthosting.co.za> Daniel Diniz added the comment: Here's a test (in test_urllib2_localnet) that fails before the patch and passes after, mostly lifted from test_httplib: def test_chunked(self): expected_response = b"hello world" chunked_start = ( b'a\r\n' b'hello worl\r\n' b'1\r\n' b'd\r\n' ) response = [(200, [("Transfer-Encoding", "chunked")], chunked_start)] handler = self.start_server(response) data = self.urlopen("http://localhost:%s/" % handler.port) self.assertEquals(data, expected_response) Output: test test_urllib2_localnet failed -- Traceback (most recent call last): File "~/py3k/Lib/test/test_urllib2_localnet.py", line 390, in test_chunked self.assertEquals(data, expected_response) AssertionError: b'a\r\nhello worl\r\n1\r\nd\r\n' != b'hello world' To allow this test to work, the attached patch also touches FakeHTTPRequestHandler and TestUrlopen.urlopen. Added file: http://bugs.python.org/file12975/test_urllib_chunked.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 02:31:51 2009 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 08 Feb 2009 01:31:51 +0000 Subject: [issue4753] Faster opcode dispatch on gcc In-Reply-To: <1234028625.95.0.503588086595.issue4753@psf.upfronthosting.co.za> Message-ID: <18830.13826.202586.775283@montanaro.dyndns.org> Skip Montanaro added the comment: Antoine> Skip, removing the colon doesn't work if the macro adds code Antoine> after the colon :) When I looked I thought both TARGET and TARGET_WITH_IMPL ended with a colon, but I see that's not the case. How about removing TARGET_WITH_IMPL and just include the goto explicitly? There are only a few instances of the TARGET_WITH_IMPL used. Skip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 02:59:37 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 08 Feb 2009 01:59:37 +0000 Subject: [issue4195] Regression for executing packages In-Reply-To: <1224873899.8.0.177595218059.issue4195@psf.upfronthosting.co.za> Message-ID: <1234058377.54.0.911744755567.issue4195@psf.upfronthosting.co.za> Nick Coghlan added the comment: Incorporated as: 2.7: r69419 3.1: r69421 ---------- resolution: -> accepted stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 04:05:42 2009 From: report at bugs.python.org (Mark Hammond) Date: Sun, 08 Feb 2009 03:05:42 +0000 Subject: [issue5182] str() on memoryview of bytearray failing on py3k In-Reply-To: <1234062342.43.0.913128436395.issue5182@psf.upfronthosting.co.za> Message-ID: <1234062342.43.0.913128436395.issue5182@psf.upfronthosting.co.za> New submission from Mark Hammond : % py30 -c "str(memoryview(bytearray((1,2,3))))" Traceback (most recent call last): File "", line 1, in TypeError: __str__ returned non-string (type bytes) The expected behaviour is that a string representation be returned. ---------- messages: 81363 nosy: mhammond severity: normal status: open title: str() on memoryview of bytearray failing on py3k versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 04:10:17 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Feb 2009 03:10:17 +0000 Subject: [issue5182] str() on memoryview of bytearray failing on py3k In-Reply-To: <1234062342.43.0.913128436395.issue5182@psf.upfronthosting.co.za> Message-ID: <1234062617.86.0.696458773395.issue5182@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 04:24:36 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sun, 08 Feb 2009 03:24:36 +0000 Subject: [issue3521] file.readline: bad exception recovery In-Reply-To: <1218148611.21.0.579552262714.issue3521@psf.upfronthosting.co.za> Message-ID: <1234063476.81.0.0749235133076.issue3521@psf.upfronthosting.co.za> Daniel Diniz added the comment: Maybe this one should be in 3.0.1? Benchmarking the isinstance approach against int() would be interesting. The io-c branch doesn't have this bug, so 3.1 is OK :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 04:37:53 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 08 Feb 2009 03:37:53 +0000 Subject: [issue4512] Add get_filename method to zipimport In-Reply-To: <1228351400.39.0.42212643126.issue4512@psf.upfronthosting.co.za> Message-ID: <1234064273.1.0.325505612418.issue4512@psf.upfronthosting.co.za> Nick Coghlan added the comment: ZipImporter.get_filename() made public in: 2.7: r69425 3.1: r69426 ---------- resolution: -> accepted stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 04:38:39 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 08 Feb 2009 03:38:39 +0000 Subject: [issue5178] Add content manager for temporary directory In-Reply-To: <1234029261.42.0.975383428204.issue5178@psf.upfronthosting.co.za> Message-ID: <1234064319.73.0.213626453189.issue5178@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- priority: -> normal versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 04:39:09 2009 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 08 Feb 2009 03:39:09 +0000 Subject: [issue5178] Add context manager for temporary directory In-Reply-To: <1234029261.42.0.975383428204.issue5178@psf.upfronthosting.co.za> Message-ID: <1234064349.93.0.966618035456.issue5178@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- title: Add content manager for temporary directory -> Add context manager for temporary directory _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 06:24:24 2009 From: report at bugs.python.org (Stephen Day) Date: Sun, 08 Feb 2009 05:24:24 +0000 Subject: [issue5183] wsgiref.simple_server not working In-Reply-To: <1234070664.0.0.314425486198.issue5183@psf.upfronthosting.co.za> Message-ID: <1234070664.0.0.314425486198.issue5183@psf.upfronthosting.co.za> New submission from Stephen Day : The attached application doesn't work. I think the value of self.headers (see line 114) has a blank line at the end that it did not in Python 2.5 Here is the error message that occurs when it gets a request (http://127.0.0.1:8080/): Exception happened during processing of request from ('127.0.0.1', 60549) Traceback (most recent call last): File "C:\Python30\lib\socketserver.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "C:\Python30\lib\socketserver.py", line 307, in process_request self.finish_request(request, client_address) File "C:\Python30\lib\socketserver.py", line 320, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Python30\lib\socketserver.py", line 614, in __init__ self.handle() File "C:\Python30\lib\wsgiref\simple_server.py", line 136, in handle self.rfile, self.wfile, self.get_stderr(), self.get_environ() File "C:\Python30\lib\wsgiref\simple_server.py", line 115, in get_environ k,v = h.split(':',1) ValueError: need more than 1 value to unpack ---------- components: Library (Lib) files: test_server.py messages: 81366 nosy: StephenDay severity: normal status: open title: wsgiref.simple_server not working type: crash versions: Python 3.0 Added file: http://bugs.python.org/file12976/test_server.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 06:37:59 2009 From: report at bugs.python.org (Stephen Day) Date: Sun, 08 Feb 2009 05:37:59 +0000 Subject: [issue5183] wsgiref.simple_server not working In-Reply-To: <1234070664.0.0.314425486198.issue5183@psf.upfronthosting.co.za> Message-ID: <1234071479.94.0.280032585998.issue5183@psf.upfronthosting.co.za> Stephen Day added the comment: This seems to be fixed already (see Issue4718). Next time I'll search more... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 09:44:52 2009 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 08 Feb 2009 08:44:52 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1234082692.29.0.235845983986.issue2636@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 09:45:25 2009 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 08 Feb 2009 08:45:25 +0000 Subject: [issue5182] str() on memoryview of bytearray failing on py3k In-Reply-To: <1234062342.43.0.913128436395.issue5182@psf.upfronthosting.co.za> Message-ID: <1234082725.32.0.328918988056.issue5182@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 10:51:59 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 08 Feb 2009 09:51:59 +0000 Subject: [issue3686] PKG-INFO file should differentiate between authors and maintainers In-Reply-To: <1219739553.56.0.760950139316.issue3686@psf.upfronthosting.co.za> Message-ID: <1234086719.39.0.411441367516.issue3686@psf.upfronthosting.co.za> Akira Kitada added the comment: Maintainer field is not specified in PEP 241, PEP 314 and even PEP 345. Can we add this field to PEP 345? ---------- nosy: +akitada, tarek type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 10:56:26 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 08 Feb 2009 09:56:26 +0000 Subject: [issue3686] PKG-INFO file should differentiate between authors and maintainers In-Reply-To: <1219739553.56.0.760950139316.issue3686@psf.upfronthosting.co.za> Message-ID: <1234086986.68.0.413525809263.issue3686@psf.upfronthosting.co.za> Tarek Ziad? added the comment: The point is, the current implementation of Distutils will take the maintainer *or* the author for the Author field. So this relates to #962772 : do we want to keep maintainer and maintainer_email at all ? I'll push a mail in Distutils-SIG about this. ---------- assignee: -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 11:04:00 2009 From: report at bugs.python.org (Georg Brandl) Date: Sun, 08 Feb 2009 10:04:00 +0000 Subject: [issue5183] wsgiref.simple_server not working In-Reply-To: <1234070664.0.0.314425486198.issue5183@psf.upfronthosting.co.za> Message-ID: <1234087440.95.0.437330869878.issue5183@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> duplicate status: open -> closed superseder: -> wsgiref package totally broken _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 11:23:38 2009 From: report at bugs.python.org (=?utf-8?q?Hagen_F=C3=BCrstenau?=) Date: Sun, 08 Feb 2009 10:23:38 +0000 Subject: [issue5182] str() on memoryview of bytearray failing on py3k In-Reply-To: <1234062342.43.0.913128436395.issue5182@psf.upfronthosting.co.za> Message-ID: <1234088618.72.0.459540043782.issue5182@psf.upfronthosting.co.za> Changes by Hagen F?rstenau : ---------- nosy: +hagen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 11:27:23 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 08 Feb 2009 10:27:23 +0000 Subject: [issue5181] test_urllib failures on the 3.1 buildbots In-Reply-To: <1234046859.35.0.878327501712.issue5181@psf.upfronthosting.co.za> Message-ID: <1234088843.75.0.300707934567.issue5181@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: I was going to fix this, but Nick Coghlan beat me to it in r69429 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 11:34:16 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 08 Feb 2009 10:34:16 +0000 Subject: [issue5184] Add -3 warning for extension types that implement tp_compare but not tp_richcompare In-Reply-To: <1234089256.12.0.28890692519.issue5184@psf.upfronthosting.co.za> Message-ID: <1234089256.12.0.28890692519.issue5184@psf.upfronthosting.co.za> New submission from Mark Dickinson : See http://mail.python.org/pipermail/python-dev/2009-February/085809.html where Nick Coghlan writes: "I'm wondering if Mark should add the exception he recently removed back in as a Deprecation Warning when tp_compare is defined, but tp_richcompare is not. Such a warning should also be present when running with -3 in 2.7 (assuming it isn't already there)." A technical difficulty with adding this warning is that various built-in types implement tp_compare but not tp_richcompare. For example: int, long, slice, buffer, instancemethod, cell and bool all do this. ---------- messages: 81371 nosy: marketdickinson, ncoghlan severity: normal status: open title: Add -3 warning for extension types that implement tp_compare but not tp_richcompare versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 12:05:49 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 08 Feb 2009 11:05:49 +0000 Subject: [issue5184] Add -3 warning for extension types that implement tp_compare but not tp_richcompare In-Reply-To: <1234089256.12.0.28890692519.issue5184@psf.upfronthosting.co.za> Message-ID: <1234091149.91.0.443701144407.issue5184@psf.upfronthosting.co.za> Mark Dickinson added the comment: N.B. The 3.x part of this was implemented in r69431 and r69432. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 12:10:48 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 08 Feb 2009 11:10:48 +0000 Subject: [issue1717] Get rid of more references to __cmp__ In-Reply-To: <1199205565.64.0.0495465164968.issue1717@psf.upfronthosting.co.za> Message-ID: <1234091448.73.0.00453377852345.issue1717@psf.upfronthosting.co.za> Mark Dickinson added the comment: Deprecation warning for types that implement tp_compare but not tp_richcompare added in r69431, r69432. Just the doc fixes in Doc/extending/newtypes.rst left. Assigning to Georg and reducing priority. ---------- assignee: -> georg.brandl priority: release blocker -> normal versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 12:43:20 2009 From: report at bugs.python.org (Peter Harris) Date: Sun, 08 Feb 2009 11:43:20 +0000 Subject: [issue5156] IDLE exits with UnicodeDecodeError on Ctrl+Space In-Reply-To: <1233828164.4.0.121104337122.issue5156@psf.upfronthosting.co.za> Message-ID: <1234093400.44.0.632441028186.issue5156@psf.upfronthosting.co.za> Peter Harris added the comment: Yeah, I know that's what it's supposed to do. It does pop up the list of names, but then crashes. It happens no matter what has been input, even on an empty window. However, if it works for everyone else, maybe I built Tcl wrongly. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 13:34:04 2009 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 08 Feb 2009 12:34:04 +0000 Subject: [issue5156] IDLE exits with UnicodeDecodeError on Ctrl+Space In-Reply-To: <1233828164.4.0.121104337122.issue5156@psf.upfronthosting.co.za> Message-ID: <1234096444.92.0.863290153095.issue5156@psf.upfronthosting.co.za> Guilherme Polo added the comment: This is a duplicate, see issue1028. ---------- nosy: +gpolo resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 13:45:41 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 08 Feb 2009 12:45:41 +0000 Subject: [issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError? In-Reply-To: <1233963466.4.0.0489916221286.issue5175@psf.upfronthosting.co.za> Message-ID: <1234097141.27.0.422453115875.issue5175@psf.upfronthosting.co.za> Mark Dickinson added the comment: This also affects 3.1. Note that the current behaviour (or rather, its effects in PyLong_AsUnsignedLongLong) is as documented. In http://docs.python.org/dev/c-api/long.html it says for PyLong_AsUnsignedLongLong: "Return a C unsigned long long from a Python long integer. If pylong cannot be represented as an unsigned long long, an OverflowError will be raised if the value is positive, or a TypeError will be raised if the value is negative." ...which suggests that the choice of TypeError was intentional. It still seems wrong to me, though: the argument has the correct type, but an illegal value, so ValueError or (for consistency with the other methods) OverflowError would seem more appropriate. If this change is made, then test_struct needs fixing: the change affects the 'Q' struct format. I don't think the change in struct behaviour is serious, since there's very little consistency between different struct types at the moment: for negative ints, 'Q' raises an error, 'L' and 'I' give a DeprecationWarning, and 'H' raises a struct.error. ---------- priority: -> normal versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 14:00:13 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 08 Feb 2009 13:00:13 +0000 Subject: [issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError? In-Reply-To: <1233963466.4.0.0489916221286.issue5175@psf.upfronthosting.co.za> Message-ID: <1234098013.47.0.438208843317.issue5175@psf.upfronthosting.co.za> Mark Dickinson added the comment: Looks like this was changed in a checkin by Tim Peters in r21099; before r21099, PyLong_AsUnsignedLongLong raised OverflowError for negative numbers. After the checkin, it raised TypeError. I suspect the change was inadvertent. Tim, any comments? Lisandro, do you have any interest in contributing a patch for this? The patch should change the exception type, fix the docs, add a test or two for the fixed behaviour of PyLong_AsUnsignedLongLong to Modules/_testcapimodule.c, and fix the test_struct test for the 'Q' format code. ---------- nosy: +tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 14:36:23 2009 From: report at bugs.python.org (shamilbi) Date: Sun, 08 Feb 2009 13:36:23 +0000 Subject: [issue5170] logging to file + encoding In-Reply-To: <1233936467.22.0.152712476213.issue5170@psf.upfronthosting.co.za> Message-ID: <1234100183.8.0.366907728495.issue5170@psf.upfronthosting.co.za> shamilbi added the comment: test_log.py: ----------- #! -*- coding: windows-1251 -*- import logging logger = logging.getLogger('test_log') logger.addHandler(logging.FileHandler('test.log', encoding='cp1251')) logger.setLevel(logging.DEBUG) logger.debug(u'??????') # russian Hello exception: --------- Traceback (most recent call last): File "e:\bin\python\0\lib\logging\__init__.py", line 765, in emit self.stream.write(fs % msg.encode("UTF-8")) File "e:\bin\python\0\lib\codecs.py", line 686, in write return self.writer.write(data) File "e:\bin\python\0\lib\codecs.py", line 351, in write data, consumed = self.encode(object, self.errors) File "e:\bin\python\0\lib\encodings\cp1251.py", line 12, in encode return codecs.charmap_encode(input,errors,encoding_table) UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 15:19:36 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Feb 2009 14:19:36 +0000 Subject: [issue5182] str() on memoryview of bytearray failing on py3k In-Reply-To: <1234062342.43.0.913128436395.issue5182@psf.upfronthosting.co.za> Message-ID: <1234102776.39.0.0866923928265.issue5182@psf.upfronthosting.co.za> Benjamin Peterson added the comment: What sort of thing should str() on a memoryview return? Latin-1 decoded bytes? Could we remove __str__ and just stick with __repr__? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 15:48:46 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 08 Feb 2009 14:48:46 +0000 Subject: [issue789290] Minor FP bug in object.c Message-ID: <1234104526.44.0.672738116504.issue789290@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in the trunk in r69436. Will merge to 2.6, 3.1 and 3.0. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 15:56:31 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Feb 2009 14:56:31 +0000 Subject: [issue5182] str() on memoryview of bytearray failing on py3k In-Reply-To: <1234102776.39.0.0866923928265.issue5182@psf.upfronthosting.co.za> Message-ID: <1234104954.8873.4.camel@fsol> Antoine Pitrou added the comment: > Could we remove __str__ and just stick with __repr__? Yes, I think it's the best thing to do. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 15:58:20 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 08 Feb 2009 14:58:20 +0000 Subject: [issue5160] Intermittant segmentation fault with ctrl-c (threads and queues) In-Reply-To: <1233868312.9.0.87638822413.issue5160@psf.upfronthosting.co.za> Message-ID: <1234105100.46.0.542116518729.issue5160@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: This seems to be duplicate of issue1856. Let me close this entry. ---------- resolution: -> duplicate status: open -> closed superseder: -> shutdown (exit) can hang or segfault with daemon threads running _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 16:01:21 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Feb 2009 15:01:21 +0000 Subject: [issue5182] str() on memoryview of bytearray failing on py3k In-Reply-To: <1234062342.43.0.913128436395.issue5182@psf.upfronthosting.co.za> Message-ID: <1234105281.01.0.948796312578.issue5182@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Done in r69438. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 16:14:42 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 08 Feb 2009 15:14:42 +0000 Subject: [issue789290] Minor FP bug in object.c Message-ID: <1234106082.49.0.765187446357.issue789290@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fix merged in r69437, r69440, r69441. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 16:59:01 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Feb 2009 15:59:01 +0000 Subject: [issue4631] urlopen returns extra, spurious bytes In-Reply-To: <1228994582.88.0.234313374656.issue4631@psf.upfronthosting.co.za> Message-ID: <1234108741.24.0.997585099817.issue4631@psf.upfronthosting.co.za> Antoine Pitrou added the comment: On the principle, the test looks good. If you want to avoid the 'if "%" in value' hack, you can use the named-parameter form of string formatting: >>> "localhost:%(port)s" % dict(port=8080) 'localhost:8080' >>> "localhost" % dict(port=8080) 'localhost' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 17:03:32 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Feb 2009 16:03:32 +0000 Subject: [issue5137] SystemError when __len__ returns a non-number In-Reply-To: <1233636317.07.0.926088600598.issue5137@psf.upfronthosting.co.za> Message-ID: <1234109012.6.0.335788488497.issue5137@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Wouldn't it be better to use PyNumber_AsSsize_t() instead, so as to support all __index__-enabled objects? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 17:06:51 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Feb 2009 16:06:51 +0000 Subject: [issue5179] subprocess leaves open fds on construction error In-Reply-To: <1234037080.37.0.0531724857804.issue5179@psf.upfronthosting.co.za> Message-ID: <1234109211.77.0.996436610529.issue5179@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Perhaps you could add a test? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 17:17:30 2009 From: report at bugs.python.org (Jeffery Aubin) Date: Sun, 08 Feb 2009 16:17:30 +0000 Subject: [issue5185] Idle doesn't work on 2.6 on Macbook In-Reply-To: <1234109850.83.0.858099103097.issue5185@psf.upfronthosting.co.za> Message-ID: <1234109850.83.0.858099103097.issue5185@psf.upfronthosting.co.za> New submission from Jeffery Aubin : I work with IDLE on a PC at the office and now I've installed version 2.6 for mac on my Macbook at home. I wanted to have access to IDLE at home to read my code and add some things here and there. But, I cannot get it to work. It opens up on the dock and disapears right away. I've try to open a .py file using IDLE as a default and it didn't work. I've read some forums on this issue but nothing that quite fit the description of my problem. How can I get it to work? ---------- components: IDLE messages: 81388 nosy: jeaub23 severity: normal status: open title: Idle doesn't work on 2.6 on Macbook type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 17:36:18 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 08 Feb 2009 16:36:18 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> New submission from Mark Dickinson : In the issue 5169 discussion, Antoine Pitrou suggested that for an object x without a __hash__ method, id()/8 might be a better hash value than id(), since dicts use the low order bits of the hash as initial key, and the 3 lowest bits of an id() will always be zero. Here's a patch. ---------- components: Interpreter Core files: pointer_hash.patch keywords: patch messages: 81389 nosy: marketdickinson, pitrou, rhettinger priority: normal severity: normal status: open title: Reduce hash collisions for objects with no __hash__ method type: performance versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file12977/pointer_hash.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 18:03:11 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 08 Feb 2009 17:03:11 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234112591.73.0.448787736371.issue5186@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here are some timings for dict creation, created with the attached script. They're not particularly scientific, but they at least show that this one- line optimization can make a significant difference. Typical results on my machine (OS X 10.5.6/Intel), 32-bit non-debug build of the trunk (r69442): before dict creation (selected): 1.95572495461 dict creation (shuffled): 1.98964595795 dict creation: 1.78589916229 and after: dict creation (selected): 1.7055079937 # (14% speedup) dict creation (shuffled): 1.5843398571 # (25% speedup) dict creation: 1.32362794876 # (34% speedup) BTW, all tests pass on my machine with this patch applied. Added file: http://bugs.python.org/file12978/time_object_hash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 18:05:00 2009 From: report at bugs.python.org (Lisandro Dalcin) Date: Sun, 08 Feb 2009 17:05:00 +0000 Subject: [issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError? In-Reply-To: <1233963466.4.0.0489916221286.issue5175@psf.upfronthosting.co.za> Message-ID: <1234112700.23.0.255775453469.issue5175@psf.upfronthosting.co.za> Lisandro Dalcin added the comment: I can contribute a patch. However, I would like to wait until Tim comments on this. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 18:15:59 2009 From: report at bugs.python.org (Martin von Gagern) Date: Sun, 08 Feb 2009 17:15:59 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233584376.51.0.787053739937.issue5128@psf.upfronthosting.co.za> Message-ID: <1234113359.48.0.0820368016343.issue5128@psf.upfronthosting.co.za> Martin von Gagern added the comment: Any progress with the review? By the way, what branch are we aiming for? I'm using 2.5 here, so I reported this issue against that version, and wrote the patch against that branch. I guess it should work for trunk as well, but the imports of with_statement from __future__ should probably be omitted there. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 18:34:10 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Feb 2009 17:34:10 +0000 Subject: [issue5137] SystemError when __len__ returns a non-number In-Reply-To: <1233636317.07.0.926088600598.issue5137@psf.upfronthosting.co.za> Message-ID: <1234114450.98.0.171066378244.issue5137@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Yes, good idea. Added file: http://bugs.python.org/file12979/SystemError_bad_len2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 18:35:05 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Feb 2009 17:35:05 +0000 Subject: [issue5185] Idle doesn't work on 2.6 on Macbook In-Reply-To: <1234109850.83.0.858099103097.issue5185@psf.upfronthosting.co.za> Message-ID: <1234114505.21.0.125459481497.issue5185@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Are you using 2.6.1 or 2.6? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 18:42:18 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Feb 2009 17:42:18 +0000 Subject: [issue5137] SystemError when __len__ returns a non-number In-Reply-To: <1233636317.07.0.926088600598.issue5137@psf.upfronthosting.co.za> Message-ID: <1234114938.64.0.086440839343.issue5137@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think you need to call PyNumber_Check() (unless you want to customize the error message). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 18:54:10 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Feb 2009 17:54:10 +0000 Subject: [issue5137] SystemError when __len__ returns a non-number In-Reply-To: <1233636317.07.0.926088600598.issue5137@psf.upfronthosting.co.za> Message-ID: <1234115650.72.0.382040705034.issue5137@psf.upfronthosting.co.za> Changes by Benjamin Peterson : Added file: http://bugs.python.org/file12980/bad_len3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 18:56:25 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Feb 2009 17:56:25 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234115785.01.0.0168805509799.issue5186@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The code path for SIZEOF_LONG < SIZEOF_VOID_P could probably also benefit from this optimization by casting the pointer to a size_t (this will effect 64-bit Windows, where long is 32 bits but pointers are 64 bits). (unfortunately it seems the 64-bit Windows buildbot has disappeared) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 18:58:33 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 08 Feb 2009 17:58:33 +0000 Subject: [issue1294032] Distutils writes keywords comma-separated Message-ID: <1234115913.29.0.175540102427.issue1294032@psf.upfronthosting.co.za> Akira Kitada added the comment: s/PEP341/PEP345/? ---------- nosy: +akitada, tarek type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 19:06:59 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Feb 2009 18:06:59 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234116419.71.0.428092385648.issue5186@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Benchmark results on my machine (64-bit Linux, gcc 4.3.2, AMD X2 3600+): Before: dict creation (selected): 5.09600687027 dict creation (shuffled): 5.66548895836 dict creation: 3.72823190689 After: dict creation (selected): 4.57248306274 (10% speedup) dict creation (shuffled): 4.81948494911 (15% speedup) dict creation: 2.43905687332 (35% speedup) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 19:09:53 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 08 Feb 2009 18:09:53 +0000 Subject: [issue1294032] Distutils writes keywords comma-separated Message-ID: <1234116593.83.0.471314284989.issue1294032@psf.upfronthosting.co.za> Tarek Ziad? added the comment: seems to work fine today on PyPI side. If Andrew agrees, I'll close it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 19:13:47 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Feb 2009 18:13:47 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234116827.23.0.797706162919.issue5186@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I observe even greater speedups (15%/20%/37%) on set creation. Here is the updated benchmark script. Added file: http://bugs.python.org/file12981/time_object_hash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 19:17:04 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 08 Feb 2009 18:17:04 +0000 Subject: [issue5164] backport distutils 3.x changes into 2.7 when appliabl In-Reply-To: <1233911195.36.0.922992904897.issue5164@psf.upfronthosting.co.za> Message-ID: <1234117024.31.0.910730569914.issue5164@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Unfortunately, these changes are most of the time made as small extra changes when people are working in distutils modules : they fix something, and in the same changeset, they fix a small PEP-8 issue in the area they are working on. So it seems hard to merge back the revisions. What I am doing now (if you think it's OK), is running a diff so my changes make the trunk look like Py3's one in this area.. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 19:20:46 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 08 Feb 2009 18:20:46 +0000 Subject: [issue5137] SystemError when __len__ returns a non-number In-Reply-To: <1233636317.07.0.926088600598.issue5137@psf.upfronthosting.co.za> Message-ID: <1234117246.03.0.258698840626.issue5137@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch is ok to me. (I assume all tests pass fine :-)) ---------- assignee: -> benjamin.peterson keywords: -needs review resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 19:27:11 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 08 Feb 2009 18:27:11 +0000 Subject: [issue5164] backport distutils 3.x changes into 2.7 when appliabl In-Reply-To: <1233911195.36.0.922992904897.issue5164@psf.upfronthosting.co.za> Message-ID: <1234117631.48.0.578188353321.issue5164@psf.upfronthosting.co.za> Martin v. L?wis added the comment: That's ok in principle, as long as you avoid committing behavioral changes along with style changes in the same change set. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 19:38:07 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 08 Feb 2009 18:38:07 +0000 Subject: [issue1294032] Distutils writes keywords comma-separated Message-ID: <1234118287.58.0.769621966384.issue1294032@psf.upfronthosting.co.za> Akira Kitada added the comment: I think it still need to be clarified in PEP that Keywords field accept comma-or-space-separated values. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 19:54:36 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 08 Feb 2009 18:54:36 +0000 Subject: [issue1092365] Distutils needs a way *not* to install files Message-ID: <1234119276.21.0.0247919177626.issue1092365@psf.upfronthosting.co.za> Akira Kitada added the comment: I don't understand the use case of that option. ---------- nosy: +akitada, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 19:56:05 2009 From: report at bugs.python.org (Martin von Gagern) Date: Sun, 08 Feb 2009 18:56:05 +0000 Subject: [issue843590] 'macintosh' encoding alias for 'mac_roman' Message-ID: <1234119365.89.0.970525337917.issue843590@psf.upfronthosting.co.za> Martin von Gagern added the comment: I had my first indication to rather use "macintosh" instead of "mac_roman" from Wikipedia http://en.wikipedia.org/wiki/Mac_OS_Roman which states that the charset part of a MIME content-type specification should be maciontosh. I'm not quoting this as any kind of authority, but rather to point out that it is likely for people to use this. I did a comparison of http://tools.ietf.org/rfc/rfc1345.txt (RFC) and ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ROMAN.TXT (UNI) using the attached perl script. The results: 3 codepoints unused in RFC but defined in UNI: f0, f6, f7 1 codepoint unused in UNI but defined in RFC: 7f 2 codepoints with slightly different character names, same meaning 9 codepoints with actually different definitions: a5: rfc 2219 BULLET OPERATOR uni 2022 BULLET c4: rfc e023 DUTCH GUILDER SIGN (IBM437 159) uni 0192 LATIN SMALL LETTER F WITH HOOK c6: rfc 0394 GREEK CAPITAL LETTER DELTA uni 2206 INCREMENT c9: rfc 22ef MIDLINE HORIZONTAL ELLIPSIS uni 2026 HORIZONTAL ELLIPSIS d0: rfc 2014 EM DASH uni 2013 EN DASH d1: rfc 2013 EN DASH uni 2014 EM DASH d7: rfc 25c6 BLACK DIAMOND uni 25ca LOZENGE db: rfc 00a4 CURRENCY SIGN uni 20ac EURO SIGN f8: rfc 203e OVERLINE uni 00af MACRON a5 and c6 could be different interpretations of symbols that look pretty much the same. The introduction of the euro sign instead of the generic currency sign seems to be a recent modification documented in UNI. The change of the order of the dashes seems really confusing. Notice also this line in the RFC: &rem source: The Unicode Standard ver1.0, ISBN 0-201-56788-1, Oct 1991 So it looks like the RFC used the unicode definition as its source. What part of it I'm not sure, and where the differences come I'm even less sure. My next steps: * Look for further references, e.g. from apple, and compare them as well * Try some things out on a mac, see how it behaves in real life * Compare all this to the current python implementation * Write a patch to either provide an alias or a new charset "macintosh" Help welcome. ---------- nosy: +gagern Added file: http://bugs.python.org/file12982/compare.pl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 19:57:48 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 08 Feb 2009 18:57:48 +0000 Subject: [issue1326113] Letting "build_ext --libraries" take more than one lib Message-ID: <1234119468.16.0.921903781526.issue1326113@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 20:03:30 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 08 Feb 2009 19:03:30 +0000 Subject: [issue2624] swig support in distutils should use the build and temp dirs In-Reply-To: <1208004805.0.0.253675871958.issue2624@psf.upfronthosting.co.za> Message-ID: <1234119810.84.0.959445000852.issue2624@psf.upfronthosting.co.za> Akira Kitada added the comment: Same with issue1016626? ---------- nosy: +akitada _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 20:06:23 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 08 Feb 2009 19:06:23 +0000 Subject: [issue828336] Allow set swig include dirs in setup.py Message-ID: <1234119983.16.0.387448355043.issue828336@psf.upfronthosting.co.za> Akira Kitada added the comment: seems this is already fixed in issue1046644. ---------- nosy: +akitada _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 20:08:52 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 08 Feb 2009 19:08:52 +0000 Subject: [issue1016626] distutils support for swig is under par Message-ID: <1234120132.04.0.210264546053.issue1016626@psf.upfronthosting.co.za> Akira Kitada added the comment: Same with issue2624? ---------- nosy: +akitada, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 19:50:05 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 08 Feb 2009 18:50:05 +0000 Subject: [issue1294032] Distutils writes keywords comma-separated Message-ID: <1234119005.4.0.387783451765.issue1294032@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Maybe we could fix the docs and PEP 241 and PEP 314, but PEP 345 has never been fully implemented, so it should probably be marked as rejected. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 20:21:27 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 08 Feb 2009 19:21:27 +0000 Subject: [issue1004696] translate Windows cr-lf when installing scripts on Linux Message-ID: <1234120887.97.0.554075188115.issue1004696@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 20:25:05 2009 From: report at bugs.python.org (Akira Kitada) Date: Sun, 08 Feb 2009 19:25:05 +0000 Subject: [issue1718574] build_clib --build-clib/--build-temp option bugs Message-ID: <1234121105.52.0.0262116562405.issue1718574@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 20:25:37 2009 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 08 Feb 2009 19:25:37 +0000 Subject: [issue5170] logging to file + encoding In-Reply-To: <1233936467.22.0.152712476213.issue5170@psf.upfronthosting.co.za> Message-ID: <1234121137.73.0.127721479657.issue5170@psf.upfronthosting.co.za> Vinay Sajip added the comment: Sorry, misread the original issue and tested with Python 2.5 rather than 2.6. This is a regression; fix and additional test case checked into trunk and release26-maint. ---------- resolution: works for me -> fixed status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 20:32:41 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 08 Feb 2009 19:32:41 +0000 Subject: [issue1326113] Letting "build_ext --libraries" take more than one lib Message-ID: <1234121561.98.0.10880547065.issue1326113@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek versions: +Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 20:34:47 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 08 Feb 2009 19:34:47 +0000 Subject: [issue1016626] distutils support for swig is under par Message-ID: <1234121687.22.0.268667321501.issue1016626@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek type: -> behavior versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 20:36:53 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 08 Feb 2009 19:36:53 +0000 Subject: [issue1004696] translate Windows cr-lf when installing scripts on Linux Message-ID: <1234121813.48.0.895720050395.issue1004696@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 20:41:06 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 08 Feb 2009 19:41:06 +0000 Subject: [issue1718574] build_clib --build-clib/--build-temp option bugs Message-ID: <1234122066.94.0.897202227509.issue1718574@psf.upfronthosting.co.za> Tarek Ziad? added the comment: can you provide an example and/or a traceback of the problem ? ---------- assignee: -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 21:02:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sun, 08 Feb 2009 20:02:03 +0000 Subject: [issue3613] base64.encodestring does not actually accept strings In-Reply-To: <1219212034.35.0.601192649417.issue3613@psf.upfronthosting.co.za> Message-ID: <1234123323.15.0.0952505946946.issue3613@psf.upfronthosting.co.za> Daniel Diniz added the comment: Here's a trivial patch for xmlrpc.client:1168. The testcase below doesn't seem to fit well in test_xmlrpc, should it just be hacked in? import xmlrpc.client transp = xmlrpc.client.Transport() transp.get_host_info("user at host.tld") ---------- keywords: +patch nosy: +ajaksu2 Added file: http://bugs.python.org/file12983/get_host_info.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 21:05:56 2009 From: report at bugs.python.org (Pearu Peterson) Date: Sun, 08 Feb 2009 20:05:56 +0000 Subject: [issue1718574] build_clib --build-clib/--build-temp option bugs Message-ID: <1234123556.57.0.148046765653.issue1718574@psf.upfronthosting.co.za> Pearu Peterson added the comment: Consider a trivial setup file: from distutils.core import setup setup() Here is an example traceback (the second command illustrates the bug): $ python setup.py build --build-temp=/tmp running build $ python setup.py build_clib --build-temp=/tmp usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: option --build-temp must not have an argument _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 21:12:21 2009 From: report at bugs.python.org (Brett Cannon) Date: Sun, 08 Feb 2009 20:12:21 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1234113359.48.0.0820368016343.issue5128@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Sun, Feb 8, 2009 at 09:15, Martin von Gagern wrote: > > Martin von Gagern added the comment: > > Any progress with the review? > I am planning to get to it on Tuesday. > By the way, what branch are we aiming for? 2.7/3.1. It's a backwards-incompatible change so I am not planning on backporting it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 21:20:40 2009 From: report at bugs.python.org (Kjell Braden) Date: Sun, 08 Feb 2009 20:20:40 +0000 Subject: [issue2624] swig support in distutils should use the build and temp dirs In-Reply-To: <1208004805.0.0.253675871958.issue2624@psf.upfronthosting.co.za> Message-ID: <1234124440.02.0.6409604598.issue2624@psf.upfronthosting.co.za> Kjell Braden added the comment: Except that the _wrap.c file would still be created at the wrong place, yes, you're right. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 21:22:25 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sun, 08 Feb 2009 20:22:25 +0000 Subject: [issue4894] documentaion doesn't include parameter in urllib.request.HTTPRedirectHandler.redirect_request In-Reply-To: <1231509516.06.0.732679259028.issue4894@psf.upfronthosting.co.za> Message-ID: <1234124545.61.0.0727963841537.issue4894@psf.upfronthosting.co.za> Daniel Diniz added the comment: This patch adds the "newurl" parameter to signature of redirect_request (important, IMHO) and mentions it in the doc (less important). It also describes the behavior of http_error_30* in more detail, perhaps too much? ---------- keywords: +patch nosy: +ajaksu2 Added file: http://bugs.python.org/file12984/redirect_request_rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 22:07:57 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 08 Feb 2009 21:07:57 +0000 Subject: [issue5137] SystemError when __len__ returns a non-number In-Reply-To: <1233636317.07.0.926088600598.issue5137@psf.upfronthosting.co.za> Message-ID: <1234127277.39.0.791873952157.issue5137@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for the reviews! Fixed in r69451. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 22:22:46 2009 From: report at bugs.python.org (Alex Robinson) Date: Sun, 08 Feb 2009 21:22:46 +0000 Subject: [issue4913] wave.py: add writesamples() and readsamples() In-Reply-To: <1231640203.22.0.836631115229.issue4913@psf.upfronthosting.co.za> Message-ID: <1234128166.35.0.564945110084.issue4913@psf.upfronthosting.co.za> Alex Robinson added the comment: I'll upload the latest monkey-patch file, wave_futz.py, and test_wave.py, which has a gob of tests added to it. I found a 64-bit bug in the wave.py formats for 32-bit sample wave files. The pcm files read in to CoolEdit ok, including the 32-bit sample files. Added file: http://bugs.python.org/file12985/wave_futz.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 22:27:48 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 08 Feb 2009 21:27:48 +0000 Subject: [issue5187] distutils upload should prompt for the user/password too In-Reply-To: <1234128468.86.0.0554273106388.issue5187@psf.upfronthosting.co.za> Message-ID: <1234128468.86.0.0554273106388.issue5187@psf.upfronthosting.co.za> New submission from Tarek Ziad? : finalize_option in upload command should ask for the password, if not given by pypirc or by a previous register command. ---------- assignee: tarek components: Distutils messages: 81420 nosy: tarek priority: low severity: normal status: open title: distutils upload should prompt for the user/password too type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 22:34:13 2009 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 08 Feb 2009 21:34:13 +0000 Subject: [issue1721518] Small case which hangs Message-ID: <1234128853.48.0.305140739492.issue1721518@psf.upfronthosting.co.za> Matthew Barnett added the comment: This problem has been addressed in issue #2636. Although the extra checks certainly aren't foolproof, neither of the examples given are slow. ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 22:41:54 2009 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 08 Feb 2009 21:41:54 +0000 Subject: [issue1448325] re search infinite loop Message-ID: <1234129314.71.0.295784346376.issue1448325@psf.upfronthosting.co.za> Matthew Barnett added the comment: This problem has been addressed in issue #2636. Although the extra checks certainly aren't foolproof, some regular expressions which were slow won't be any more. ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 22:50:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sun, 08 Feb 2009 21:50:20 +0000 Subject: [issue3991] urllib.request.urlopen does not handle non-ASCII characters In-Reply-To: <1222627636.82.0.587488225038.issue3991@psf.upfronthosting.co.za> Message-ID: <1234129820.99.0.614874558233.issue3991@psf.upfronthosting.co.za> Daniel Diniz added the comment: I think Toshio's usecase is important enough to deserve a fix (patch attached) or a special-cased error message. IMO, newbies trying to fix failures from urlopen may have a hard time figuring out the maze: urlopen -> _opener -> open -> _open -> _call_chain -> http_open -> do_open (and that's before leaving urllib!). >>> from urllib.request import urlopen >>> url = 'http://localhost/?.html' >>> urlopen(url).read() Traceback (most recent call last): [...] UnicodeEncodeError: 'ascii' codec can't encode character '\xf1' in position 5: ordinal not in range(128) If the newbie isn't completely lost by then, how about: >>> from urllib.parse import quote >>> urlopen(quote(url)).read() Traceback (most recent call last): [...] ValueError: unknown url type: http%3A//localhost/%C3%B1.html ---------- keywords: +patch nosy: +ajaksu2 Added file: http://bugs.python.org/file12986/non_ascii_path.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 23:01:22 2009 From: report at bugs.python.org (STINNER Victor) Date: Sun, 08 Feb 2009 22:01:22 +0000 Subject: [issue4471] IMAP4 missing support for starttls In-Reply-To: <1228062796.45.0.215183772699.issue4471@psf.upfronthosting.co.za> Message-ID: <1234130482.28.0.662837810368.issue4471@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 23:02:17 2009 From: report at bugs.python.org (STINNER Victor) Date: Sun, 08 Feb 2009 22:02:17 +0000 Subject: [issue4473] POP3 missing support for starttls In-Reply-To: <1228063143.07.0.0563421485939.issue4473@psf.upfronthosting.co.za> Message-ID: <1234130537.42.0.613103065305.issue4473@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 23:16:12 2009 From: report at bugs.python.org (David Christian) Date: Sun, 08 Feb 2009 22:16:12 +0000 Subject: [issue5188] telnetlib process_rawq buffer handling is confused In-Reply-To: <1234131372.15.0.372715702734.issue5188@psf.upfronthosting.co.za> Message-ID: <1234131372.15.0.372715702734.issue5188@psf.upfronthosting.co.za> New submission from David Christian : in telnetlib's process_rawq, rawq_getchar() returns a bytes object of length 1. However, that buffer is then compared directly against the variable IAC, which is the integer 255. This is always false, as bytes([255]) != 255. Checked svn and looks like this issue still exists as of 2/8/2009. ---------- messages: 81424 nosy: dugan severity: normal status: open title: telnetlib process_rawq buffer handling is confused versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 23:18:41 2009 From: report at bugs.python.org (David Christian) Date: Sun, 08 Feb 2009 22:18:41 +0000 Subject: [issue5188] telnetlib process_rawq buffer handling is confused In-Reply-To: <1234131372.15.0.372715702734.issue5188@psf.upfronthosting.co.za> Message-ID: <1234131521.16.0.200857035339.issue5188@psf.upfronthosting.co.za> David Christian added the comment: The result of this bug is that any callback set via set_option_negotiation_callback will not be called. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 00:38:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sun, 08 Feb 2009 23:38:50 +0000 Subject: [issue4608] urllib.request.urlopen does not return an iterable object In-Reply-To: <1228824822.91.0.748607079368.issue4608@psf.upfronthosting.co.za> Message-ID: <1234136330.32.0.573795022402.issue4608@psf.upfronthosting.co.za> Daniel Diniz added the comment: Test cases attached. The second one highlights a bug in the current patch, as it fails to return a line longer than 65475 chars. This behavior doesn't match trunk's. ---------- nosy: +ajaksu2 Added file: http://bugs.python.org/file12987/tests_issue4608_py31.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 00:55:07 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sun, 08 Feb 2009 23:55:07 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1234137307.64.0.896360692355.issue1712522@psf.upfronthosting.co.za> Daniel Diniz added the comment: IMHO, the TypeError would be a bugfix for 2.6.x. A urllib.quote_unicode could be provided (in 2.7) to match urllib.parse.quote in 3.0 and the OP usecase. I can provide a simple patch, but I'm afraid the OP's remarks about ASCII-range and thread-safety wouldn't be handled at all. ---------- nosy: +ajaksu2 versions: +Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 01:24:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 00:24:24 +0000 Subject: [issue4631] urlopen returns extra, spurious bytes In-Reply-To: <1228994582.88.0.234313374656.issue4631@psf.upfronthosting.co.za> Message-ID: <1234139064.42.0.467438563759.issue4631@psf.upfronthosting.co.za> Daniel Diniz added the comment: Antoine, Thanks for reviewing, here's an updated version. Added file: http://bugs.python.org/file12988/test_urllib_chunked2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 01:24:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 00:24:38 +0000 Subject: [issue4631] urlopen returns extra, spurious bytes In-Reply-To: <1228994582.88.0.234313374656.issue4631@psf.upfronthosting.co.za> Message-ID: <1234139078.57.0.844972050615.issue4631@psf.upfronthosting.co.za> Changes by Daniel Diniz : Removed file: http://bugs.python.org/file12975/test_urllib_chunked.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 01:29:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 00:29:27 +0000 Subject: [issue1599329] urllib(2) should allow automatic decoding by charset Message-ID: <1234139367.66.0.119820019995.issue1599329@psf.upfronthosting.co.za> Daniel Diniz added the comment: There's an attempt to implement this behavior, for 3.1, in issue 4733. Maybe having a parallel in 2.7 could help the 2.x 3.x transition for some users? ---------- nosy: +ajaksu2 versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 01:36:07 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 00:36:07 +0000 Subject: [issue1349732] urllib.urlencode provides two features in one param Message-ID: <1234139767.22.0.129004836331.issue1349732@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl versions: +Python 2.7 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 02:18:21 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 01:18:21 +0000 Subject: [issue1153027] http_error_302() crashes with 'HTTP/1.1 400 Bad Request Message-ID: <1234142301.19.0.685414275271.issue1153027@psf.upfronthosting.co.za> Daniel Diniz added the comment: As always with urllib, the fix is trivial but adding a test is hard. ---------- keywords: +patch nosy: +ajaksu2 versions: +Python 2.7 -Python 2.4 Added file: http://bugs.python.org/file12989/302_with_spaces.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 02:20:46 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 01:20:46 +0000 Subject: [issue1027206] unicode DNS names in socket, urllib, urlopen Message-ID: <1234142446.1.0.668155483987.issue1027206@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -None type: -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 02:51:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 01:51:24 +0000 Subject: [issue918368] urllib doesn't correct server returned urls Message-ID: <1234144284.22.0.567769879255.issue918368@psf.upfronthosting.co.za> Daniel Diniz added the comment: Superseded by issue 1153027 ? ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 02:53:07 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Feb 2009 01:53:07 +0000 Subject: [issue5171] itertools.product docstring missing 'repeat' argument In-Reply-To: <1233938945.33.0.092220516904.issue5171@psf.upfronthosting.co.za> Message-ID: <1234144387.71.0.590360326545.issue5171@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks, I'll fix this up. ---------- priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 03:23:15 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 09 Feb 2009 02:23:15 +0000 Subject: [issue4631] urlopen returns extra, spurious bytes In-Reply-To: <1228994582.88.0.234313374656.issue4631@psf.upfronthosting.co.za> Message-ID: <1234146195.2.0.0631378956568.issue4631@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The test looks good to me. I can't comment on the bugfix patch, but if it's ok to you, you can go ahead :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 03:36:34 2009 From: report at bugs.python.org (Jeffery Aubin) Date: Mon, 09 Feb 2009 02:36:34 +0000 Subject: [issue5185] Idle doesn't work on 2.6 on Macbook In-Reply-To: <1234109850.83.0.858099103097.issue5185@psf.upfronthosting.co.za> Message-ID: <1234146994.67.0.173204820711.issue5185@psf.upfronthosting.co.za> Jeffery Aubin added the comment: I was using 2.6, but now I've downloaded 2.6.1. and it works. Thanks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 03:58:27 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 09 Feb 2009 02:58:27 +0000 Subject: [issue5189] test_cmd_line failure on the OS X buildbot In-Reply-To: <1234148307.24.0.286213836725.issue5189@psf.upfronthosting.co.za> Message-ID: <1234148307.24.0.286213836725.issue5189@psf.upfronthosting.co.za> New submission from Antoine Pitrou : From http://www.python.org/dev/buildbot/3.0/OS%20X%20x86%203.0/builds/81/step-test/0: Re-running test 'test_cmd_line' in verbose mode test_directories (test.test_cmd_line.CmdLineTest) ... ok test_optimize (test.test_cmd_line.CmdLineTest) ... ok test_q (test.test_cmd_line.CmdLineTest) ... ok test_run_code (test.test_cmd_line.CmdLineTest) ... FAIL test_run_module (test.test_cmd_line.CmdLineTest) ... ok test_run_module_bug1764407 (test.test_cmd_line.CmdLineTest) ... ok test_site_flag (test.test_cmd_line.CmdLineTest) ... ok test_unbuffered_input (test.test_cmd_line.CmdLineTest) ... ok test_unbuffered_output (test.test_cmd_line.CmdLineTest) ... ok test_usage (test.test_cmd_line.CmdLineTest) ... ok test_verbose (test.test_cmd_line.CmdLineTest) ... ok test_version (test.test_cmd_line.CmdLineTest) ... ok ====================================================================== FAIL: test_run_code (test.test_cmd_line.CmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.0.noller-osx86/build/Lib/test/test_cmd_line.py", line 143, in test_run_code 0) AssertionError: 1 != 0 ---------------------------------------------------------------------- Ran 12 tests in 3.394s ---------- components: Interpreter Core, Tests messages: 81435 nosy: jnoller, pitrou priority: normal severity: normal stage: needs patch status: open title: test_cmd_line failure on the OS X buildbot type: behavior versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 04:25:49 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Feb 2009 03:25:49 +0000 Subject: [issue5185] Idle doesn't work on 2.6 on Macbook In-Reply-To: <1234109850.83.0.858099103097.issue5185@psf.upfronthosting.co.za> Message-ID: <1234149949.6.0.767943633915.issue5185@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 04:32:27 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Feb 2009 03:32:27 +0000 Subject: [issue5189] test_cmd_line failure on the OS X buildbot In-Reply-To: <1234148307.24.0.286213836725.issue5189@psf.upfronthosting.co.za> Message-ID: <1234150347.1.0.762290340386.issue5189@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This would be a duplicate of #4388. ---------- nosy: +benjamin.peterson resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 05:41:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 04:41:43 +0000 Subject: [issue1660009] continuing problem with httplib multiple set-cookie headers Message-ID: <1234154503.17.0.426126083049.issue1660009@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> georg.brandl components: +Documentation -Library (Lib) nosy: +georg.brandl type: -> behavior versions: +Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 05:57:19 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 04:57:19 +0000 Subject: [issue1327971] HTTPResponse instance has no attribute 'fileno' Message-ID: <1234155439.36.0.500555010464.issue1327971@psf.upfronthosting.co.za> Daniel Diniz added the comment: Besides being outdated, the OP shows it's trivial to access the fileno: "r.fileno = r.fp.fileno". I suggest closing. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 07:12:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 06:12:43 +0000 Subject: [issue975556] HTMLParser lukewarm on bogus bare attribute chars Message-ID: <1234159963.27.0.548196241832.issue975556@psf.upfronthosting.co.za> Daniel Diniz added the comment: Per #921657, looks like the current behavior is correct. ---------- nosy: +ajaksu2 type: -> feature request versions: +Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 07:13:35 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 06:13:35 +0000 Subject: [issue1046092] HTMLParser fix to accept mailformed tag attributes Message-ID: <1234160015.59.0.871552062035.issue1046092@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- type: -> feature request versions: +Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 07:14:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 06:14:01 +0000 Subject: [issue960821] Add an updating load function in pickle Message-ID: <1234160041.89.0.064658926713.issue960821@psf.upfronthosting.co.za> Daniel Diniz added the comment: Any real use cases beyond being very nice? ---------- nosy: +ajaksu2 versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 07:14:21 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 06:14:21 +0000 Subject: [issue924806] email.Header.Header() produces wrong headers with utf8 enc. Message-ID: <1234160061.33.0.565524147822.issue924806@psf.upfronthosting.co.za> Daniel Diniz added the comment: Is the perceived incompatibility (still) a real problem? ---------- nosy: +ajaksu2 type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 07:15:14 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 06:15:14 +0000 Subject: [issue779191] BasicModuleLoader behaviour in Python 2.3c2 Message-ID: <1234160114.69.0.300417927406.issue779191@psf.upfronthosting.co.za> Daniel Diniz added the comment: Even if the described behavior still occurs, looks like a won't fix. ---------- nosy: +ajaksu2 type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 07:16:30 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 06:16:30 +0000 Subject: [issue736428] allow HTMLParser error recovery Message-ID: <1234160190.7.0.546165435077.issue736428@psf.upfronthosting.co.za> Daniel Diniz added the comment: Superseder: issue 755660. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 07:17:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 06:17:20 +0000 Subject: [issue461890] xdrlib allow subclass for file access Message-ID: <1234160240.67.0.82432792831.issue461890@psf.upfronthosting.co.za> Daniel Diniz added the comment: Seems like a very rare use case, closing is suggested. ---------- components: +Library (Lib) -None nosy: +ajaksu2 versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 07:17:31 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 06:17:31 +0000 Subject: [issue1397850] libpython2.4.so get not installed Message-ID: <1234160251.37.0.211691170733.issue1397850@psf.upfronthosting.co.za> Daniel Diniz added the comment: configure.in still doesn't have a "*) AC_MSG_ERROR(--enable-shared not supported on this system)", closing as won't fix still sounds good. ---------- nosy: +ajaksu2 title: libpython2.4.so get not installed -> libpython2.4.so get not installed versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 07:27:10 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 09 Feb 2009 06:27:10 +0000 Subject: [issue461890] xdrlib allow subclass for file access Message-ID: <1234160830.07.0.967494726535.issue461890@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 07:28:22 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 09 Feb 2009 06:28:22 +0000 Subject: [issue1397850] libpython2.4.so get not installed Message-ID: <1234160902.98.0.753896634667.issue1397850@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 07:54:54 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 06:54:54 +0000 Subject: [issue1384175] random module - Provider DLL failed to initialize correctly Message-ID: <1234162494.08.0.0146204468738.issue1384175@psf.upfronthosting.co.za> Daniel Diniz added the comment: Given MvL's diagnostics and lack of response from OP, suggest closing. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 07:55:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 06:55:05 +0000 Subject: [issue1175686] add "reload" function Message-ID: <1234162505.44.0.206653670045.issue1175686@psf.upfronthosting.co.za> Daniel Diniz added the comment: Superseder: issue 5138. ---------- nosy: +ajaksu2 versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 07:55:31 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 06:55:31 +0000 Subject: [issue1005113] test__locale fails on MacOS X Message-ID: <1234162531.81.0.0329750705612.issue1005113@psf.upfronthosting.co.za> Daniel Diniz added the comment: Out-of-date? ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 07:55:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 06:55:50 +0000 Subject: [issue1056293] dir() should only return strings Message-ID: <1234162550.83.0.799740776313.issue1056293@psf.upfronthosting.co.za> Daniel Diniz added the comment: Still present in trunk:69418: class obj: pass obj.__dict__[1] = 0 [k for k in dir(obj) if k.startswith("set_")] ---------- nosy: +ajaksu2 type: -> behavior versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 08:04:43 2009 From: report at bugs.python.org (Andreas Jung) Date: Mon, 09 Feb 2009 07:04:43 +0000 Subject: [issue924806] email.Header.Header() produces wrong headers with utf8 enc. Message-ID: <1234163083.45.0.89304257229.issue924806@psf.upfronthosting.co.za> Andreas Jung added the comment: No idea - this bug is five years old! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 08:11:57 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 07:11:57 +0000 Subject: [issue1170065] HTTPResponse.getheaders() returns lowercased header names Message-ID: <1234163517.46.0.749660831295.issue1170065@psf.upfronthosting.co.za> Daniel Diniz added the comment: Superseder: issue 2275. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 08:16:18 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 09 Feb 2009 07:16:18 +0000 Subject: [issue1384175] random module - Provider DLL failed to initialize correctly Message-ID: <1234163778.42.0.468507678792.issue1384175@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> works for me status: open -> closed versions: +3rd party -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 08:20:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 07:20:24 +0000 Subject: [issue1911] webbrowser.open firefox 3 issues In-Reply-To: <1201051771.85.0.184797349871.issue1911@psf.upfronthosting.co.za> Message-ID: <1234164024.84.0.82690780347.issue1911@psf.upfronthosting.co.za> Daniel Diniz added the comment: Out-of-date: fixed in trunk. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 08:27:01 2009 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 09 Feb 2009 07:27:01 +0000 Subject: [issue3991] urllib.request.urlopen does not handle non-ASCII characters In-Reply-To: <1222627636.82.0.587488225038.issue3991@psf.upfronthosting.co.za> Message-ID: <1234164421.63.0.1196400998.issue3991@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 10:11:01 2009 From: report at bugs.python.org (Thomas Lee) Date: Mon, 09 Feb 2009 09:11:01 +0000 Subject: [issue4347] Circular dependency causes SystemError when adding new syntax In-Reply-To: <1227022091.75.0.852526924329.issue4347@psf.upfronthosting.co.za> Message-ID: <1234170661.27.0.700816047427.issue4347@psf.upfronthosting.co.za> Thomas Lee added the comment: This would appear to be another build quirk: Lib/symbol.py needs to be regenerated if Grammar/Grammar changes. Brett, do you think it would be okay for this file to be generated automatically as part of the build process? I can't think of any good reason why this should continue to be a manual task. Lib/token.py is in a similar boat, except its dependency is on Include/token.h Whatever the decision, I'll provide another review/functional patch pair. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 10:25:02 2009 From: report at bugs.python.org (Jervis Whitley) Date: Mon, 09 Feb 2009 09:25:02 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1234171502.28.0.373023500591.issue1818@psf.upfronthosting.co.za> Jervis Whitley added the comment: An implementation of a namedtuple reader and writer. Created a writer for the case where user would like to specify desired field names and default values on missing field names. e.g. mywriter = NamedTupleWriter(f, fieldnames=['f1', 'f2', 'f3'], restval='missing') Nt = namedtuple('LessFields', 'f1 f3') nt = Nt(f1='one', f2=2) mywriter.writerow(nt) # writes one,missing,2 any thoughts on case where defined fieldname has a leading underscore? Should there be a flag to silently ignore? e.g. if self._ignore_underscores: fieldname = fieldname.lstrip('_') Leading underscores may be present in an unsighted csv file, additionally, spaces and other non alpha numeric characters pose a problem that does not affect the DictReader class. Cheers, ---------- keywords: +patch nosy: +jdwhitley Added file: http://bugs.python.org/file12990/ntreader3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 11:32:00 2009 From: report at bugs.python.org (Ulrich Eckhardt) Date: Mon, 09 Feb 2009 10:32:00 +0000 Subject: [issue5134] Compiler warnings in sqlite module In-Reply-To: <1233600780.48.0.187282999033.issue5134@psf.upfronthosting.co.za> Message-ID: <1234175520.73.0.882293103434.issue5134@psf.upfronthosting.co.za> Ulrich Eckhardt added the comment: "What specific file would you put these pragmas into? Are you perhaps proposing to change upstream code?" I would put it into the only sourcefile there is, and yes, I would change upstream code. Obviously, it would be better to get upstream to incorporate those changes... Other than that, I'm +1 for your solution using the vsprops file, which looks clean to me. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 13:37:07 2009 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 09 Feb 2009 12:37:07 +0000 Subject: [issue924806] email.Header.Header() produces wrong headers with utf8 enc. Message-ID: <1234183027.09.0.638330078103.issue924806@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: This isn't a bug in Python, since it does the right thing by aliasing 'utf8' with 'utf-8'. If this is incompatible with external mail tools, then you should use 'utf-8' instead, but I don't think Python should change that underneath you. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 14:23:12 2009 From: report at bugs.python.org (Bluebird) Date: Mon, 09 Feb 2009 13:23:12 +0000 Subject: [issue5190] optparse doex not export make_option In-Reply-To: <1234185792.84.0.378540305485.issue5190@psf.upfronthosting.co.za> Message-ID: <1234185792.84.0.378540305485.issue5190@psf.upfronthosting.co.za> New submission from Bluebird : The documentation of optparse mentions make_option() as the standard way to create an option list: For example, in the doc of python 2.5: ==== 14.3.3.2 Populating the parser [...] pass it an Option instance (as returned by make_option()) [...] option_list = [ make_option("-f", "--filename", action="store", type="string", dest="filename"), make_option("-q", "--quiet", action="store_false", dest="verbose"), ] (make_option() is a factory function for creating Option instances; currently it is an alias for the Option constructor. A future version of optparse may split Option into several classes, and make_option() will pick the right class to instantiate. Do not instantiate Option directly.) =============== However, make_option is not part of the function exported in the __all__ list of optparse. Strangely enough, this does not prevent to use make_option() in regular python scripts, but it does not work when packaging a python application, for example with pyinstaller. The problem is also present in python 2.6 The fix is either to update the documentation to use Option() directly or to add make_option to __all__ ---------- assignee: georg.brandl components: Documentation, Library (Lib) messages: 81456 nosy: bluebird, georg.brandl severity: normal status: open title: optparse doex not export make_option type: behavior versions: Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 14:59:20 2009 From: report at bugs.python.org (Ben North) Date: Mon, 09 Feb 2009 13:59:20 +0000 Subject: [issue5191] Partial function application 'from the right' In-Reply-To: <1234187960.68.0.343533185797.issue5191@psf.upfronthosting.co.za> Message-ID: <1234187960.68.0.343533185797.issue5191@psf.upfronthosting.co.za> New submission from Ben North : The functools module includes a 'partial' class, which allows partial function application either by positional arguments or keyword arguments. However, it cannot be used to create, for example, a function splitting a string on commas, or a function to extracts logs to base 10. I posted http://mail.python.org/pipermail/python-dev/2009-January/085638.html which suggested a 'partial_right' feature, such that the following would work: >>> import functools, math >>> split_comma = functools.partial_right(str.split, ',') >>> split_comma('a,b,c') ['a', 'b', 'c'] >>> log_10 = functools.partial_right(math.log, 10.0) >>> log_10(100.0) 2.0 There was some useful discussion, but generally the feeling was that the extra complexity outweighed the potential benefits. Also, chained partial applications were troublesome. The overlap in functionality between 'partial_right' and an existing patch (#1706256) to allow skipping of positional arguments was raised. I think the present issue should probably be closed/rejected, but it was suggested on the mailing list that having the issue and patch on the record might be useful. Patches are against 2.6.1 source. ---------- messages: 81457 nosy: bennorth severity: normal status: open title: Partial function application 'from the right' type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 15:00:43 2009 From: report at bugs.python.org (Ben North) Date: Mon, 09 Feb 2009 14:00:43 +0000 Subject: [issue5191] Partial function application 'from the right' In-Reply-To: <1234187960.68.0.343533185797.issue5191@psf.upfronthosting.co.za> Message-ID: <1234188043.78.0.962700719726.issue5191@psf.upfronthosting.co.za> Changes by Ben North : ---------- keywords: +patch Added file: http://bugs.python.org/file12991/_functoolsmodule.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 15:01:18 2009 From: report at bugs.python.org (Ben North) Date: Mon, 09 Feb 2009 14:01:18 +0000 Subject: [issue5191] Partial function application 'from the right' In-Reply-To: <1234187960.68.0.343533185797.issue5191@psf.upfronthosting.co.za> Message-ID: <1234188078.9.0.945693032782.issue5191@psf.upfronthosting.co.za> Changes by Ben North : Added file: http://bugs.python.org/file12992/test_functools.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 15:19:17 2009 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 09 Feb 2009 14:19:17 +0000 Subject: [issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86 In-Reply-To: <1228653764.46.0.349797077595.issue4575@psf.upfronthosting.co.za> Message-ID: <1234189157.28.0.200614007848.issue4575@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed (I hope!) in the trunk in r69459. I'll wait for buildbot results (just in case) and then merge to 2.6, 3.1 and 3.0. The same test_cmath failure can also be seen on OS X 10.5.6/Intel when compiling with -fmpmath=387. Annoyingly, the fix above doesn't work here: it seems that the OS X isinf is buggy. It doesn't seem worth working around this bug though, since there's little sane reason to be compiling with -fmpmath=387 in the first place, so it's unlikely that any regular Python users will encounter this problem. ---------- resolution: -> fixed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 16:17:29 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 09 Feb 2009 15:17:29 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1234192649.17.0.219403790184.issue4804@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Ok, how about this comment, Martin? /* Microsoft CRT in VS2005 and higher will verify that a filehandle is * valid and throw an assertion if it isn't. * Normally, an invalid fd is likely to be a C program error and therefore * an assertion can be useful, but it does contradict the POSIX standard * which for write(2) states: * "Otherwise, -1 shall be returned and errno set to indicate the error." * "[EBADF] The fildes argument is not a valid file descriptor open for * writing." * Furthermore, python allows the user to enter any old integer * as a fd and should merely raise a python exception on error. * The Microsoft CRT doesn't provide an official way to check for the * validity of a file descriptor, but we can emulate its internal behaviour * by using the exported __pinfo data member and knowledge of the * internal structures involved. * The structures below must be updated for each version of visual studio * according to the file internal.h in the CRT source, until MS comes * up with a less hacky way to do this. * (all of this is to avoid globally modifying the CRT behaviour using * _set_invalid_parameter_handler() and _CrtSetReportMode()) */ Also, I've added the following to fileobject.h, not coming up with a better place: #if defined _MSC_VER && _MSC_VER >= 1400 /* A routine to check if a file descriptor is valid on Windows. Returns 0 * and sets errno to EBADF if it isn't. This is to avoid Assertions * from various functions in the Windows CRT beginning with * Visual Studio 2005 */ int _PyVerify_fd(int fd); #else #define _PyVerify_fd(A) (1) /* dummy */ #endif _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 16:22:29 2009 From: report at bugs.python.org (Calvin Spealman) Date: Mon, 09 Feb 2009 15:22:29 +0000 Subject: [issue5191] Partial function application 'from the right' In-Reply-To: <1234187960.68.0.343533185797.issue5191@psf.upfronthosting.co.za> Message-ID: <1234192949.97.0.876182912206.issue5191@psf.upfronthosting.co.za> Changes by Calvin Spealman : ---------- nosy: +ironfroggy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 16:26:18 2009 From: report at bugs.python.org (Akira Kitada) Date: Mon, 09 Feb 2009 15:26:18 +0000 Subject: [issue1083299] Distutils doesn't pick up all the files it should. Message-ID: <1234193178.47.0.0992897412018.issue1083299@psf.upfronthosting.co.za> Akira Kitada added the comment: I don't think that's not depends keyword is used for. I assume explanation on issue5158 is the way that "depends" is supposed to be used. ---------- nosy: +akitada, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 16:30:48 2009 From: report at bugs.python.org (Akira Kitada) Date: Mon, 09 Feb 2009 15:30:48 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1234193448.78.0.0366622857359.issue1222585@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 17:00:36 2009 From: report at bugs.python.org (Akira Kitada) Date: Mon, 09 Feb 2009 16:00:36 +0000 Subject: [issue1589266] bdist_sunpkg distutils command Message-ID: <1234195236.66.0.354419309489.issue1589266@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 17:40:16 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 09 Feb 2009 16:40:16 +0000 Subject: [issue4890] handling empty text search pattern in tkinter In-Reply-To: <1231496629.01.0.458062958908.issue4890@psf.upfronthosting.co.za> Message-ID: <1234197616.81.0.812719060636.issue4890@psf.upfronthosting.co.za> Changes by Guilherme Polo : ---------- assignee: -> gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 17:44:13 2009 From: report at bugs.python.org (David W. Lambert) Date: Mon, 09 Feb 2009 16:44:13 +0000 Subject: [issue5192] Update log message formatting. In-Reply-To: <1234197852.95.0.276908828254.issue5192@psf.upfronthosting.co.za> Message-ID: <1234197852.95.0.276908828254.issue5192@psf.upfronthosting.co.za> New submission from David W. Lambert : Allow logger object log message creation methods using ''.format method. have: logger_object.info('%s','lazy is better') logger_object.debug('{0!s}'.format('wasted effort')) want: logger_object.debug('{0}','Lazy') Work'rounds from pep282: if log.isEnabledFor(logging.INFO): hamletStr = hamletDom.toxml() log.info(hamletStr) or install custom Formatter. I presume this is already on the back burner. Incidentally, BufferingFormatter.format uses string += string instead of ''.join(list_of_strings). ---------- components: Library (Lib) messages: 81461 nosy: LambertDW severity: normal status: open title: Update log message formatting. type: feature request versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 17:44:50 2009 From: report at bugs.python.org (Gerard) Date: Mon, 09 Feb 2009 16:44:50 +0000 Subject: [issue1519638] Unmatched Group issue - workaround Message-ID: <1234197890.35.0.592153293488.issue1519638@psf.upfronthosting.co.za> Gerard added the comment: Matthew, Thanx for the heads-up! Regards, Gerard. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 17:48:10 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 09 Feb 2009 16:48:10 +0000 Subject: [issue4890] handling empty text search pattern in tkinter In-Reply-To: <1231496629.01.0.458062958908.issue4890@psf.upfronthosting.co.za> Message-ID: <1234198090.41.0.27829595571.issue4890@psf.upfronthosting.co.za> Guilherme Polo added the comment: Fixed on r69461, r69462, r69463 and r69464, thanks. Will be adding tests for Tkinter.Text.search for trunk and py3k only. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 17:54:03 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Feb 2009 16:54:03 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1234198443.01.0.569356296204.issue1818@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Consider providing a hook to a function that converts non-conforming field names (ones with a leading underscore, leading digit, non-letter, keyword, or duplicate name). class NamedTupleReader: def __init__(self, f, fieldnames=None, restkey=None, restval=None, dialect="excel", fieldnamer=None, *args, **kwds): . . . I'm going to either post a recipe to do the renaming or provide a static method for the same purpose. It might work like this: >>> renamer(['abc', 'def', '1', '_hidden', 'abc', 'p', 'abc']) ['abc', 'x_def', 'x_1', 'x_hidden', 'x_abc', 'p', 'x1_abc'] _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 18:08:57 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 09 Feb 2009 17:08:57 +0000 Subject: [issue5193] Guarantee that Tkinter.Text.search returns a string In-Reply-To: <1234199337.14.0.524717083127.issue5193@psf.upfronthosting.co.za> Message-ID: <1234199337.14.0.524717083127.issue5193@psf.upfronthosting.co.za> New submission from Guilherme Polo : Tkinter.Text.search is supposed to return a string, but this is not always true. The problem is much more likely to be noticed while using Tk 8.5. ---------- components: Tkinter files: ensure_search_returns_str.diff keywords: patch messages: 81465 nosy: gpolo severity: normal status: open title: Guarantee that Tkinter.Text.search returns a string versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file12993/ensure_search_returns_str.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 18:18:55 2009 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 09 Feb 2009 17:18:55 +0000 Subject: [issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86 In-Reply-To: <1228653764.46.0.349797077595.issue4575@psf.upfronthosting.co.za> Message-ID: <1234199935.14.0.116988158305.issue4575@psf.upfronthosting.co.za> Mark Dickinson added the comment: Merged to py3k in r69465. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 19:40:44 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Feb 2009 18:40:44 +0000 Subject: [issue5171] itertools.product docstring missing 'repeat' argument In-Reply-To: <1233938945.33.0.092220516904.issue5171@psf.upfronthosting.co.za> Message-ID: <1234204844.39.0.82634867177.issue5171@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed in r69466. Benjamin, do you want to merge it to 2.6, 3.0, and 3.1? ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 19:46:33 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 09 Feb 2009 18:46:33 +0000 Subject: [issue5120] Disabling test_ttk_guionly on mac In-Reply-To: <1233437150.39.0.445953575427.issue5120@psf.upfronthosting.co.za> Message-ID: <1234205193.04.0.205446143855.issue5120@psf.upfronthosting.co.za> Guilherme Polo added the comment: The abort still happens occasionally, see: http://www.python.org/dev/buildbot/all/OS%20X%20x86%20trunk/builds/118/step-test/0 (last lines) I've talked with Daniel Steffen, who is one of the maintainers of Tcl/Tk on Mac OSX, and I was told that all this conditional code in _tkinter.c and tkappinit.c for TK_AQUA is outdated starting with tk 8.4.8, but tk 8.4.7 that ships with macosx (which happens to be the version being used by the buildslave mentioned above) also includes the patch that deprecates the usage, and we should be calling only Tk_Init on tkappinit.c which will deal with all the details (the details are in tkMacOSXInit:TkpInit). There is an entry in tk's changelog that is directly related to this: http://tktoolkit.cvs.sourceforge.net/viewvc/tktoolkit/tk/ChangeLog.2004?revision=1.1&view=markup (lines 210-220) Any chance I can change _tkinter and tkappinit to check for TKINTER_OLD_AQUA (new macro to be added) instead of TK_AQUA and verify if it helps the buildslaves ? ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 19:51:15 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 09 Feb 2009 18:51:15 +0000 Subject: [issue4347] Circular dependency causes SystemError when adding new syntax In-Reply-To: <1234170661.27.0.700816047427.issue4347@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Mon, Feb 9, 2009 at 01:11, Thomas Lee wrote: > > Thomas Lee added the comment: > > This would appear to be another build quirk: Lib/symbol.py needs to be > regenerated if Grammar/Grammar changes. > > Brett, do you think it would be okay for this file to be generated > automatically as part of the build process? I can't think of any good > reason why this should continue to be a manual task. > It should be a build rule and not be a manual step. > Lib/token.py is in a similar boat, except its dependency is on > Include/token.h > Same answer. > Whatever the decision, I'll provide another review/functional patch pair. Thanks! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 19:53:00 2009 From: report at bugs.python.org (Brett Cannon) Date: Mon, 09 Feb 2009 18:53:00 +0000 Subject: [issue1005113] test__locale fails on MacOS X Message-ID: <1234205580.9.0.716948343653.issue1005113@psf.upfronthosting.co.za> Brett Cannon added the comment: It's probably out of date. I will check if it is still failing tonight or tomorrow probably. ---------- assignee: jackjansen -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 20:03:08 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Mon, 09 Feb 2009 19:03:08 +0000 Subject: [issue1660009] continuing problem with httplib multiple set-cookie headers Message-ID: <1234206188.9.0.501091593549.issue1660009@psf.upfronthosting.co.za> Gabriel Genellina added the comment: I think this report is outdated and no more relevant. ---------- nosy: +gagenellina _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 20:07:35 2009 From: report at bugs.python.org (Rob Probin) Date: Mon, 09 Feb 2009 19:07:35 +0000 Subject: [issue918368] urllib doesn't correct server returned urls Message-ID: <1234206455.19.0.330380658172.issue918368@psf.upfronthosting.co.za> Rob Probin added the comment: I agree - this appears to be the same as issue 1153027 ? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 20:09:57 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 09 Feb 2009 19:09:57 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1234206597.21.0.973712300136.issue2636@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Besides the fact that this is probably great work, I really wonder who will have enough time and skills to review such a huge patch... :-S In any case, some recommendations: - please provide patches against trunk; there is no way such big changes will get committed against 2.6, which is in maintenance mode - avoid, as far as possible, doing changes in style, whitespace or indentation; this will make the patch slightly smaller or cleaner - avoid C++-style comments (use /* ... */ instead) - don't hesitate to add extensive comments and documentation about what you've added Once you think your patch is ready, you may post it to http://codereview.appspot.com/, in the hope that it makes reviewing easier. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 20:10:11 2009 From: report at bugs.python.org (Rob Probin) Date: Mon, 09 Feb 2009 19:10:11 +0000 Subject: [issue1153027] http_error_302() crashes with 'HTTP/1.1 400 Bad Request Message-ID: <1234206611.13.0.502732357735.issue1153027@psf.upfronthosting.co.za> Rob Probin added the comment: Appears to be the same as issue 918368 ---------- nosy: +robzed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 20:17:45 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 09 Feb 2009 19:17:45 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1234207065.92.0.777772240781.issue2636@psf.upfronthosting.co.za> Antoine Pitrou added the comment: One thing I forgot: - please don't make lines longer than 80 characters :-) Once the code has settled down, it would also be interesting to know if performance has changed compared to the previous implementation. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 20:22:19 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 09 Feb 2009 19:22:19 +0000 Subject: [issue4890] handling empty text search pattern in tkinter In-Reply-To: <1231496629.01.0.458062958908.issue4890@psf.upfronthosting.co.za> Message-ID: <1234207339.42.0.976288573166.issue4890@psf.upfronthosting.co.za> Guilherme Polo added the comment: I've added some tests for it on r69467 now. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 20:22:42 2009 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 09 Feb 2009 19:22:42 +0000 Subject: [issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError? In-Reply-To: <1233963466.4.0.0489916221286.issue5175@psf.upfronthosting.co.za> Message-ID: <1234207362.94.0.348988355011.issue5175@psf.upfronthosting.co.za> Mark Dickinson added the comment: > However, I would like to wait until Tim comments on this. You may be in for a long wait! I hesitate to make the heretical suggestion that there may be more important things in life than fixing minor inconsistencies in Python, but I think it's possible that Tim has found some. :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 20:40:29 2009 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 09 Feb 2009 19:40:29 +0000 Subject: [issue1566086] RE (regular expression) matching stuck in loop Message-ID: <1234208429.99.0.355557187935.issue1566086@psf.upfronthosting.co.za> Matthew Barnett added the comment: This problem has been addressed in issue #2636. Extra checks have been added to reduce the amount of backtracking. ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 20:45:08 2009 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 09 Feb 2009 19:45:08 +0000 Subject: [issue1662581] the re module can perform poorly: O(2**n) versus O(n**2) Message-ID: <1234208708.99.0.19108087749.issue1662581@psf.upfronthosting.co.za> Matthew Barnett added the comment: This has been addressed in issue #2636. ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 20:55:37 2009 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Mon, 09 Feb 2009 19:55:37 +0000 Subject: [issue5169] Default hash not equal to id on AMD Sempron In-Reply-To: <1233929788.34.0.870033033845.issue5169@psf.upfronthosting.co.za> Message-ID: <1234209337.18.0.747153882508.issue5169@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Marc, please post the bugid for the "hash>>3" issue. It is interesting enough to pursue it. ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 21:03:35 2009 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 09 Feb 2009 20:03:35 +0000 Subject: [issue5169] Default hash not equal to id on AMD Sempron In-Reply-To: <1233929788.34.0.870033033845.issue5169@psf.upfronthosting.co.za> Message-ID: <1234209815.05.0.667952403429.issue5169@psf.upfronthosting.co.za> Mark Dickinson added the comment: See issue 5186 for using id()/8 for the hash. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 21:06:41 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Feb 2009 20:06:41 +0000 Subject: [issue5169] Default hash not equal to id on AMD Sempron In-Reply-To: <1233929788.34.0.870033033845.issue5169@psf.upfronthosting.co.za> Message-ID: <1234210001.96.0.0218896382312.issue5169@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Tim, any thoughts? ---------- assignee: -> tim_one nosy: +tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 21:12:15 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Feb 2009 20:12:15 +0000 Subject: [issue3783] dbm.sqlite proof of concept In-Reply-To: <1220572652.24.0.256023256295.issue3783@psf.upfronthosting.co.za> Message-ID: <1234210335.3.0.394544837418.issue3783@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Unassigning. The code works but no one seems to be pushing for or caring about inclusion in Py3.1. If commits are delayed, then you might as well adopt the dbdict.py approach instead (reading the file in once at the beginning, operating directly on a dict subclass, and atomically writing it out at the end). ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 21:23:06 2009 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 09 Feb 2009 20:23:06 +0000 Subject: [issue1662581] the re module can perform poorly: O(2**n) versus O(n**2) Message-ID: <1234210986.67.0.205678288987.issue1662581@psf.upfronthosting.co.za> Mark Dickinson added the comment: > This has been addressed in issue #2636. Are you sure about this? Does the proposed new regex engine use Thompson NFAs, or some variant thereof? ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 21:30:29 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Mon, 09 Feb 2009 20:30:29 +0000 Subject: [issue1856] shutdown (exit) can hang or segfault with daemon threads running In-Reply-To: <1200535276.53.0.276618350299.issue1856@psf.upfronthosting.co.za> Message-ID: <1234211429.28.0.0907111620922.issue1856@psf.upfronthosting.co.za> Gabriel Genellina added the comment: I think applying Rhamphoryncus' patch in #1722344 fixes this too (that is, move WaitForThreadShutdown from the end of PyMain into Py_Finalize, so it is always called) But it should be tested on several platforms. ---------- nosy: +gagenellina _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 21:38:47 2009 From: report at bugs.python.org (Eric Smith) Date: Mon, 09 Feb 2009 20:38:47 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1234211927.37.0.357034406408.issue5122@psf.upfronthosting.co.za> Eric Smith added the comment: The current patch (protect_tk_loading.diff) looks reasonable to me, and it solves my problem with the tests hanging. So I'd suggest you commit the patch, insofar it improves on the current situation. I'm not an expert in tk, however. So if you're looking for advice from someone knowledgeable on tk's inner workings, you'll need to get someone else involved. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 21:45:19 2009 From: report at bugs.python.org (Roy Wood) Date: Mon, 09 Feb 2009 20:45:19 +0000 Subject: [issue1777134] minidom pretty xml output improvement Message-ID: <1234212319.36.0.0430905350102.issue1777134@psf.upfronthosting.co.za> Roy Wood added the comment: This patch would be very useful to me, so I'm sad to see it's been languishing for so long. :-( Is there any way to encourage the maintainer to merge this into the current branch? ---------- nosy: +rrwood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 21:55:16 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 09 Feb 2009 20:55:16 +0000 Subject: [issue5122] test_tcl and test_ttk_guionly don't like each other In-Reply-To: <1233463509.87.0.136338063831.issue5122@psf.upfronthosting.co.za> Message-ID: <1234212916.79.0.454280823746.issue5122@psf.upfronthosting.co.za> Guilherme Polo added the comment: Thanks Eric, committed in r69473. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:01:10 2009 From: report at bugs.python.org (John J Lee) Date: Mon, 09 Feb 2009 21:01:10 +0000 Subject: [issue1660009] continuing problem with httplib multiple set-cookie headers Message-ID: <1234213270.92.0.871415337701.issue1660009@psf.upfronthosting.co.za> John J Lee added the comment: Why? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:11:58 2009 From: report at bugs.python.org (Gabriel Genellina) Date: Mon, 09 Feb 2009 21:11:58 +0000 Subject: [issue1777134] minidom pretty xml output improvement Message-ID: <1234213918.96.0.965813021453.issue1777134@psf.upfronthosting.co.za> Changes by Gabriel Genellina : ---------- nosy: +gagenellina _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:12:14 2009 From: report at bugs.python.org (John J Lee) Date: Mon, 09 Feb 2009 21:12:14 +0000 Subject: [issue918368] urllib doesn't correct server returned urls Message-ID: <1234213934.97.0.759958422491.issue918368@psf.upfronthosting.co.za> John J Lee added the comment: This bug refers to urllib. Issue 1153027 refers to urllib2. It's the same problem in each case, though. ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:13:13 2009 From: report at bugs.python.org (John J Lee) Date: Mon, 09 Feb 2009 21:13:13 +0000 Subject: [issue1153027] http_error_302() crashes with 'HTTP/1.1 400 Bad Request Message-ID: <1234213993.33.0.364711020758.issue1153027@psf.upfronthosting.co.za> John J Lee added the comment: This bug refers to urllib2. Issue 918368 refers to urllib. It's the same problem in each case, though. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:26:31 2009 From: report at bugs.python.org (Robin Dunn) Date: Mon, 09 Feb 2009 21:26:31 +0000 Subject: [issue5019] Specifying common controls DLL in manifest In-Reply-To: <1232503239.64.0.982507078752.issue5019@psf.upfronthosting.co.za> Message-ID: <1234214791.51.0.768792524134.issue5019@psf.upfronthosting.co.za> Robin Dunn added the comment: If I understand correctly then setting an activation context won't help because by the time that an extension module is loaded the choice of which version of the common controls DLL will be loaded has already been made, and it may in fact already be loaded. The system must be told at the time that the .exe is loaded which common controls DLL it wants, otherwise it will use the old non-themed version. Everything I've tried seems to confirm this, if that is not true I'd love to see some examples. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:32:42 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 09 Feb 2009 21:32:42 +0000 Subject: [issue5019] Specifying common controls DLL in manifest In-Reply-To: <1232503239.64.0.982507078752.issue5019@psf.upfronthosting.co.za> Message-ID: <1234215162.68.0.212751368938.issue5019@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you provide an example of a manifest file, and a Python script, that demonstrates the problem? I have only heard of themes, never seen them myself. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:37:17 2009 From: report at bugs.python.org (David Margrave) Date: Mon, 09 Feb 2009 21:37:17 +0000 Subject: [issue1660009] continuing problem with httplib multiple set-cookie headers Message-ID: <1234215437.39.0.924969539903.issue1660009@psf.upfronthosting.co.za> David Margrave added the comment: I'm not down in the weeds on this one at the moment (it was a long time ago and I've mostly forgotten about it), but recall that I agreed with jjlee's 3/15/07 annotation: http://bugs.python.org/msg31276 At least, I was able to get my application working by just using getallmatchingheaders(). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:45:32 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 21:45:32 +0000 Subject: [issue816059] popen2 work, fixes bugs 768649 and 761888 Message-ID: <1234215932.25.0.389549910829.issue816059@psf.upfronthosting.co.za> Daniel Diniz added the comment: Maybe this is a won't fix, since popen2 in long deprecated? ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:45:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 21:45:55 +0000 Subject: [issue713169] test_pty fails on HP-UX and AIX when run after test_openpty Message-ID: <1234215955.61.0.996213309606.issue713169@psf.upfronthosting.co.za> Daniel Diniz added the comment: Unless this still is a confirmed problem in supported platforms, closing suggested. ---------- components: +Tests -Build nosy: +ajaksu2 type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:46:31 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 21:46:31 +0000 Subject: [issue727898] Support for sending multipart form data Message-ID: <1234215991.21.0.390399383392.issue727898@psf.upfronthosting.co.za> Daniel Diniz added the comment: Superseder: issue 3244. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:47:09 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 21:47:09 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1234216029.97.0.407488425744.issue3244@psf.upfronthosting.co.za> Daniel Diniz added the comment: So, what is the best way to go about this (beyond docs and tests)? Beat the linked recipe into a patch, adapt Chris' implementation? ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:49:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 21:49:39 +0000 Subject: [issue500698] Taint a la Perl? Message-ID: <1234216179.81.0.755212580716.issue500698@psf.upfronthosting.co.za> Daniel Diniz added the comment: On http://mail.python.org/pipermail/python-dev/2008-November/083732.html Nicole King wrote: """ I found I needed support for taint mode in python and have done some work to realise this. It's by no means complete at this time, but I'm floating this idea on this group to see how much interest there is. The implementation is pretty simple: - an extra field in PyObject to maintain the taint status - a couple of extra functions __gettaint__() that returns the taint status and __settaint__(value) that sets the taint value, returning the previous status - an additional command-line flag -a and environment variable PYTHONIGNORETAINT that suppress taint checking - a few macros defined in Objects/object.h to support taint management - a new built-in exception, PyExc_TaintError, for reporting operations on tainted objects """ More information and download: http://www.cats-muvva.net/software/ ---------- nosy: +ajaksu2 versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:49:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 21:49:52 +0000 Subject: [issue624827] Creation of struct_seq types Message-ID: <1234216192.13.0.359901246578.issue624827@psf.upfronthosting.co.za> Daniel Diniz added the comment: Issue 980098 was considered obsolete now there is namedtuple, so this one should be closed too. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:50:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 21:50:27 +0000 Subject: [issue748843] Let Email.Utils.parsedate use last 3 timetuple items Message-ID: <1234216227.59.0.951047974342.issue748843@psf.upfronthosting.co.za> Daniel Diniz added the comment: Should I update/correct the patch or is this a won't fix? ---------- nosy: +ajaksu2, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:50:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 21:50:44 +0000 Subject: [issue775321] plistlib error handling Message-ID: <1234216244.48.0.827666597916.issue775321@psf.upfronthosting.co.za> Daniel Diniz added the comment: Here's a very simple patch, is this the only path for errors from garbage? I think docs are needed too: if apps catching ExpatError explicitly, will break. Not sure if this should actually change, as I don't use plistlib. I havve nothing against closing this RFE as won't fix :) ---------- components: +Library (Lib) -None keywords: +patch nosy: +ajaksu2 type: -> feature request versions: +Python 2.7 Added file: http://bugs.python.org/file12994/plistlib_garbage.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:51:09 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 21:51:09 +0000 Subject: [issue775309] button methods tkButtonDown, etc don't work Message-ID: <1234216269.77.0.95842543028.issue775309@psf.upfronthosting.co.za> Daniel Diniz added the comment: gpolo: So this one should be closed, right? Out-of-date and superseded by issue 4350. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:58:41 2009 From: report at bugs.python.org (Robin Dunn) Date: Mon, 09 Feb 2009 21:58:41 +0000 Subject: [issue5019] Specifying common controls DLL in manifest In-Reply-To: <1232503239.64.0.982507078752.issue5019@psf.upfronthosting.co.za> Message-ID: <1234216721.14.0.448790615509.issue5019@psf.upfronthosting.co.za> Robin Dunn added the comment: Ok, the following files will be attached: python.exe.manifest: This is a copy of the manifest resource that I put into the 2.6.1 python.exe file by hand for testing. The original manifest was the same but without the 2nd ... group. sample.py: the simple little sample I used to make the screenshots. Snap001,png: This is sample.py running with the original python.exe running on Vista. Notice the plain, flat, outdated and ugly win2k look and style of the notebook tabs and buttons. Snap002.png: The same sample running with a modified python.exe. Now it has textures, gradients, mouse-over effects and etc. and will match the look of other modern applications running on the machine that are using the standard themes. Added file: http://bugs.python.org/file12995/python.exe.manifest _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:58:58 2009 From: report at bugs.python.org (Robin Dunn) Date: Mon, 09 Feb 2009 21:58:58 +0000 Subject: [issue5019] Specifying common controls DLL in manifest In-Reply-To: <1232503239.64.0.982507078752.issue5019@psf.upfronthosting.co.za> Message-ID: <1234216738.09.0.106469989474.issue5019@psf.upfronthosting.co.za> Changes by Robin Dunn : Added file: http://bugs.python.org/file12996/sample.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:59:34 2009 From: report at bugs.python.org (Robin Dunn) Date: Mon, 09 Feb 2009 21:59:34 +0000 Subject: [issue5019] Specifying common controls DLL in manifest In-Reply-To: <1232503239.64.0.982507078752.issue5019@psf.upfronthosting.co.za> Message-ID: <1234216774.63.0.00753164788056.issue5019@psf.upfronthosting.co.za> Changes by Robin Dunn : Added file: http://bugs.python.org/file12997/Snap001.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:59:52 2009 From: report at bugs.python.org (Robin Dunn) Date: Mon, 09 Feb 2009 21:59:52 +0000 Subject: [issue5019] Specifying common controls DLL in manifest In-Reply-To: <1232503239.64.0.982507078752.issue5019@psf.upfronthosting.co.za> Message-ID: <1234216792.89.0.965406836317.issue5019@psf.upfronthosting.co.za> Changes by Robin Dunn : Added file: http://bugs.python.org/file12998/Snap002.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 23:02:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 22:02:59 +0000 Subject: [issue848910] Enable crosscompilation Message-ID: <1234216979.59.0.10783998278.issue848910@psf.upfronthosting.co.za> Daniel Diniz added the comment: Seems out-of-date, more recent efforts should go into a new issue IMO. This issue focus on generic aspects of cross-compilation, as issue 1006238 (patch). I think issue 660095 (if still valid!) is akin to this problem. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 23:04:10 2009 From: report at bugs.python.org (Guilherme Polo) Date: Mon, 09 Feb 2009 22:04:10 +0000 Subject: [issue775309] button methods tkButtonDown, etc don't work Message-ID: <1234217050.48.0.861405976235.issue775309@psf.upfronthosting.co.za> Guilherme Polo added the comment: Thanks for remembering, Daniel. Closing as noted above. ---------- resolution: -> out of date status: open -> closed superseder: -> Remove dead code from Tkinter.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 23:10:14 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 22:10:14 +0000 Subject: [issue994023] threads duplicated on fork() prevent child from terminating Message-ID: <1234217414.98.0.829090528602.issue994023@psf.upfronthosting.co.za> Daniel Diniz added the comment: Test case works for me with trunk and py3k (rev. 69469) on Linux 2.6.24 ia32. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 23:14:19 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 22:14:19 +0000 Subject: [issue1122301] marshal may crash on truncated input Message-ID: <1234217659.6.0.235865587976.issue1122301@psf.upfronthosting.co.za> Daniel Diniz added the comment: Reported as fixed by nnorwitz in msg24300, 2.4 is not supported anymore. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 23:17:58 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Feb 2009 22:17:58 +0000 Subject: [issue624827] Creation of struct_seq types Message-ID: <1234217878.91.0.79271205326.issue624827@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 23:25:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 22:25:59 +0000 Subject: [issue1112955] move_file()'s return value when dry_run=1 unclear Message-ID: <1234218359.37.0.987327707444.issue1112955@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed for trunk and py3k. Might look unimportant, but IMHO having the same results with dry_run=1 would make it much easier to e.g. generate target lists. Let me know if a patch would help. ---------- nosy: +ajaksu2, tarek type: -> behavior versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 23:30:23 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 09 Feb 2009 22:30:23 +0000 Subject: [issue1112955] move_file()'s return value when dry_run=1 unclear Message-ID: <1234218623.87.0.367206621843.issue1112955@psf.upfronthosting.co.za> Tarek Ziad? added the comment: > Let me know if a patch would help. Sure ! ---------- assignee: -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 23:39:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 22:39:26 +0000 Subject: [issue1103023] raw_input problem with readline and UTF8 Message-ID: <1234219166.62.0.556724899551.issue1103023@psf.upfronthosting.co.za> Daniel Diniz added the comment: Please close this, reportedly fixed and no further info from OP. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 23:49:51 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 22:49:51 +0000 Subject: [issue1096310] sys.__stdout__ doco isn't discouraging enough Message-ID: <1234219791.77.0.67773059149.issue1096310@psf.upfronthosting.co.za> Daniel Diniz added the comment: Current docs seem to explain what __stdout__ is for: """ __stdin__ / __stdout__ / __stderr__ These objects contain the original values of stdin, stderr and stdout at the start of the program. They are used during finalization, and could be useful to restore the actual files to known working file objects in case they have been overwritten with a broken object. """ Should a note of warning be added? Something like: Explicitly saving the original IO streams and restoring them after redirection is safer and the recommended idiom. ---------- nosy: +ajaksu2 versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 23:58:13 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 09 Feb 2009 22:58:13 +0000 Subject: [issue5019] Specifying common controls DLL in manifest In-Reply-To: <1232503239.64.0.982507078752.issue5019@psf.upfronthosting.co.za> Message-ID: <1234220293.33.0.687175892373.issue5019@psf.upfronthosting.co.za> Martin v. L?wis added the comment: It looks like it should be possible to bind to a different comctl32.dll than what gets loaded by the host application. See this KB article: http://support.microsoft.com/default.aspx/kb/830033 which even claims that you should be able to do so with manifests (notice how you need to define ISOLATION_AWARE_ENABLED to get different versions of CreateWindowEx etc); also see the .NET code on how they use explicit activation contexts Also see http://blogs.msdn.com/junfeng/archive/2007/06/26/rt-manifest-resource-and-isolation-aware-enabled.aspx for an explanation what resources must be defined so that a DLL can bind to a different version than the rest of the process. I think you want to put the comctl32 manifest binding into RT_MANIFEST resource 2 (not 1, as you probably had tried so far). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 00:07:52 2009 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Mon, 09 Feb 2009 23:07:52 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234220872.64.0.742689858789.issue5186@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 00:15:21 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 23:15:21 +0000 Subject: [issue1103926] email.base64MIME.header_encode vs RFC 1522 Message-ID: <1234221321.56.0.707248550919.issue1103926@psf.upfronthosting.co.za> Daniel Diniz added the comment: RFC 2047 says the encoding is case-insensitive. Please, close as invalid. RFC 2047: 2. Syntax of encoded-words An 'encoded-word' is defined by the following ABNF grammar. [...] encoded-word = "=?" charset "?" encoding "?" encoded-text "?=" charset = token ; see section 3 encoding = token ; see section 4 [...] Both 'encoding' and 'charset' names are case-independent. Thus the charset name "ISO-8859-1" is equivalent to "iso-8859-1", and the encoding named "Q" may be spelled either "Q" or "q". ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 00:37:40 2009 From: report at bugs.python.org (engelbert gruber) Date: Mon, 09 Feb 2009 23:37:40 +0000 Subject: [issue2263] struct.pack() + numpy int raises SystemError In-Reply-To: <1205134764.8.0.415620235375.issue2263@psf.upfronthosting.co.za> Message-ID: <1234222660.94.0.557507144178.issue2263@psf.upfronthosting.co.za> engelbert gruber added the comment: in 2.7 svn _struct.c formatdef native_table[] = { {'B', sizeof(char), 0, nu_ubyte, np_ubyte}, formatdef bigendian_table[] {'B', 1, 0, nu_ubyte, bp_uint}, formatdef lilendian_table[] {'B', 1, 0, nu_ubyte, lp_uint}, np_ubyte calls get_long b/lp_uint call get_wrapped_ulong which calls #define PyInt_Check(op) \ PyType_FastSubclass((op)->ob_type, Py_TPFLAGS_INT_SUBCLASS) but ob_type is set to BASE flags INT_SUBCLASS i snot set. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 00:40:59 2009 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 09 Feb 2009 23:40:59 +0000 Subject: [issue1662581] the re module can perform poorly: O(2**n) versus O(n**2) Message-ID: <1234222859.79.0.0424547460348.issue1662581@psf.upfronthosting.co.za> Matthew Barnett added the comment: The new code includes some extra checks which, although not foolproof, certainly reduce the amount of backtracking in a lot of cases. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 00:44:53 2009 From: report at bugs.python.org (Ingmar Vanhassel) Date: Mon, 09 Feb 2009 23:44:53 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233584376.51.0.787053739937.issue5128@psf.upfronthosting.co.za> Message-ID: <1234223093.7.0.536902685412.issue5128@psf.upfronthosting.co.za> Changes by Ingmar Vanhassel : ---------- nosy: +ingmar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 00:57:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Mon, 09 Feb 2009 23:57:49 +0000 Subject: [issue1112955] move_file()'s return value when dry_run=1 unclear Message-ID: <1234223869.3.0.622066844642.issue1112955@psf.upfronthosting.co.za> Daniel Diniz added the comment: Here's a very simple-minded patch (with microtest) that changes behavior in a questionable way. If it goes in as-is, dry_run=1 will not always succeed anymore. So it'd be incompatible... but a 1:1 representation of a real move kinda requires some failure mode. It's possible to avoid raising when dry_run=1, logging a warning that a real move would fail, and return the imaginary new full name. Or return None, '', etc. Suggestions? Perhaps studying a use-case makes things clearer. Looks like copy_file already has the same return value independent of dry_run. ---------- keywords: +patch Added file: http://bugs.python.org/file12999/move_file_dry_run.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 02:25:18 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 10 Feb 2009 01:25:18 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1234229118.5.0.00479896721806.issue1818@psf.upfronthosting.co.za> Raymond Hettinger added the comment: In r69480, named tuples gained the ability to automatically rename invalid fieldnames. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 02:38:31 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 10 Feb 2009 01:38:31 +0000 Subject: [issue1004533] PEP 263: help locating the offending character Message-ID: <1234229911.12.0.391934358218.issue1004533@psf.upfronthosting.co.za> Daniel Diniz added the comment: IIUC, we don't have the PEP 263 DeprecationWarning mentioned anymore and this should be closed. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 02:40:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 10 Feb 2009 01:40:26 +0000 Subject: [issue1008086] patch for 767150 Message-ID: <1234230026.4.0.911771732876.issue1008086@psf.upfronthosting.co.za> Daniel Diniz added the comment: This is a patch for issue 767150, which was closed in 2005. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 02:58:20 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 10 Feb 2009 01:58:20 +0000 Subject: [issue5120] Disabling test_ttk_guionly on mac In-Reply-To: <1233437150.39.0.445953575427.issue5120@psf.upfronthosting.co.za> Message-ID: <1234231100.23.0.952116499044.issue5120@psf.upfronthosting.co.za> Changes by Guilherme Polo : ---------- keywords: +patch Added file: http://bugs.python.org/file13000/oldtkaqua.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 03:10:00 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Feb 2009 02:10:00 +0000 Subject: [issue1103023] raw_input problem with readline and UTF8 Message-ID: <1234231800.37.0.424093190279.issue1103023@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 03:10:39 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Feb 2009 02:10:39 +0000 Subject: [issue994023] threads duplicated on fork() prevent child from terminating Message-ID: <1234231839.24.0.570894787837.issue994023@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 03:11:33 2009 From: report at bugs.python.org (Brett Cannon) Date: Tue, 10 Feb 2009 02:11:33 +0000 Subject: [issue5128] compileall: consider ctime In-Reply-To: <1233584376.51.0.787053739937.issue5128@psf.upfronthosting.co.za> Message-ID: <1234231893.84.0.665476219871.issue5128@psf.upfronthosting.co.za> Brett Cannon added the comment: Committed in 69481 and 69482 for trunk and py3k, respectively. Had to rewrite the test code but the compileall patch went in fine. Thanks, Martin! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 03:22:56 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Feb 2009 02:22:56 +0000 Subject: [issue1008086] patch for 767150 Message-ID: <1234232576.22.0.975336502191.issue1008086@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure in_addr_t is available everywhere. "unsigned int" should be a good bet, since it is 32-bits in most platforms. Guarding the code with a "#if (SIZEOF_INT == 4)" and erroring out otherwise will make the patch ok (and, please add a test). ---------- nosy: +pitrou resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 03:23:32 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Feb 2009 02:23:32 +0000 Subject: [issue1008086] patch for 767150 Message-ID: <1234232612.01.0.514358472674.issue1008086@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sorry, reopening. ---------- resolution: out of date -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 03:26:50 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Feb 2009 02:26:50 +0000 Subject: [issue1004533] PEP 263: help locating the offending character Message-ID: <1234232810.66.0.877654525244.issue1004533@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Daniel, do you have developer rights on the tracker? Otherwise, you may ask for them on python-dev if you intend to do some housekeeping :) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 03:29:05 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Feb 2009 02:29:05 +0000 Subject: [issue1096310] sys.__stdout__ doco isn't discouraging enough Message-ID: <1234232945.63.0.702465095215.issue1096310@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> georg.brandl nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 03:55:07 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Feb 2009 02:55:07 +0000 Subject: [issue5194] OS X IDLE.app and bin/idle: missing/extra menu options In-Reply-To: <1234234507.58.0.689231089961.issue5194@psf.upfronthosting.co.za> Message-ID: <1234234507.58.0.689231089961.issue5194@psf.upfronthosting.co.za> New submission from Ned Deily : IDLE is supposed to have various menu customizations when running on OS X. But currently they do not all work and the menus vary if IDLE is launched via IDLE.app versus via command line bin/idle. The most noticeable issue is the lack of a Preferences menu item in IDLE.app to access the IDLE configuration settings. ANALYSIS There are inconsistent OS X execution checks scattered throughout idlelib. Also, the bootstrap mechanism for IDLE.app causes sys.executable to be set incorrectly. Most importantly, idlemain imports idlelib before it has fixed up the execution environment. This can cause the menu fixup in idlelib.Bindings to be skipped. SOLUTION Change idlemain to set up the execution environment consistently and defer idlelib imports until it has done so. Modify several OS X checks in idlelib for consistency. APPLIES py3k, 3.0 -> patch-nad0014-py3k-30.txt trunk, 2.6 -> patch-nad0014-trunk-26.txt DELETE Mac/IDLE/idlemain.py (py3k and 3.0 only!) NOTE In 3.x idlemain.py was copied down into the app bundle: 2.x -> Mac/IDLE/idlemain.py 3.x -> Mac/IDLE/IDLE.app/Contents/Resources/idlemain.py 3.x -> Mac/IDLE/idlemain.py -> unused / delete so there are two versions of this patch. However, the 2.x location was not deleted in 3.x svn so there are two identical files in 3.x prior to this patch. ---------- components: IDLE, Macintosh files: patch-nad0014-trunk-26.txt messages: 81525 nosy: nad severity: normal status: open title: OS X IDLE.app and bin/idle: missing/extra menu options type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13001/patch-nad0014-trunk-26.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 03:55:50 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Feb 2009 02:55:50 +0000 Subject: [issue5194] OS X IDLE.app and bin/idle: missing/extra menu options In-Reply-To: <1234234507.58.0.689231089961.issue5194@psf.upfronthosting.co.za> Message-ID: <1234234550.89.0.369178259348.issue5194@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file13002/patch-nad0014-py3k-30.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 03:59:24 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Feb 2009 02:59:24 +0000 Subject: [issue5195] OS X IDLE.app and bin/idle: incorrect key defaults in 3.x In-Reply-To: <1234234764.34.0.510660013878.issue5195@psf.upfronthosting.co.za> Message-ID: <1234234764.34.0.510660013878.issue5195@psf.upfronthosting.co.za> New submission from Ned Deily : 3.x IDLE uses incorrect default key definitions on OS X If you have not already customized your IDLE key definitions (in ~/.idlerc), 3.x IDLE uses Windows defaults in its menus. ANALYSIS In 2.x, the IDLE Makefile customized the default configs in Lib/idlelib. In 3.x there is no longer a separate IDLE Makefile and the customization step is missing. SOLUTION Add the OS X customization to the Mac/Makefile. APPLIES py3k, 3.0 ---------- components: IDLE, Macintosh files: patch-nad0015-py3k-30.txt messages: 81526 nosy: nad severity: normal status: open title: OS X IDLE.app and bin/idle: incorrect key defaults in 3.x versions: Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13003/patch-nad0015-py3k-30.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 04:04:46 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Feb 2009 03:04:46 +0000 Subject: [issue5196] OS X IDLE.app: may not launch on 3.x In-Reply-To: <1234235086.65.0.906288935492.issue5196@psf.upfronthosting.co.za> Message-ID: <1234235086.65.0.906288935492.issue5196@psf.upfronthosting.co.za> New submission from Ned Deily : 3.x OS X IDLE.app may not launch ANALYSIS 2.x IDLE.app was built using its own Makefile + bundlebuilder. For 3.x, these were eliminated by checking in a skeleton app based on the bundlebuilder model. But the install tailoring of the app does not quite work in all cases. SOLUTION Have the Mac/Makefile do the necessary tailoring. Remove from the IDLE launch script the unnecessary bits left over from bundlebuilder. APPLIES py3k, 3.0 SEE ALSO Issue5194 and Issue5195: patch-nad0014, patch-nad0015 (should be applied first) ---------- components: IDLE, Macintosh files: patch-nad0016-py3k-30.txt messages: 81527 nosy: nad severity: normal status: open title: OS X IDLE.app: may not launch on 3.x versions: Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13004/patch-nad0016-py3k-30.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 04:38:23 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Feb 2009 03:38:23 +0000 Subject: [issue1122301] marshal may crash on truncated input Message-ID: <1234237103.29.0.78946159242.issue1122301@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 04:47:57 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 10 Feb 2009 03:47:57 +0000 Subject: [issue1004533] PEP 263: help locating the offending character Message-ID: <1234237677.2.0.787860163746.issue1004533@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 04:51:05 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Feb 2009 03:51:05 +0000 Subject: [issue5143] OS X: Py_SetProgramName argument has type char*; should be wchar_t* In-Reply-To: <1233679989.65.0.0874106595792.issue5143@psf.upfronthosting.co.za> Message-ID: <1234237865.21.0.891504673135.issue5143@psf.upfronthosting.co.za> Ned Deily added the comment: Here's the results of testing the two patches: - patch-mbstowcs.txt should not do a free on the buffer since Py_SetProgramName is expecting to hold on to it (like with the result of a getenv(3)). - patch-remove-PYTHONEXECUTABLE.txt works as is. However, neither of these patches in and of themselves fix all the issues with OS X IDLE menus on 3.x (most of the issues are present in 2.x as well). See Issue5194, Issue5195, and Issue5196. In particular, the patches in 5194 and 5196 also eliminate the dependence on PYTHONEXECUTABLE influencing sys.executable. So, just looking at IDLE, it would not hurt to remove the PYTHONEXECUTABLE magic. On the other hand, it is a documented behavior of PYTHON: http://docs.python.org/3.0/using/cmdline.html#envvar-PYTHONEXECUTABLE and removing it *could* add extra problems for people porting over bundlebuilder-based apps or for whatever other reason they might be using it. So my recommendation is to fix PYTHONEXECUTABLE. Attached patch patch-nad0013-py3k-30.txt does so. It also includes a fix for another very similar OSX-only 2.x->3.x wchar_t conversion problem which also causes an "incompatible pointer type" build warning, something I noticed while investigating this. The patch has been tested on both py3k and 3.0. patch-nad0013t-py3k-30.txt adds a test case for PYTHONEXECUTABLE behavior. Added file: http://bugs.python.org/file13005/patch-nad0013-py3k-30.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 04:51:20 2009 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Feb 2009 03:51:20 +0000 Subject: [issue5143] OS X: Py_SetProgramName argument has type char*; should be wchar_t* In-Reply-To: <1233679989.65.0.0874106595792.issue5143@psf.upfronthosting.co.za> Message-ID: <1234237880.83.0.859449535809.issue5143@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file13006/patch-nad0013t-py3k-30.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 05:46:33 2009 From: report at bugs.python.org (Robin Dunn) Date: Tue, 10 Feb 2009 04:46:33 +0000 Subject: [issue5019] Specifying common controls DLL in manifest In-Reply-To: <1232503239.64.0.982507078752.issue5019@psf.upfronthosting.co.za> Message-ID: <1234241193.42.0.12646817144.issue5019@psf.upfronthosting.co.za> Robin Dunn added the comment: Sorry, no luck. I've tried before to ensure that all the DLLs and extension modules have the manifest file (in resource 2) and it makes no difference. I rebuilt wxWidgets and wxPython today with ISOLATION_AWARE_ENABLED defined to check if that would help, and reset the manifest resource in all the binaries, but it makes no difference. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 06:14:43 2009 From: report at bugs.python.org (pest) Date: Tue, 10 Feb 2009 05:14:43 +0000 Subject: [issue5197] vars() assignment fails silently when assignments made later In-Reply-To: <1234242883.43.0.910584647004.issue5197@psf.upfronthosting.co.za> Message-ID: <1234242883.43.0.910584647004.issue5197@psf.upfronthosting.co.za> New submission from pest : Assignments to vars() behave incorrectly if those variables are use later on in a function. For example, try this: ====== #!/usr/bin/python def zz(): for i in [1,2,3]: for j in [4,5,6]: vars()['fw_%s_%s' % (j,i)] = 'test %s %s' % (j, i) print vars()['fw_%s_%s' % (j,i)] fw_4_2 = 'zz' print fw_4_2 zz() ====== The assignments work fine up till 4_2. At 4_2, the assignment apparently fails silently, and the print raises a keyError exception. ---------- components: None messages: 81530 nosy: pest severity: normal status: open title: vars() assignment fails silently when assignments made later type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 07:55:36 2009 From: report at bugs.python.org (=?utf-8?q?Hagen_F=C3=BCrstenau?=) Date: Tue, 10 Feb 2009 06:55:36 +0000 Subject: [issue5137] SystemError when __len__ returns a non-number In-Reply-To: <1233636317.07.0.926088600598.issue5137@psf.upfronthosting.co.za> Message-ID: <1234248935.79.0.599469924859.issue5137@psf.upfronthosting.co.za> Hagen F?rstenau added the comment: This also solves issue 3729. ---------- nosy: +hagen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 08:14:49 2009 From: report at bugs.python.org (=?utf-8?q?Hagen_F=C3=BCrstenau?=) Date: Tue, 10 Feb 2009 07:14:49 +0000 Subject: [issue5198] Strange DeprecationWarning behaviour in module struct In-Reply-To: <1234250088.94.0.680929615779.issue5198@psf.upfronthosting.co.za> Message-ID: <1234250088.94.0.680929615779.issue5198@psf.upfronthosting.co.za> New submission from Hagen F?rstenau : struct.pack seems to raise a DeprecationWarning for some structure formats, but not for others: Python 2.6.1 (r261:67515, Dec 5 2008, 07:40:41) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import struct >>> struct.pack(">H", 1.0) sys:1: DeprecationWarning: integer argument expected, got float '\x00\x01' >>> struct.pack("H", 1.0) '\x01\x00' In addition the DeprecationWarning message gives a strange location for the problem. With the attached struct_warning.py it locates the problem at the function call foo() instead of the problematic call of struct.pack: $ python2.6 struct_warning.py struct_warning.py:6: DeprecationWarning: integer argument expected, got float foo() ---------- components: Library (Lib) files: struct_warning.py messages: 81532 nosy: hagen severity: normal status: open title: Strange DeprecationWarning behaviour in module struct type: behavior versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file13007/struct_warning.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 08:35:45 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 10 Feb 2009 07:35:45 +0000 Subject: [issue5197] vars() assignment fails silently when assignments made later In-Reply-To: <1234242883.43.0.910584647004.issue5197@psf.upfronthosting.co.za> Message-ID: <1234251345.63.0.163155508857.issue5197@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: According to http://docs.python.org/library/functions.html#vars >The returned dictionary should not be modified: the effects on the >corresponding symbol table are undefined. Same can be said for locals() as well. ---------- nosy: +ocean-city resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 08:46:07 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 10 Feb 2009 07:46:07 +0000 Subject: [issue5199] warns vars() assignment as well as locals() In-Reply-To: <1234251967.11.0.473034551632.issue5199@psf.upfronthosting.co.za> Message-ID: <1234251967.11.0.473034551632.issue5199@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : This comes from issue5197. Maybe we can emphasize a behavior of assignment to vars() is undefined if decorated with red block of *warning* as well as locals(). This patch is for release26-maint. ---------- assignee: georg.brandl components: Documentation files: warn_vars_assignment.patch keywords: patch messages: 81534 nosy: georg.brandl, ocean-city severity: normal status: open title: warns vars() assignment as well as locals() Added file: http://bugs.python.org/file13008/warn_vars_assignment.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 10:25:37 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 10 Feb 2009 09:25:37 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1234257937.55.0.331002698965.issue4804@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The revised patch looks fine to me, please apply. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 11:45:57 2009 From: report at bugs.python.org (Peter Landgren) Date: Tue, 10 Feb 2009 10:45:57 +0000 Subject: [issue5200] unicode.normalize gives wrong result for some characters In-Reply-To: <1234262757.38.0.115515150702.issue5200@psf.upfronthosting.co.za> Message-ID: <1234262757.38.0.115515150702.issue5200@psf.upfronthosting.co.za> New submission from Peter Landgren : If any of the Swedish characters "??????" are input to unicode.normalize(form, ustr) with form = "NFD" or "NFKD" the result will be "aaoAAO". "??????" are normal character and should be the same after normalize. They are not connected to aaoAAO other than for historic reasons, but not in modern languages. It's a common misinterpretation that the dots and circle above them are diacritic signs, but those letters should behave as the (Danish) "?" which is normalized correctly. >From Wikipedia: ? is often perceived as an A with a ring, interpreting the ring as a diacritical mark. However, in the languages that use it, the ring is not considered a diacritic but part of the letter. The letter ? in the Swedish and Icelandic alphabets historically arises from the Germanic umlaut, but it is considered a separate letter from O. See http://en.wikipedia.org/wiki/%C3%85 I think this is pobably impossible to solve as it will be mixed up with "umlaut" and you don't know what language the specific word is connected to. ---------- components: Library (Lib) messages: 81536 nosy: PeterL severity: normal status: open title: unicode.normalize gives wrong result for some characters type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 12:08:11 2009 From: report at bugs.python.org (Jervis Whitley) Date: Tue, 10 Feb 2009 11:08:11 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1234264091.22.0.289226851348.issue1818@psf.upfronthosting.co.za> Jervis Whitley added the comment: Updated NamedTupleReader to give a rename=False keyword argument. rename is passed directly to the namedtuple factory function to enable automatic handling of invalid fieldnames. Two new tests for the rename keyword. Cheers, Added file: http://bugs.python.org/file13009/ntreader4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 12:44:52 2009 From: report at bugs.python.org (Floris Bruynooghe) Date: Tue, 10 Feb 2009 11:44:52 +0000 Subject: [issue5201] Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the build In-Reply-To: <1234266292.13.0.602157766238.issue5201@psf.upfronthosting.co.za> Message-ID: <1234266292.13.0.602157766238.issue5201@psf.upfronthosting.co.za> New submission from Floris Bruynooghe : When specifying an RPATH with -rpath or -R you can use the special tokens `$LIB' and `$ORIGIN' which the runtime linker interprets as "normal search path" and "relative to current sofile" respectively. To get these correctly to the gcc command line you need to specify this in LDFLAGS as `\$$LIB' to work around escapes of both the makefile and shell, so in the Python Makefile this will appear somewhere as (this is on one line): CONFIG_ARGS= '--prefix=/opt/example.com/python25' 'LDFLAGS=-Wl,-rpath=\$$LIB:/opt/example.com/lib,--enable-new-dtags' This works for compiling the main python binary. But when the extension modules get compiled distutils chokes on this. distutils.sysconfig.parse_makefile() does think that any value of a variable that contains `$' in it refers to an other variable in the makefile. It will fail to find the value and CONFIG_ARGS will not be defined. This then fails in setup.py for the _ctypes extension: if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"): return Where `None' is returned instead of a list by .get_config_var(). It seems that distutils.sysconfig.parse_makefile() needs to understand more of the makefile synatax to deal with this. ---------- assignee: tarek components: Distutils messages: 81538 nosy: flub, tarek severity: normal status: open title: Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the build type: compile error versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 12:45:01 2009 From: report at bugs.python.org (David Jones) Date: Tue, 10 Feb 2009 11:45:01 +0000 Subject: [issue5202] wave.py cannot write wave files into a shell pipeline In-Reply-To: <1234266301.49.0.830035453307.issue5202@psf.upfronthosting.co.za> Message-ID: <1234266301.49.0.830035453307.issue5202@psf.upfronthosting.co.za> New submission from David Jones : When using the wave module to output wave files, the output file cannot be a Unix pipeline. Example. The following program outputs a (trivial) wave file on stdout: #!/usr/bin/env python import sys import wave w = wave.open(sys.stdout, 'w') w.setnchannels(1) w.setsampwidth(1) w.setframerate(32000) w.setnframes(0) w.close() It can create a wave file like this: $ ./bugex > foo.wav When used in a pipeline we get: $ ./bugex | wc Traceback (most recent call last): File "./bugex", line 9, in w.close() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/wave.py ", line 437, in close self._ensure_header_written(0) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/wave.py ", line 458, in _ensure_header_written self._write_header(datasize) File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/wave.py ", line 465, in _write_header self._form_length_pos = self._file.tell() IOError: [Errno 29] Illegal seek Exception exceptions.IOError: (29, 'Illegal seek') in > ignored 0 1 8 The wave module has almost all it needs to work around this problem. The wave module will only seek the output if it needs to patch the header. If you use setnframes to write the correct number of frames before writing them with writeframesraw then the header will not be patched upon calling close. However... The problem is that the "tell" method is invoked on the output stream (to record where the header is, in the event that we need to patch it); the "tell" method fails with an exception when the output is a pipeline (see example, above). Exceptions from "tell" when writing the header initially (in _write_header) should be ignored. If _patchheader is later invoked it will fail due to lack of pos. ---------- components: Library (Lib) messages: 81539 nosy: drj severity: normal status: open title: wave.py cannot write wave files into a shell pipeline type: behavior versions: Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 12:47:04 2009 From: report at bugs.python.org (Lisandro Dalcin) Date: Tue, 10 Feb 2009 11:47:04 +0000 Subject: [issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError? In-Reply-To: <1233963466.4.0.0489916221286.issue5175@psf.upfronthosting.co.za> Message-ID: <1234266424.67.0.347806926975.issue5175@psf.upfronthosting.co.za> Lisandro Dalcin added the comment: Mark, here you have a patch. I've only 'make test' on a 32bit Linux box Just two comments: - in docs: perhaps the 'versionchanged' stuff should be added. - in tests: I did not touch Modules/_testcapimodule.c, as it seems the test is covered. However, note that in all these tests, actual exception types are not checked) ---------- keywords: +patch Added file: http://bugs.python.org/file13010/negative-to-unsigned.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 12:51:52 2009 From: report at bugs.python.org (David Jones) Date: Tue, 10 Feb 2009 11:51:52 +0000 Subject: [issue5202] wave.py cannot write wave files into a shell pipeline In-Reply-To: <1234266301.49.0.830035453307.issue5202@psf.upfronthosting.co.za> Message-ID: <1234266712.2.0.913816954101.issue5202@psf.upfronthosting.co.za> David Jones added the comment: Attached is a patch which is a diff from this version of wave.py : http://svn.python.org/view/*checkout*/python/trunk/Lib/wave.py?rev=54394 ---------- keywords: +patch Added file: http://bugs.python.org/file13011/wave-20090210.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 13:28:43 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 10 Feb 2009 12:28:43 +0000 Subject: [issue5202] wave.py cannot write wave files into a shell pipeline In-Reply-To: <1234266301.49.0.830035453307.issue5202@psf.upfronthosting.co.za> Message-ID: <1234268923.19.0.122980458213.issue5202@psf.upfronthosting.co.za> Guilherme Polo added the comment: Wouldn't it be better if you only ignored the 'illegal seek' error instead of ignoring any ioerror (should it even be always discarded) ? I get a 'bad file descriptor' under Windows 7, but, again, can it be always discarded ? You can also reproduce the problem without using wave: >>> import sys >>> sys.stdout.tell() I'm really unsure about the proposed patch. ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 13:42:44 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Tue, 10 Feb 2009 12:42:44 +0000 Subject: [issue3386] [PATCH] distutils.sysconfig.get_python_lib prefix argument broken In-Reply-To: <1216242653.79.0.3968685363.issue3386@psf.upfronthosting.co.za> Message-ID: <1234269764.72.0.495636713494.issue3386@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Done in r69485. Thanks for the patch Phillip ! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 13:48:04 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 10 Feb 2009 12:48:04 +0000 Subject: [issue5203] ctypes segfaults when passing a unicode string to a function without argtypes In-Reply-To: <1234270084.65.0.170774259742.issue5203@psf.upfronthosting.co.za> Message-ID: <1234270084.65.0.170774259742.issue5203@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : The following code segfaults on platforms where HAVE_USABLE_WCHAR_T is not defined (for example: narrow unicode build and sizeof(wchar_t)==4) >>> from ctypes import * >>> import ctypes.util >>> CDLL(ctypes.util.find_library('c')).wcslen(u'text') (it works if the argtypes member is defined) The reason is a non initialized structure, and the correction is trivial: --- Modules/_ctypes/callproc.c~ 2007-06-15 19:10:41.000000000 +0200 +++ Modules/_ctypes/callproc.c 2009-02-10 13:28:10.000000000 +0100 @@ -538,6 +538,7 @@ int size = PyUnicode_GET_SIZE(obj); size += 1; /* terminating NUL */ size *= sizeof(wchar_t); + pa->ffi_type = &ffi_type_pointer; pa->value.p = PyMem_Malloc(size); if (!pa->value.p) { PyErr_NoMemory(); ---------- assignee: theller components: ctypes messages: 81544 nosy: amaury.forgeotdarc, theller severity: normal status: open title: ctypes segfaults when passing a unicode string to a function without argtypes type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 13:52:54 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Feb 2009 12:52:54 +0000 Subject: [issue3729] SystemError on calling len() if __len__() doesn't return an int In-Reply-To: <1220021948.65.0.928639960663.issue3729@psf.upfronthosting.co.za> Message-ID: <1234270374.93.0.101300088302.issue3729@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in #5137. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 14:02:17 2009 From: report at bugs.python.org (David Jones) Date: Tue, 10 Feb 2009 13:02:17 +0000 Subject: [issue5202] wave.py cannot write wave files into a shell pipeline In-Reply-To: <1234268923.19.0.122980458213.issue5202@psf.upfronthosting.co.za> Message-ID: <8D6498EE-FCEE-450A-8BAB-605E1A9E6A40@pobox.com> David Jones added the comment: On 10 Feb 2009, at 12:28, Guilherme Polo wrote: > > Guilherme Polo added the comment: > > Wouldn't it be better if you only ignored the 'illegal seek' error > instead of ignoring any ioerror (should it even be always discarded) ? No. > I > get a 'bad file descriptor' under Windows 7, but, again, can it be > always discarded ? Yes. To expand: Observe that the exception is raised when we are writing the header for the first time. The exception is not raised when we attempt to seek to patch the header, it is raised when we recording the file position so that we can seek to it later. We record the file position even though we might not use it later (the file position is only needed if we need to patch the header). So if we don't need to patch the header, we do not need the file position. So we can clearly ignore any error in attempting to get the file position. If we do need to patch the header, then we need the file position. If we do not have the file position (because the earlier attempt to get it failed), then patching the header will fail when it attempts a seek. This seems reasonable to me. > > You can also reproduce the problem without using wave: > >>>> import sys >>>> sys.stdout.tell() That does not reproduce the problem. The problem is not that tell raises an exception, the problem is that tell raises an exception and it is only being used to get some information that may be not needed later. Therefore the exception should be ignored, and a problem should only be raised if it turns out that we did need for information that we couldn't get. > > I'm really unsure about the proposed patch. Noted. I also note that my patch can be improved by removing its last 11 lines. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 14:09:30 2009 From: report at bugs.python.org (David Jones) Date: Tue, 10 Feb 2009 13:09:30 +0000 Subject: [issue5202] wave.py cannot write wave files into a shell pipeline In-Reply-To: <1234268923.19.0.122980458213.issue5202@psf.upfronthosting.co.za> Message-ID: David Jones added the comment: On 10 Feb 2009, at 12:28, Guilherme Polo wrote: > > Guilherme Polo added the comment: > > I'm really unsure about the proposed patch. Perhaps my example was too trivial. The point is that if you call setnframes then you can get wave.py to avoid patching the header; so it does not need to seek on the output file. However, that _still_ doesn't let you pipe the output, because of the "tell" problem. That's what the patch is for. Here is a (slightly) less trivial example: #!/usr/bin/env python import sys import wave w = wave.open(sys.stdout, 'w') w.setnchannels(1) w.setsampwidth(1) w.setframerate(2000) w.setnframes(100) for _ in range(50): w.writeframesraw('\x00\xff') w.close() (The wave file that it outputs is 100ms of 1000 Hz sine wave by the way) Note the call to setnframes _before_ the data is written. That's what means the header does not need to be patched. With my patch applied the output of this program can be fed to a pipe. If you remove the call to setnframes then the header will need to be patched, and this still (correctly, usefully) raises an error with my patch applied. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 14:22:13 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 10 Feb 2009 13:22:13 +0000 Subject: [issue5134] Compiler warnings in sqlite module In-Reply-To: <1233600780.48.0.187282999033.issue5134@psf.upfronthosting.co.za> Message-ID: <1234272133.0.0.644650324486.issue5134@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Fixed in r69489, r69490, r69491, r69492, r69493. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 14:33:27 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 10 Feb 2009 13:33:27 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1234272807.8.0.351782376071.issue4804@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Committed r69495 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 14:50:11 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 10 Feb 2009 13:50:11 +0000 Subject: [issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError? In-Reply-To: <1233963466.4.0.0489916221286.issue5175@psf.upfronthosting.co.za> Message-ID: <1234273811.17.0.461849233545.issue5175@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for the patch! I agree that the 'versionchanged' reference should be added in the docs. I also think that the test should be updated to check the exception type. Here's a modified version of your patch that adds a test for OverflowError to the capi tests, adds 'versionchanged', and rewords the docs slightly. I also took the liberty of rewording the docs for PyLong_AsLongLong, to match. I've tested this on a 64-bit linux machine, and checked that the docs build properly. I'll test on 32-bit and 64-bit OS X later today. Lisandro, does this updated patch work for you? Added file: http://bugs.python.org/file13012/negative-to-unsigned2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 15:08:35 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 10 Feb 2009 14:08:35 +0000 Subject: [issue5204] test.os/TestInvalidFD/test_fdopen on VC6 In-Reply-To: <1234274915.85.0.510245571983.issue5204@psf.upfronthosting.co.za> Message-ID: <1234274915.85.0.510245571983.issue5204@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : This comes from issue4804. This simple patch is required to pass test_fdopen on VC6. ---------- components: Windows files: test_fdopen_on_vc6.patch keywords: patch messages: 81551 nosy: ocean-city severity: normal stage: commit review status: open title: test.os/TestInvalidFD/test_fdopen on VC6 versions: Python 2.7 Added file: http://bugs.python.org/file13013/test_fdopen_on_vc6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 15:09:53 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 10 Feb 2009 14:09:53 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1234274993.26.0.976638396881.issue4804@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I opened new issue related to VC6 as issue5204. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 15:36:31 2009 From: report at bugs.python.org (David Jones) Date: Tue, 10 Feb 2009 14:36:31 +0000 Subject: [issue5202] wave.py cannot write wave files into a shell pipeline In-Reply-To: <8D6498EE-FCEE-450A-8BAB-605E1A9E6A40@pobox.com> Message-ID: David Jones added the comment: On 10 Feb 2009, at 13:02, David Jones wrote: > > I also note that my patch can be improved by removing its last 11 > lines. Er, no it can't. What was I thinking? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 16:01:49 2009 From: report at bugs.python.org (Lisandro Dalcin) Date: Tue, 10 Feb 2009 15:01:49 +0000 Subject: [issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError? In-Reply-To: <1233963466.4.0.0489916221286.issue5175@psf.upfronthosting.co.za> Message-ID: <1234278109.84.0.302287509621.issue5175@psf.upfronthosting.co.za> Lisandro Dalcin added the comment: It worked for me. BTW, 'make test' did not noticed the change in Modules/testcapi_long.h, which is #include'd by Modules/_testcapimodule.c. I've attached a trivial patch for setup.py fixing the dependency issue. Added file: http://bugs.python.org/file13014/setup.py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 16:04:25 2009 From: report at bugs.python.org (Lie Ryan) Date: Tue, 10 Feb 2009 15:04:25 +0000 Subject: [issue5205] String Formatting with namedtuple In-Reply-To: <1234278265.2.0.777488862861.issue5205@psf.upfronthosting.co.za> Message-ID: <1234278265.2.0.777488862861.issue5205@psf.upfronthosting.co.za> New submission from Lie Ryan : I've been experimenting with namedtuple, it seems that string formatting doesn't recognize namedtuple as mapping. from collections import namedtuple Nt = namedtuple('Nt', ['x', 'y']) nt = Nt(12, 32) print 'one = %(x)s, two = %(y)s' % nt # output should be: one = 12, two = 32 currently, it is possible to use nt._asdict() as a workaround, but I think it will be easier and more intuitive to be able to use namedtuple directly with string interpolation. I tried this with 2.6 and 2.7a (trunk). Haven't seen 3.0 yet. PS: Although the following works, it is not the topic of the issue: print 'one = %s, two = %s' % nt ---------- components: Library (Lib) messages: 81555 nosy: lieryan severity: normal status: open title: String Formatting with namedtuple type: feature request versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 16:05:34 2009 From: report at bugs.python.org (Lie Ryan) Date: Tue, 10 Feb 2009 15:05:34 +0000 Subject: [issue5205] String Formatting with namedtuple In-Reply-To: <1234278265.2.0.777488862861.issue5205@psf.upfronthosting.co.za> Message-ID: <1234278334.84.0.274976570955.issue5205@psf.upfronthosting.co.za> Changes by Lie Ryan : ---------- components: +Interpreter Core versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:14:27 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 10 Feb 2009 16:14:27 +0000 Subject: [issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError? In-Reply-To: <1233963466.4.0.0489916221286.issue5175@psf.upfronthosting.co.za> Message-ID: <1234282467.93.0.764458399556.issue5175@psf.upfronthosting.co.za> Mark Dickinson added the comment: Committed, r69498 (trunk) and r69499 (py3k). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:26:38 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 10 Feb 2009 16:26:38 +0000 Subject: [issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError? In-Reply-To: <1233963466.4.0.0489916221286.issue5175@psf.upfronthosting.co.za> Message-ID: <1234283198.79.0.686978754025.issue5175@psf.upfronthosting.co.za> Mark Dickinson added the comment: ...and your patch for setup.py applied in r69500, r69501, r69502, r69503. Thank you! ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:43:04 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 10 Feb 2009 16:43:04 +0000 Subject: [issue1035576] Add New RPM-friendly record option to setup.py Message-ID: <1234284184.73.0.822884367741.issue1035576@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:43:23 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 10 Feb 2009 16:43:23 +0000 Subject: [issue818201] distutils: clean -b ignored; set_undefined_options doesn't Message-ID: <1234284203.59.0.83272631047.issue818201@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:45:16 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 10 Feb 2009 16:45:16 +0000 Subject: [issue755286] Generate rpm filelist including directories Message-ID: <1234284316.26.0.867079569584.issue755286@psf.upfronthosting.co.za> Akira Kitada added the comment: Duplicate of issue1035576 ---------- nosy: +akitada, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:45:25 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 10 Feb 2009 16:45:25 +0000 Subject: [issue1035576] Add New RPM-friendly record option to setup.py Message-ID: <1234284325.65.0.729341796329.issue1035576@psf.upfronthosting.co.za> Akira Kitada added the comment: duplicate of issue755286 ---------- nosy: +akitada _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:46:27 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 10 Feb 2009 16:46:27 +0000 Subject: [issue1169193] Handle ungzipped man pages in rpm builds correctly Message-ID: <1234284387.46.0.136995168977.issue1169193@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:47:28 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 10 Feb 2009 16:47:28 +0000 Subject: [issue809846] distutils/bdistwin32 doesn't clean up RO files properly Message-ID: <1234284448.87.0.965750536115.issue809846@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:49:09 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 10 Feb 2009 16:49:09 +0000 Subject: [issue1169193] Handle ungzipped man pages in rpm builds correctly Message-ID: <1234284549.15.0.350390495577.issue1169193@psf.upfronthosting.co.za> Akira Kitada added the comment: Duplicate of issue644744 ---------- nosy: +akitada _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:49:15 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 10 Feb 2009 16:49:15 +0000 Subject: [issue644744] bdist_rpm fails when installing man pages Message-ID: <1234284555.54.0.89469675139.issue644744@psf.upfronthosting.co.za> Akira Kitada added the comment: Duplicate of issue1169193 ---------- nosy: +akitada, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:50:04 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 10 Feb 2009 16:50:04 +0000 Subject: [issue1382562] --install-base not honored on win32 Message-ID: <1234284604.91.0.0150248754894.issue1382562@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:53:00 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 10 Feb 2009 16:53:00 +0000 Subject: [issue957381] bdist_rpm fails on redhat9, fc1, fc2 Message-ID: <1234284780.98.0.11761041319.issue957381@psf.upfronthosting.co.za> Akira Kitada added the comment: Is this problem already closed? ---------- nosy: +akitada, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:55:12 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 10 Feb 2009 16:55:12 +0000 Subject: [issue1289136] distutils extension library path bug on cygwin Message-ID: <1234284912.07.0.146508497443.issue1289136@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:57:04 2009 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 10 Feb 2009 16:57:04 +0000 Subject: [issue5202] wave.py cannot write wave files into a shell pipeline In-Reply-To: <1234266301.49.0.830035453307.issue5202@psf.upfronthosting.co.za> Message-ID: <1234285024.76.0.125197133795.issue5202@psf.upfronthosting.co.za> Guilherme Polo added the comment: I see what you want to do, but I fell really uncomfortable by totally ignoring IOError. I could get a bad file descriptor under Linux too, and I wouldn't like to see it discarded for no reason. Now, is there some problem if we remove the calls to the "tell" method in _write_header ? See patch attached (tests are very welcome too). Added file: http://bugs.python.org/file13015/writeheader_without_tell.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:57:18 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 10 Feb 2009 16:57:18 +0000 Subject: [issue1274324] 'setup.py install' fail on linux from read-only storage Message-ID: <1234285038.55.0.86919257791.issue1274324@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:58:40 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 10 Feb 2009 16:58:40 +0000 Subject: [issue1028432] Specify a source baseurl for bdist_rpm. Message-ID: <1234285120.55.0.850301891089.issue1028432@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 18:00:32 2009 From: report at bugs.python.org (Martin Blais) Date: Tue, 10 Feb 2009 17:00:32 +0000 Subject: [issue5206] with context object for unittest assertRaises() In-Reply-To: <1234285232.23.0.329909688935.issue5206@psf.upfronthosting.co.za> Message-ID: <1234285232.23.0.329909688935.issue5206@psf.upfronthosting.co.za> New submission from Martin Blais : Here is a useful trick to restore the normal call syntax for delayed evaluation for assertRaises(): from contextlib import contextmanager @contextmanager def raised(exctype): try: yield raise AssertionError("Exception %s not raised." % exctype.__name__) except exctype, e: pass Then you can do this:: with raised(ValueError): rate = foo(arg1, arg2) Instead of :: self.assertRaises(foo, arg1, arg2) Which means you don't have to break the function from its arguments (it doesn't look like a function call anymore). P.S. I know I didn't include self up there in my proposed implementation but it could be parameterized to get the failureException. (This is a second issue:) However, I really think that all the failUnlessXXX methods should be taken out of the class and made available at module level so that they can be reused by py.test tests as well, and they are perhaps even worthy of their own module. I can't remember a single instance where I had to override that failureException class... Comments welcome, I'd be happy to fix this one myself if we can restore my commit privileges (I think they expired because I didn't use them since the need-for-speed workshop.) ---------- messages: 81564 nosy: blais severity: normal status: open title: with context object for unittest assertRaises() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 18:02:53 2009 From: report at bugs.python.org (Akira Kitada) Date: Tue, 10 Feb 2009 17:02:53 +0000 Subject: [issue1051216] make distutils.core.run_setup re-entrant Message-ID: <1234285373.53.0.507907102766.issue1051216@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 18:07:02 2009 From: report at bugs.python.org (Iakov Davydov) Date: Tue, 10 Feb 2009 17:07:02 +0000 Subject: [issue5207] extend strftime/strptime format for RFC3339 and RFC2822 In-Reply-To: <1234285622.79.0.0309055191852.issue5207@psf.upfronthosting.co.za> Message-ID: <1234285622.79.0.0309055191852.issue5207@psf.upfronthosting.co.za> New submission from Iakov Davydov : Currently there is no obvious way to parse time from ISO 8601/W3C/RFC3339 date&time format (http://www.ietf.org/rfc/rfc3339.txt) or RFC2822. (Actually RFC2822 could be parsed with rfc822 module but that is not very good way). I suggest that we should add special directive (let's say %o) for time offset which is "Z" or ("+" / "-") time-hour ":" time-minute. Also %O directive will parse zone: ( "+" / "-" ) time-hour time-minute. (I suppose there is no need to support obsolate time zones but if that is possible it's also good idea). ---------- components: Library (Lib) messages: 81565 nosy: davydov severity: normal status: open title: extend strftime/strptime format for RFC3339 and RFC2822 type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 18:07:03 2009 From: report at bugs.python.org (Martin Blais) Date: Tue, 10 Feb 2009 17:07:03 +0000 Subject: [issue5206] with context object for unittest assertRaises() In-Reply-To: <1234285232.23.0.329909688935.issue5206@psf.upfronthosting.co.za> Message-ID: <1234285623.51.0.675843455209.issue5206@psf.upfronthosting.co.za> Changes by Martin Blais : ---------- components: +Library (Lib) type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 18:10:27 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 10 Feb 2009 17:10:27 +0000 Subject: [issue4448] should socket readline() use default_bufsize instead of _rbufsize? In-Reply-To: <1227819431.06.0.748604307582.issue4448@psf.upfronthosting.co.za> Message-ID: <1234285827.63.0.203313574955.issue4448@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Issue 4879 has been resolved so that that HTTPResponse invokes socket.socket.makefile() with default buffering. see r69209. Since the problem stated in this defect has no bearing on 3.0 (there is no special hack for readline() in 3.0) I am closing this again. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 18:16:32 2009 From: report at bugs.python.org (Max) Date: Tue, 10 Feb 2009 17:16:32 +0000 Subject: [issue5208] urllib2.build_opener([handler, ...]) incorrect signature in docs In-Reply-To: <1234286185.85.0.555213161426.issue5208@psf.upfronthosting.co.za> Message-ID: <1234286185.85.0.555213161426.issue5208@psf.upfronthosting.co.za> New submission from Max : The build_opener() function of urllib2 is speciofied as: urllib2.build_opener([handler, ...]) I think it should be: urllib2.build_opener(handler, ...) see http://docs.python.org/library/urllib2.html?highlight=build_opener ---------- assignee: georg.brandl components: Documentation messages: 81567 nosy: B?hm, georg.brandl severity: normal status: open title: urllib2.build_opener([handler, ...]) incorrect signature in docs versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 18:48:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 10 Feb 2009 17:48:42 +0000 Subject: [issue1214675] module warnings lacks a remove filter function Message-ID: <1234288122.17.0.196920316526.issue1214675@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 18:50:59 2009 From: report at bugs.python.org (alec resnick) Date: Tue, 10 Feb 2009 17:50:59 +0000 Subject: [issue4882] Behavior of backreferences to named groups in regular expressions unclear In-Reply-To: <1232286694.84.0.157789544349.issue4882@psf.upfronthosting.co.za> Message-ID: <62a60dd90902100950t348131d2m2b758e0b87d31d26@mail.gmail.com> alec resnick added the comment: Hi Georg! Sorry to be so long in getting back to you. I've attached a suggested patch for the python-2.6.1-docs-text/library/re.txt documentation. Also, in looking over Kuchling's HOWTO, the necessary information is actually there, and I just wasn't paying attention =) Let me know if I should do something else--this is my first 'fix'/submission to Python, and I'm eager for feedback. Thanks! Gratefully, a. ---------- keywords: +patch Added file: http://bugs.python.org/file13016/re-backreference-clarification.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: re-backreference-clarification.patch URL: From report at bugs.python.org Tue Feb 10 19:09:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 10 Feb 2009 18:09:59 +0000 Subject: [issue1440472] email.Generator is not idempotent Message-ID: <1234289399.67.0.341623804207.issue1440472@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Documentation -Library (Lib) type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:10:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 10 Feb 2009 18:10:28 +0000 Subject: [issue1661108] base64.urlsafe_b64encode() shouldn't use the = character Message-ID: <1234289428.12.0.488613975479.issue1661108@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> georg.brandl components: +Documentation -Library (Lib) nosy: +georg.brandl type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:10:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 10 Feb 2009 18:10:41 +0000 Subject: [issue1381476] csv.reader endless loop Message-ID: <1234289441.97.0.998551877155.issue1381476@psf.upfronthosting.co.za> Daniel Diniz added the comment: Invalid per discussion. ---------- nosy: +ajaksu2 title: csv.reader endless loop -> csv.reader endless loop _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:10:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 10 Feb 2009 18:10:50 +0000 Subject: [issue1630794] Seg fault in readline call. Message-ID: <1234289450.3.0.0757172206441.issue1630794@psf.upfronthosting.co.za> Daniel Diniz added the comment: Not confirmed with newer versions, closing suggested. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:12:14 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 10 Feb 2009 18:12:14 +0000 Subject: [issue3676] Obsolete references to PEP 291 in py3k lib In-Reply-To: <1219671468.62.0.218344277949.issue3676@psf.upfronthosting.co.za> Message-ID: <1234289534.46.0.30781186776.issue3676@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:12:33 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 10 Feb 2009 18:12:33 +0000 Subject: [issue3734] subclassing complex In-Reply-To: <1220049550.4.0.0881969750537.issue3734@psf.upfronthosting.co.za> Message-ID: <1234289553.14.0.889357209954.issue3734@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed in trunk. Here's a copy-n-past'able testcase: class xcomplex( complex ): def __new__(cls,*args,**kwargs): return complex.__new__(cls,*args,**kwargs) def __coerce__(self,other): t = complex.__coerce__(self,other) try: return (self,xcomplex(t[1])) except TypeError: return t def __add__(self,x): return xcomplex( complex.__add__(self,x) ) def __radd__(self,x): return xcomplex( complex.__radd__(self,x) ) class xfloat(float): def __new__(cls,*args,**kwargs): return float.__new__(cls,*args,**kwargs) def __coerce__(self,other): t = float.__coerce__(self,other) try: return (self,float(t[1])) except TypeError: return t def __add__(self,x): return xfloat( float.__add__(self,x) ) def __radd__(self,x): return xfloat( float.__radd__(self,x) ) z = 1j xz = xcomplex(1j) f = 1.0 xf = xfloat(1.0) print type(z + xz) print type(f + xf) ---------- components: +Interpreter Core -None nosy: +ajaksu2, marketdickinson versions: +Python 2.6, Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:12:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 10 Feb 2009 18:12:43 +0000 Subject: [issue1732212] repr of 'nan' floats not parseable Message-ID: <1234289563.1.0.786806704629.issue1732212@psf.upfronthosting.co.za> Daniel Diniz added the comment: OP posted a message in python-dev, with no replies: http://mail.python.org/pipermail/python-dev/2007-June/073625.html ---------- nosy: +ajaksu2, marketdickinson versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:12:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 10 Feb 2009 18:12:52 +0000 Subject: [issue1151323] New fpconst module Message-ID: <1234289572.13.0.480559268917.issue1151323@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:13:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 10 Feb 2009 18:13:03 +0000 Subject: [issue1177779] explicit sign variable for longs Message-ID: <1234289583.65.0.194091082555.issue1177779@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:13:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 10 Feb 2009 18:13:10 +0000 Subject: [issue1633648] incomplete numerical comparisons Message-ID: <1234289590.93.0.943874426913.issue1633648@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:13:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 10 Feb 2009 18:13:59 +0000 Subject: [issue3694] Undetected error in _struct.pack_into In-Reply-To: <1219811392.29.0.37826020023.issue3694@psf.upfronthosting.co.za> Message-ID: <1234289639.91.0.680236314337.issue3694@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:23:00 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Feb 2009 18:23:00 +0000 Subject: [issue5206] with context object for unittest assertRaises() In-Reply-To: <1234285232.23.0.329909688935.issue5206@psf.upfronthosting.co.za> Message-ID: <1234290180.2.0.789254752758.issue5206@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is already done in trunk, you can use it as follows: with self.assertRaises(ZeroDivisionError): 1/0 ---------- nosy: +pitrou resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:26:30 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Feb 2009 18:26:30 +0000 Subject: [issue3694] Undetected error in _struct.pack_into In-Reply-To: <1219811392.29.0.37826020023.issue3694@psf.upfronthosting.co.za> Message-ID: <1234290390.48.0.209684764345.issue3694@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, PyNumber_AsSsize_t() should be used instead. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:27:07 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Feb 2009 18:27:07 +0000 Subject: [issue3694] Undetected error in _struct.pack_into In-Reply-To: <1219811392.29.0.37826020023.issue3694@psf.upfronthosting.co.za> Message-ID: <1234290427.28.0.637274887111.issue3694@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Oh, and a test should be added :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:36:16 2009 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 10 Feb 2009 18:36:16 +0000 Subject: [issue1440472] email.Generator is not idempotent Message-ID: <1234290976.72.0.867611790418.issue1440472@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I think we should update the documentation to mention these exceptions. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:42:26 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 10 Feb 2009 18:42:26 +0000 Subject: [issue1911] webbrowser.open firefox 3 issues In-Reply-To: <1201051771.85.0.184797349871.issue1911@psf.upfronthosting.co.za> Message-ID: <1234291346.62.0.452169848856.issue1911@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, closing. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:43:50 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Feb 2009 18:43:50 +0000 Subject: [issue1177779] explicit sign variable for longs Message-ID: <1234291430.06.0.190398700051.issue1177779@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I agree with MvL, it should probably be rejected. Memory size of longs is critical in py3k. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:44:30 2009 From: report at bugs.python.org (Georg Brandl) Date: Tue, 10 Feb 2009 18:44:30 +0000 Subject: [issue1327971] HTTPResponse instance has no attribute 'fileno' Message-ID: <1234291470.7.0.891349456771.issue1327971@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, easy access is not the point. If the object is supposed to have the file-like interface, and can provide a fileno(), it should. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:58:53 2009 From: report at bugs.python.org (Brett Cannon) Date: Tue, 10 Feb 2009 18:58:53 +0000 Subject: [issue1175686] add "reload" function to IDLE Message-ID: <1234292333.46.0.0581364900049.issue1175686@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- title: add "reload" function -> add "reload" function to IDLE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 19:59:23 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 10 Feb 2009 18:59:23 +0000 Subject: [issue5200] unicode.normalize gives wrong result for some characters In-Reply-To: <1234262757.38.0.115515150702.issue5200@psf.upfronthosting.co.za> Message-ID: <1234292363.63.0.869504877449.issue5200@psf.upfronthosting.co.za> Martin v. L?wis added the comment: It is not true that normalize produces "aaoAAO". Instead, it produces u'a\u030aa\u0308o\u0308A\u030aA\u0308O\u0308' This is the correct result, according to the Unicode specification. It would be incorrect to normalize them unchanged under the Unicode Normal Form D (for decomposed); the decomposed character for 'LATIN SMALL LETTER A WITH RING ABOVE' (for example) is 'LATIN SMALL LETTER A' + 'COMBINING RING ABOVE'. The wikipedia article is irrelevant; refer to the Unicode specification for a normative reference. Closing as invalid. ---------- nosy: +loewis resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 20:06:10 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 10 Feb 2009 19:06:10 +0000 Subject: [issue5138] File Reload for IDLE In-Reply-To: <1233636526.93.0.952208632145.issue5138@psf.upfronthosting.co.za> Message-ID: <1234292770.83.0.843763374289.issue5138@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Duplicate of 1175686. ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 20:07:28 2009 From: report at bugs.python.org (Thomas Heller) Date: Tue, 10 Feb 2009 19:07:28 +0000 Subject: [issue5203] ctypes segfaults when passing a unicode string to a function without argtypes In-Reply-To: <1234270084.65.0.170774259742.issue5203@psf.upfronthosting.co.za> Message-ID: <1234292848.32.0.700255469746.issue5203@psf.upfronthosting.co.za> Thomas Heller added the comment: Fixed in trunk (rev 69505) and release26-maint (rev 69506). The bug was already fixed in a different way in py3k and release30-maint although in a different way, I merged this exact fix anyway (rev 69507 and rev 69508). Thanks. ---------- resolution: -> fixed status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 20:07:42 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 10 Feb 2009 19:07:42 +0000 Subject: [issue1175686] add "reload" function to IDLE Message-ID: <1234292862.89.0.550899996737.issue1175686@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Kurt, is this something you can add? Closed the duplicate issue 5138 and leaving this open. IDLE would be *much* easier to use in conjunction with version control if there were a reload option that did the equivalent of (close current with no save, followed by open current file). ---------- assignee: -> kbk priority: low -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 20:21:53 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 10 Feb 2009 19:21:53 +0000 Subject: [issue3734] subclassing complex In-Reply-To: <1220049550.4.0.0881969750537.issue3734@psf.upfronthosting.co.za> Message-ID: <1234293713.73.0.478060863377.issue3734@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'll take a look. ---------- assignee: -> marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 20:34:50 2009 From: report at bugs.python.org (Brett Cannon) Date: Tue, 10 Feb 2009 19:34:50 +0000 Subject: [issue1327971] HTTPResponse instance has no attribute 'fileno' Message-ID: <1234294490.48.0.899224163822.issue1327971@psf.upfronthosting.co.za> Brett Cannon added the comment: Georg is right and this has been fixed apparently in 3.0, leaving 2.7 and older broken. There are two possible solutions to this. One is to change socket._fileobject.fileno() to simply try self._sock.fp.fileno() if self._sock.fileno() does not exist. The other option is to add a __getattr__ to httplib.HTTPResponse to redirect to self.fp. Anyone have an opinion? ---------- nosy: +brett.cannon stage: -> test needed versions: +Python 2.4, Python 2.5, Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 20:41:21 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 10 Feb 2009 19:41:21 +0000 Subject: [issue5204] test.os/TestInvalidFD/test_fdopen on VC6 In-Reply-To: <1234274915.85.0.510245571983.issue5204@psf.upfronthosting.co.za> Message-ID: <1234294881.99.0.509449981231.issue5204@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch is fine, please apply. ---------- assignee: -> ocean-city nosy: +loewis resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 20:42:48 2009 From: report at bugs.python.org (Travis Hassloch) Date: Tue, 10 Feb 2009 19:42:48 +0000 Subject: [issue5209] nntplib needs updating to RFC 3977 In-Reply-To: <1234294968.88.0.213485994333.issue5209@psf.upfronthosting.co.za> Message-ID: <1234294968.88.0.213485994333.issue5209@psf.upfronthosting.co.za> New submission from Travis Hassloch : RFC 977 has been obsoleted by RFC 3977 Numerous new commands, standardized extensions, clarifications. ---------- components: Library (Lib) messages: 81587 nosy: travis severity: normal status: open title: nntplib needs updating to RFC 3977 type: feature request versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 20:44:16 2009 From: report at bugs.python.org (Brett Cannon) Date: Tue, 10 Feb 2009 19:44:16 +0000 Subject: [issue1327971] HTTPResponse instance has no attribute 'fileno' Message-ID: <1234295056.67.0.547486440543.issue1327971@psf.upfronthosting.co.za> Brett Cannon added the comment: Another option is to change urllib.addinfourl to look for fileno() on an HTTPResponse object. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 20:46:16 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 10 Feb 2009 19:46:16 +0000 Subject: [issue1732212] repr of 'nan' floats not parseable Message-ID: <1234295176.43.0.389311073808.issue1732212@psf.upfronthosting.co.za> Mark Dickinson added the comment: I don't see a huge need for this. In 2.6, 3.0 and higher, float(repr(x)) recovers x reliably across platforms (modulo the occasional system strtod bug), even when x is an infinity or nan. It's true that using float() doesn't help if you want to eval the repr of a container with nans in it. But in that situation it's not hard to prefix the eval with "nan = float('nan'); inf = float('inf')". Pete, are you still interested in this? Can you suggest a solution that doesn't mess up the float(repr(.)) round- trip? I don't really want to lose the float(repr(.)) round-trip. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 20:46:20 2009 From: report at bugs.python.org (Travis Hassloch) Date: Tue, 10 Feb 2009 19:46:20 +0000 Subject: [issue5210] zlib does not indicate end of compressed stream properly In-Reply-To: <1234295180.57.0.273384677161.issue5210@psf.upfronthosting.co.za> Message-ID: <1234295180.57.0.273384677161.issue5210@psf.upfronthosting.co.za> New submission from Travis Hassloch : Underlying zlib can determine when it has hit the end of a compressed stream without reading past the end. Python zlib implementation requires that one read past the end before it signals the end by putting data in Decompress.unused_data. This complicates interfacing with mixed compressed/uncompressed streams. ---------- components: Library (Lib) messages: 81590 nosy: travis severity: normal status: open title: zlib does not indicate end of compressed stream properly type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 20:47:16 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 10 Feb 2009 19:47:16 +0000 Subject: [issue1732212] repr of 'nan' floats not parseable Message-ID: <1234295236.84.0.702552330551.issue1732212@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 20:53:59 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 10 Feb 2009 19:53:59 +0000 Subject: [issue1151323] New fpconst module Message-ID: <1234295639.82.0.136444146022.issue1151323@psf.upfronthosting.co.za> Mark Dickinson added the comment: Since PEP 754 has been rejected, I think this issue can be closed. As noted at the top of PEP 754, much of the functionality of the patch is already included (in somewhat different form) in 2.6 and 3.0. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 20:56:32 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 10 Feb 2009 19:56:32 +0000 Subject: [issue1633648] incomplete numerical comparisons Message-ID: <1234295792.98.0.365481723911.issue1633648@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 20:59:51 2009 From: report at bugs.python.org (Daniel Diniz) Date: Tue, 10 Feb 2009 19:59:51 +0000 Subject: [issue3694] Undetected error in _struct.pack_into In-Reply-To: <1219811392.29.0.37826020023.issue3694@psf.upfronthosting.co.za> Message-ID: <1234295991.34.0.360748101494.issue3694@psf.upfronthosting.co.za> Daniel Diniz added the comment: Here's a patch with test for 3.x. Erm, I have no idea if that's all that is necessary :) Does this have the potential to break existing code? Added file: http://bugs.python.org/file13017/pynumber_assizet.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 21:00:25 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 10 Feb 2009 20:00:25 +0000 Subject: [issue1177779] explicit sign variable for longs Message-ID: <1234296025.84.0.816955344385.issue1177779@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I wasn't actually proposing to reject it, merely asking, since all people who ever commented are also committers. However, since nobody bothered committing it in the last 3+ years, I'm now rejecting it. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 21:02:55 2009 From: report at bugs.python.org (Raghuram Devarakonda) Date: Tue, 10 Feb 2009 20:02:55 +0000 Subject: [issue2204] document ConfigParser behaviour when a file has same section multiple times In-Reply-To: <1233769437.94.0.760647332001.issue2204@psf.upfronthosting.co.za> Message-ID: <2c51ecee0902101202y1fbfaaacr8959407dd3449294@mail.gmail.com> Raghuram Devarakonda added the comment: > The attached patch is a proof of concept for throwing an exception. If it is not too much of a problem, can you upload the patch to http://codereview.appspot.com? Reviewing there is simpler. Also, you will have to include some test cases in the patch. > As discussed on the mailing list [1], it has some shortcomings that > should be addressed before it is merged. I think that the builder interface already has correct behaviour in that duplicate sections are not allowed. So you can have 'unique_sections' control only parser interface and can set it to False by default (to be compatible with current behaviour). > [1]: http://mail.python.org/pipermail/python-dev/2009- Correct discussion link: http://mail.python.org/pipermail/python-dev/2009-February/085838.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 21:03:37 2009 From: report at bugs.python.org (Peter Landgren) Date: Tue, 10 Feb 2009 20:03:37 +0000 Subject: [issue5200] unicode.normalize gives wrong result for some characters In-Reply-To: <1234292363.63.0.869504877449.issue5200@psf.upfronthosting.co.za> Message-ID: <200902102104.52469.peter.talken@telia.com> Peter Landgren added the comment: Thanks for the fast response. I understand that python follows the unicode specification. I think the unicode standard is not correct in this case for the Swedish letters. I have asked unicode.org for an explanation. Should not the Danish letter "?" be normalized as "O"? I get "?" for all NFC/NFD/NFKC/NFKD normalizations? Regards, Peter Landgren Added file: http://bugs.python.org/file13018/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Tue Feb 10 21:15:01 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 10 Feb 2009 20:15:01 +0000 Subject: [issue5200] unicode.normalize gives wrong result for some characters In-Reply-To: <200902102104.52469.peter.talken@telia.com> Message-ID: <4991E042.8050103@v.loewis.de> Martin v. L?wis added the comment: > Should not the Danish letter "?" be normalized as "O"? I get "?" for all NFC/NFD/NFKC/NFKD > normalizations? I think you have a fundamental misunderstanding what a "decomposition" is. "?" should *not* be decomposed as "O", because clearly, "?" and "O" are different letters. If anything, it would be decomposed as "O" + PLUS SOME COMBINING MARK Now, in the specific case of 00D8;LATIN CAPITAL LETTER O WITH STROKE;Lu;0;L;;;;;N;LATIN CAPITAL LETTER O SLASH;;;00F8; no canonical decomposition is specified. Compare this to 00D5;LATIN CAPITAL LETTER O WITH TILDE;Lu;0;L;004F 0303;;;;N;LATIN CAPITAL LETTER O TILDE;;;00F5; which decomposes to U+004F followed by U+0303, i.e. LATIN CAPITAL LETTER O followed by COMBINING TILDE. If "?" was to be decomposed, it should use a mark COMBINING STROKE, but no such combining mark exists in Unicode. I don't know why that is; you would have to ask the Unicode consortium. In any case, Unicode guarantees stability wrt. decompositions, so even if some combining mark gets added later on, the existing decomposition remain stable. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 21:46:41 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 10 Feb 2009 20:46:41 +0000 Subject: [issue722647] lower-level API for longs Message-ID: <1234298801.57.0.483168884113.issue722647@psf.upfronthosting.co.za> Mark Dickinson added the comment: I recommend closing this due to lack of interest/PEP/patch. 2.7 and 3.1 now have n.bit_length(), which matches Gregory's proposed n.bitwid(). I'm semi-interested in the bit-access methods n.bit(x) and n.bit(hi, lo), but not enough to write a PEP or patch right now. For n.bitarray(), it might be better to expose the _PyLong_{As,From}ByteArray methods instead. ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 21:50:10 2009 From: report at bugs.python.org (Peter Landgren) Date: Tue, 10 Feb 2009 20:50:10 +0000 Subject: [issue5200] unicode.normalize gives wrong result for some characters In-Reply-To: <4991E042.8050103@v.loewis.de> Message-ID: <200902102151.34132.peter.talken@telia.com> Peter Landgren added the comment: The same applies "?" and "A", "?" and "A" and "?" and "O" which also are also different letters as "?" and "O" are. ("?" is the Danish version of "?" ) Maybe not in the unicode world but in treal life. That's why I'm a little confused. Will wait and see what/if the unicode people says. In any case, thanks for the discussion. Regards, /Peter Added file: http://bugs.python.org/file13019/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Tue Feb 10 22:00:43 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 10 Feb 2009 21:00:43 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234299643.06.0.460538138644.issue5186@psf.upfronthosting.co.za> Mark Dickinson added the comment: Some comments, while I remember: * the argument to _Py_HashPointer is not always divisible by 8. It's called to create hashes for various objects, including methodobjects; see the line: y = _Py_HashPointer((void*)(a->m_ml->ml_meth)); in meth_hash in methodobject.c, for example; here ml_meth is a C function pointer. I can't see how this could be a problem, though, especially as is seems very unlikely that two function pointers could be less than 8 bytes apart. * following from the above, it's also pretty unlikely that any two object pointers will be less than 16 bytes apart, so it might be worth seeing if performance with >>4 is noticeably any different from with >>3. * we should make sure that the value returned by _Py_HashPointer isn't the illegal hash value -1 (though it's difficult to see how it could be). One safe way to do this that shouldn't cost any CPU cycles would be to cast to unsigned long before the right shift, to be sure that the right shift zero-extends instead of sign-extending, so that the result is guaranteed nonnegative. * It *would* be nice to do something about the SIZEOF_LONG < SIZEOF_VOID_P case: the current conversion to a PyLong seems like quite an expensive way to go. And I've just ordered a computer with 64-bit Windows installed... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 22:08:06 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Feb 2009 21:08:06 +0000 Subject: [issue3694] Undetected error in _struct.pack_into In-Reply-To: <1219811392.29.0.37826020023.issue3694@psf.upfronthosting.co.za> Message-ID: <1234300086.82.0.747649053035.issue3694@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, a patch for 2.6 should be provided as well. Besides, PyExc_OverflowError is probably a better choice than PyExc_IndexError (but I'm not sure on this one). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 22:15:51 2009 From: report at bugs.python.org (David Jones) Date: Tue, 10 Feb 2009 21:15:51 +0000 Subject: [issue5202] wave.py cannot write wave files into a shell pipeline In-Reply-To: <1234285024.76.0.125197133795.issue5202@psf.upfronthosting.co.za> Message-ID: <201829EA-2F63-4889-9F9E-97CD59A4CAEE@pobox.com> David Jones added the comment: On 10 Feb 2009, at 16:57, Guilherme Polo wrote: > > Guilherme Polo added the comment: > > Now, is there some problem if we remove the calls to the "tell" method > in _write_header ? See patch attached (tests are very welcome too). Yes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 22:18:33 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Feb 2009 21:18:33 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234300713.05.0.597496618391.issue5186@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Some tests on py3k (32-bit build): >>> l = [object() for i in range(20)] >>> [id(l[i+1]) - id(l[i]) for i in range(len(l)-1)] [16, -96, 104, 8, 8, 8, 8, 8, -749528, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8] >>> class C(object): ... __slots__ = () ... >>> l = [C() for i in range(20)] >>> [id(l[i+1]) - id(l[i]) for i in range(len(l)-1)] [-104, 24, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 8, 8, 8, 8, 16, -8, 16] >>> class C(object): ... __slots__ = ('x') ... >>> l = [C() for i in range(20)] >>> [id(l[i+1]) - id(l[i]) for i in range(len(l)-1)] [432, 24, -384, 408, 24, 24, -480, 528, 24, 24, 24, 24, 48, -360, 504, 24, -480, 552, 24] So, as soon as an user-defined type isn't totally trivial, it is allocated in at least 24-byte memory units. Shifting by 4 shouldn't be detrimental performance-wise, unless you allocate lots of purely empty object() instances... Note: a 64-bit build shows an even greater allocation unit: >>> class C(object): ... __slots__ = ('x') ... >>> l = [C() for i in range(20)] >>> [id(l[i+1]) - id(l[i]) for i in range(len(l)-1)] [56, -112, 168, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56] I wonder why the allocation unit is 56 and not 48 (2*24). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 22:32:18 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 10 Feb 2009 21:32:18 +0000 Subject: [issue5200] unicode.normalize gives wrong result for some characters In-Reply-To: <200902102151.34132.peter.talken@telia.com> Message-ID: <4991F25F.8080205@v.loewis.de> Martin v. L?wis added the comment: > The same applies "?" and "A", "?" and "A" and "?" and "O" > which also are also different letters as "?" and "O" are. Sure. And rightfully, they "?" is *not* (I repeat: not) normalized as "A", under NFD: py> unicodedata.normalize("NFD", u"?") u'A\u030a' > Maybe not in the unicode world but in treal life. They are different letters also in the Unicode world. > That's why I'm a little confused. I think the confusion comes from your assumption that normalizing "?" produces "A". It does not. Really not. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 22:34:01 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 10 Feb 2009 21:34:01 +0000 Subject: [issue1732212] repr of 'nan' floats not parseable Message-ID: <1234301641.04.0.18743522725.issue1732212@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Recommend closing this. We like to have eval(repr(obj))==obj where possible but it is not a strict requirement. Am opposed to the two proposed solutions (float attributes or new literals). Mark's solution of defining nan=float('nan') whereever you care about it seems like a reasonable workaround. IMO, the special case code we've already added to support NaNs and Infs has already far exceeded their worth in real-world use cases. No need to further muddy the waters when simple workarounds exist. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 22:39:20 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 10 Feb 2009 21:39:20 +0000 Subject: [issue5206] with context object for unittest assertRaises() In-Reply-To: <1234285232.23.0.329909688935.issue5206@psf.upfronthosting.co.za> Message-ID: <1234301960.09.0.581258239726.issue5206@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Humph! The time machine strikes again. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 22:41:29 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 10 Feb 2009 21:41:29 +0000 Subject: [issue1732212] repr of 'nan' floats not parseable Message-ID: <1234302089.43.0.852320250965.issue1732212@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 22:46:29 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Feb 2009 21:46:29 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234300713.05.0.597496618391.issue5186@psf.upfronthosting.co.za> Message-ID: <1234302425.7395.5.camel@fsol> Antoine Pitrou added the comment: Le mardi 10 f?vrier 2009 ? 21:18 +0000, Antoine Pitrou a ?crit : > Note: a 64-bit build shows an even greater allocation unit: > > >>> class C(object): > ... __slots__ = ('x') > ... > >>> l = [C() for i in range(20)] > >>> [id(l[i+1]) - id(l[i]) for i in range(len(l)-1)] > [56, -112, 168, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, > 56, 56] > > I wonder why the allocation unit is 56 and not 48 (2*24). I have found the answer. The PyGC_Head forces its own alignment using a "long double" dummy, which in 64-bit mode (Linux / gcc) wastes 8 bytes between the end of the PyGC_Head and the PyObject itself. (SIZEOF_LONG_DOUBLE is 16 in pyconfig.h) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 22:54:33 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 10 Feb 2009 21:54:33 +0000 Subject: [issue722647] lower-level API for longs Message-ID: <1234302873.6.0.215719081876.issue722647@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 22:59:41 2009 From: report at bugs.python.org (Travis Hassloch) Date: Tue, 10 Feb 2009 21:59:41 +0000 Subject: [issue5209] nntplib needs updating to RFC 3977 In-Reply-To: <1234294968.88.0.213485994333.issue5209@psf.upfronthosting.co.za> Message-ID: <1234303181.21.0.3895527884.issue5209@psf.upfronthosting.co.za> Travis Hassloch added the comment: Attached is a difference which implements CAPABILITIES and MODE READER and leaves some TODO comments for other RFC 3977 commands. ---------- keywords: +patch Added file: http://bugs.python.org/file13020/nntplib.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 23:23:07 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 10 Feb 2009 22:23:07 +0000 Subject: [issue3734] subclassing complex In-Reply-To: <1220049550.4.0.0881969750537.issue3734@psf.upfronthosting.co.za> Message-ID: <1234304587.24.0.0166894287074.issue3734@psf.upfronthosting.co.za> Mark Dickinson added the comment: So there's a hint about what's happening here at the bottom of the section http://docs.python.org/reference/datamodel.html#id5 of the docs, where it says: """In the current implementation, the built-in numeric types int, long and float do not use coercion; the type complex however does use it. The difference can become apparent when subclassing these types. Over time, the type complex may be fixed to avoid coercion. [...]""" In the OPs example, when z + xz is evaluated, xz is (successfully) coerced to type complex, and then complex.__add__ is called to do the addition as usual. There's definitely (at least) a documentation bug here, given that at the same place as referenced above it says: """New-style classes (those derived from object) never invoke the __coerce__() method in response to a binary operator; the only time __coerce__() is invoked is when the built-in function coerce() is called.""" At the level of the C code, the practical difference between complex and (for example) float is that the float type has Py_TPFLAGS_CHECKTYPES set, and all arithmetic operations do their own conversions. The complex type doesn't set Py_TPFLAGS_CHECKTYPES, and so (contrary to the documentation) relies on complex_coerce to do any conversions. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 23:31:06 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Feb 2009 22:31:06 +0000 Subject: [issue4631] urlopen returns extra, spurious bytes In-Reply-To: <1228994582.88.0.234313374656.issue4631@psf.upfronthosting.co.za> Message-ID: <1234305066.41.0.889519325769.issue4631@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I took a look at the patch and it looks ok, apart from the _checkClosed() hack (but I don't think there's any immediate solution). It should be noted that HTTPResponse.readline() will be awfully slow since, as HTTPResponse doesn't have peek(), readline() will call read() one byte at a time... (slow I/O is nothing new in py3k, however :-)) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 00:03:50 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 10 Feb 2009 23:03:50 +0000 Subject: [issue4631] urlopen returns extra, spurious bytes In-Reply-To: <1228994582.88.0.234313374656.issue4631@psf.upfronthosting.co.za> Message-ID: <1234307030.35.0.45715962712.issue4631@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch without the _checkClosed() hack. The solution is simply to remove redundant _checkClosed() calls in IOBase (for example, readline() doesn't need to do an explicit `closed` check as it calls read()). Added file: http://bugs.python.org/file13021/urllib-chunked2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 00:19:23 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 10 Feb 2009 23:19:23 +0000 Subject: [issue5211] Fix complex type to avoid coercion in 2.7. In-Reply-To: <1234307963.56.0.00813246872741.issue5211@psf.upfronthosting.co.za> Message-ID: <1234307963.56.0.00813246872741.issue5211@psf.upfronthosting.co.za> New submission from Mark Dickinson : In the 'coercion rules' section of the reference manual, at: http://docs.python.org/dev/reference/datamodel.html#id5 it says: """Over time, the type complex may be fixed to avoid coercion.""" In 3.x, the complex type has (necessarily) been fixed to avoid coercion, and it ought to be a fairly easy task to backport that fix to 2.7, for someone who wants to get his or her feet wet with some CPython hacking. As far as I can see, there's no great benefit in such a change, except that the presence of coercion for the complex type causes confusion occasionally: see issue 3734 for an example of this. ---------- components: Interpreter Core keywords: easy messages: 81612 nosy: marketdickinson priority: low severity: normal status: open title: Fix complex type to avoid coercion in 2.7. type: feature request versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 00:25:38 2009 From: report at bugs.python.org (sorin) Date: Tue, 10 Feb 2009 23:25:38 +0000 Subject: [issue4947] sys.stdout fails to use default encoding as advertised In-Reply-To: <1231931928.79.0.528374921948.issue4947@psf.upfronthosting.co.za> Message-ID: <1234308338.54.0.987109033835.issue4947@psf.upfronthosting.co.za> Changes by sorin : ---------- nosy: +sorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 00:31:58 2009 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 10 Feb 2009 23:31:58 +0000 Subject: [issue3734] subclassing complex In-Reply-To: <1220049550.4.0.0881969750537.issue3734@psf.upfronthosting.co.za> Message-ID: <1234308718.53.0.0198741671052.issue3734@psf.upfronthosting.co.za> Mark Dickinson added the comment: I think this issue comes down to a doc fix, though I've opened issue 5211 for anyone who fancies having a go at removing coercion from the complex type. Here's a doc patch. ---------- assignee: marketdickinson -> georg.brandl keywords: +patch nosy: +georg.brandl Added file: http://bugs.python.org/file13022/issue3734.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 01:00:08 2009 From: report at bugs.python.org (Blair) Date: Wed, 11 Feb 2009 00:00:08 +0000 Subject: [issue3734] subclassing complex In-Reply-To: <1220049550.4.0.0881969750537.issue3734@psf.upfronthosting.co.za> Message-ID: <1234310408.89.0.758509545847.issue3734@psf.upfronthosting.co.za> Blair added the comment: While Mark Dickinson's patch fixes the documentation, it does not offer a solution to the original problem, which was rooted in a need to provide special behaviour based on the numeric types. I made the original posting because I hoped that this problem could be resolved. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 01:39:28 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 11 Feb 2009 00:39:28 +0000 Subject: [issue4631] urlopen returns extra, spurious bytes In-Reply-To: <1228994582.88.0.234313374656.issue4631@psf.upfronthosting.co.za> Message-ID: <1234312768.94.0.913228147735.issue4631@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> accepted status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 01:39:52 2009 From: report at bugs.python.org (.:. brainsik) Date: Wed, 11 Feb 2009 00:39:52 +0000 Subject: [issue5212] Incorrect note about md5 in hmac module documentation In-Reply-To: <1234312792.25.0.547667950303.issue5212@psf.upfronthosting.co.za> Message-ID: <1234312792.25.0.547667950303.issue5212@psf.upfronthosting.co.za> New submission from .:. brainsik : The HMAC module page [1] says: Note: The md5 hash has known weaknesses but remains the default for backwards compatibility. Choose a better one for your application. However, according to the "Hash Collision Q&A" [2] linked to from the hashlib module [3], md5 is not vulnerable when used in an HMAC: Q: Do these attacks break HMAC using MD5 or SHA-1? A: No. Because of the way hash functions are used in the HMAC construction, the techniques used in these recent attacks do not apply. It seems like the note is incorrect. 1. http://docs.python.org/library/hmac.html 2. http://www.cryptography.com/cnews/hash.html 3. http://docs.python.org/library/hashlib.html ---------- assignee: georg.brandl components: Documentation messages: 81615 nosy: brainsik, georg.brandl severity: normal status: open title: Incorrect note about md5 in hmac module documentation type: security versions: Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 01:44:24 2009 From: report at bugs.python.org (.:. brainsik) Date: Wed, 11 Feb 2009 00:44:24 +0000 Subject: [issue5212] Incorrect note about md5 in hmac module documentation In-Reply-To: <1234312792.25.0.547667950303.issue5212@psf.upfronthosting.co.za> Message-ID: <1234313064.0.0.0236707531169.issue5212@psf.upfronthosting.co.za> .:. brainsik added the comment: Bruce Schneier also says (regarding the SHA-1 collision attacks), "it doesn't affect applications such as HMAC where collisions aren't important": http://www.schneier.com/blog/archives/2005/02/sha1_broken.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 02:02:34 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 11 Feb 2009 01:02:34 +0000 Subject: [issue4631] urlopen returns extra, spurious bytes In-Reply-To: <1228994582.88.0.234313374656.issue4631@psf.upfronthosting.co.za> Message-ID: <1234314154.19.0.267156226435.issue4631@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r69513, r69514. Thanks everyone! ---------- resolution: accepted -> fixed status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 02:27:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 01:27:08 +0000 Subject: [issue616247] More documentation for the imp module Message-ID: <1234315628.21.0.80384589097.issue616247@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: jvr -> brett.cannon nosy: +brett.cannon versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:11:29 2009 From: report at bugs.python.org (Rafe Kaplan) Date: Wed, 11 Feb 2009 02:11:29 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1234318289.35.0.600044611228.issue5094@psf.upfronthosting.co.za> Changes by Rafe Kaplan : ---------- keywords: +patch Added file: http://bugs.python.org/file13023/datetime-utc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:29:48 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 11 Feb 2009 02:29:48 +0000 Subject: [issue1533164] Installed but not listed *.pyo break bdist_rpm Message-ID: <1234319388.11.0.729658311919.issue1533164@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed, this is a well-known issue. Many packages put an "optimize=1" in their setup.cfg in order to solve it. ---------- assignee: -> tarek nosy: +pitrou, tarek type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:50:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:50:02 +0000 Subject: [issue689895] Imports can deadlock Message-ID: <1234320602.73.0.991722981531.issue689895@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:50:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:50:47 +0000 Subject: [issue787113] zipimport on meta_path fails with mutual importers Message-ID: <1234320647.73.0.597680146146.issue787113@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: jvr -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:51:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:51:41 +0000 Subject: [issue809254] imp.find_module doesn't work in /tmp Message-ID: <1234320701.66.0.716422155585.issue809254@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:52:00 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:52:00 +0000 Subject: [issue828743] bdist_rpm failure when no setup.py Message-ID: <1234320720.21.0.980298136932.issue828743@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> tarek nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:52:32 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:52:32 +0000 Subject: [issue828450] sdist generates bad MANIFEST on Windows Message-ID: <1234320752.66.0.0481998590612.issue828450@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> tarek nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:52:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:52:59 +0000 Subject: [issue856103] reload() fails with modules from zips Message-ID: <1234320779.87.0.816701855431.issue856103@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:53:22 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:53:22 +0000 Subject: [issue965206] importing dynamic modules via embedded python Message-ID: <1234320802.62.0.899574176925.issue965206@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:53:54 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:53:54 +0000 Subject: [issue966431] import x.y inside of module x.y Message-ID: <1234320834.53.0.484441528606.issue966431@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:55:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:55:04 +0000 Subject: [issue992389] attribute error after non-from import Message-ID: <1234320904.26.0.232658725725.issue992389@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon versions: +Python 2.7, Python 3.1 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:55:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:55:24 +0000 Subject: [issue993766] bdist_dumb and --relative on Windows fails Message-ID: <1234320924.11.0.144428916066.issue993766@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> tarek nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:55:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:55:42 +0000 Subject: [issue1011113] distutils install with -b / --build-base Message-ID: <1234320942.16.0.108066404297.issue1011113@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> tarek nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:56:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:56:08 +0000 Subject: [issue1059244] distutil bdist hardcodes the python location Message-ID: <1234320968.51.0.945306743557.issue1059244@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> tarek components: +Distutils -None nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:56:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:56:55 +0000 Subject: [issue1109602] Need some setup.py sanity Message-ID: <1234321015.9.0.87291367124.issue1109602@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> tarek nosy: +tarek type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:57:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:57:24 +0000 Subject: [issue1109658] distutils dry-run breaks when attempting to bytecompile Message-ID: <1234321044.34.0.634376000869.issue1109658@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> tarek nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:57:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:57:44 +0000 Subject: [issue1109963] bdist_wininst ignores build_lib from build command Message-ID: <1234321064.25.0.696459239474.issue1109963@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> tarek nosy: +tarek versions: +Python 2.7 -Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:58:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:58:28 +0000 Subject: [issue1214675] module warnings lacks a remove filter function Message-ID: <1234321108.97.0.230331666277.issue1214675@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:59:14 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:59:14 +0000 Subject: [issue1419652] PyImport_AppendInittab stores pointer to parameter Message-ID: <1234321154.92.0.908488683949.issue1419652@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: loewis -> brett.cannon nosy: +brett.cannon versions: +Python 2.7 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 03:59:46 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 02:59:46 +0000 Subject: [issue1220756] Re-importing embedded thread dumps core Message-ID: <1234321186.85.0.925276609239.issue1220756@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:01:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:01:11 +0000 Subject: [issue701743] Reloading pseudo modules Message-ID: <1234321271.32.0.188742169435.issue701743@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon type: -> feature request versions: +Python 2.6, Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:01:45 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Feb 2009 03:01:45 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1234321305.74.0.269675488932.issue5094@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:02:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:02:04 +0000 Subject: [issue779191] BasicModuleLoader behaviour in Python 2.3c2 Message-ID: <1234321324.82.0.506461232461.issue779191@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:03:30 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Feb 2009 03:03:30 +0000 Subject: [issue4347] Circular dependency causes SystemError when adding new syntax In-Reply-To: <1227022091.75.0.852526924329.issue4347@psf.upfronthosting.co.za> Message-ID: <1234321410.87.0.487071485133.issue4347@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- priority: -> normal stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:03:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:03:43 +0000 Subject: [issue1044382] Can't raise "C API version mismatch" warning Message-ID: <1234321423.75.0.803777112043.issue1044382@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:04:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:04:06 +0000 Subject: [issue1074015] current directory in sys.path handles symlinks badly Message-ID: <1234321446.96.0.872434800547.issue1074015@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon components: +Interpreter Core -None nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:04:37 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:04:37 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1234321477.38.0.373299486374.issue1161031@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +brett.cannon type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:05:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:05:39 +0000 Subject: [issue1507224] sys.path issue if sys.prefix contains a colon Message-ID: <1234321539.37.0.464451203878.issue1507224@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:06:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:06:27 +0000 Subject: [issue1525549] Document additions from PEP 302 Message-ID: <1234321587.99.0.648703320564.issue1525549@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:06:51 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:06:51 +0000 Subject: [issue1514734] site.py can break the location of the python library Message-ID: <1234321611.19.0.511848217544.issue1514734@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:07:04 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Feb 2009 03:07:04 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1234321624.8.0.669711701736.issue2775@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:07:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:07:38 +0000 Subject: [issue1534764] sys.path gets munged with certain directory structures Message-ID: <1234321658.05.0.536022897465.issue1534764@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:07:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:07:52 +0000 Subject: [issue1538778] pyo's are not overwritten by different optimization levels Message-ID: <1234321672.37.0.39679409589.issue1538778@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:08:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:08:20 +0000 Subject: [issue1539925] warnings in interactive sessions Message-ID: <1234321700.49.0.840844685287.issue1539925@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:09:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:09:10 +0000 Subject: [issue1548371] filterwarnings('error') has no effect Message-ID: <1234321750.52.0.856047256627.issue1548371@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon components: +Library (Lib) -None nosy: +brett.cannon type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:09:25 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:09:25 +0000 Subject: [issue1548687] C modules reloaded on certain failed imports Message-ID: <1234321765.03.0.116306967112.issue1548687@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:10:00 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:10:00 +0000 Subject: [issue1590864] import deadlocks when using PyObjC threads Message-ID: <1234321800.91.0.311905894592.issue1590864@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:10:19 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:10:19 +0000 Subject: [issue1635217] Add example of distutils setup() with "requires" argument Message-ID: <1234321819.38.0.266653387962.issue1635217@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> tarek nosy: +tarek type: -> feature request versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:11:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:11:02 +0000 Subject: [issue1644818] Allow importing built-in submodules Message-ID: <1234321862.46.0.0691624660663.issue1644818@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:12:23 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:12:23 +0000 Subject: [issue1562822] decimal module borks thread Message-ID: <1234321943.12.0.0876684622012.issue1562822@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:13:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 03:13:12 +0000 Subject: [issue1552880] Unicode Imports Message-ID: <1234321992.95.0.789608640669.issue1552880@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon, ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:13:50 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Feb 2009 03:13:50 +0000 Subject: [issue616247] More documentation for the imp module Message-ID: <1234322030.38.0.627248490999.issue616247@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:14:59 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Feb 2009 03:14:59 +0000 Subject: [issue2227] time.strptime too strict? should it assume current year? In-Reply-To: <1204580486.17.0.196786227347.issue2227@psf.upfronthosting.co.za> Message-ID: <1234322099.29.0.304923857505.issue2227@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:15:14 2009 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Feb 2009 03:15:14 +0000 Subject: [issue4011] Create DAG for PEP 101 In-Reply-To: <1222896665.95.0.381960877122.issue4011@psf.upfronthosting.co.za> Message-ID: <1234322114.44.0.715710901622.issue4011@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:31:53 2009 From: report at bugs.python.org (Adam Olsen) Date: Wed, 11 Feb 2009 03:31:53 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234323113.24.0.149926248907.issue5186@psf.upfronthosting.co.za> Adam Olsen added the comment: On my 64-bit linux box there's nothing in the last 4 bits: >>> [id(o)%16 for o in [object() for i in range(128)]] [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] And with a bit more complicated functions I can determine how much shift gives us the lowest collision rate: def a(size, shift): return len(set((id(o) >> shift) % (size * 2) for o in [object() for i in range(size)])) def b(size): return [a(size, shift) for shift in range(11)] def c(): for i in range(1, 9): size = 2**i x = ', '.join('% 3s' % count for count in b(size)) print('% 3s: %s' % (size, x)) >>> c() 2: 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2 4: 1, 1, 2, 3, 4, 3, 2, 4, 4, 3, 2 8: 1, 2, 4, 6, 6, 7, 8, 6, 4, 3, 2 16: 2, 4, 7, 9, 12, 13, 12, 8, 5, 3, 2 32: 4, 8, 14, 23, 30, 25, 19, 12, 7, 4, 2 64: 8, 16, 32, 55, 64, 38, 22, 13, 8, 4, 2 128: 16, 32, 64, 114, 128, 71, 39, 22, 12, 6, 3 256: 32, 64, 128, 242, 242, 123, 71, 38, 20, 10, 5 The fifth column (ie 4 bits of shift, a divide of 16) works the best. Although it varies from run to run, probably more than half the results in that column have no collisions at all. .. although, if I replace object() with list() I get best results with a shift of 6 bits. Replacing it with dict() is best with 8 bits. We may want something more complicated. ---------- nosy: +Rhamphoryncus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 04:53:49 2009 From: report at bugs.python.org (Adam Olsen) Date: Wed, 11 Feb 2009 03:53:49 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234324429.91.0.00762524996667.issue5186@psf.upfronthosting.co.za> Adam Olsen added the comment: Upon further inspection, although a shift of 4 (on a 64-bit linux box) isn't perfect for dict, it's fairly close to it and well beyond random hash values. Mixing things more is just gonna lower it towards random values. >>> c() 2: 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2 4: 1, 1, 2, 3, 4, 3, 3, 2, 2, 2, 3 8: 1, 2, 4, 7, 8, 7, 5, 6, 7, 5, 5 16: 2, 4, 7, 11, 16, 15, 12, 14, 15, 9, 7 32: 3, 5, 10, 18, 31, 30, 30, 30, 31, 20, 12 64: 8, 14, 23, 36, 47, 54, 59, 59, 61, 37, 21 128: 16, 32, 58, 83, 118, 100, 110, 114, 126, 73, 41 256: 32, 64, 128, 195, 227, 197, 203, 240, 253, 150, 78 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:06:37 2009 From: report at bugs.python.org (Guilherme Polo) Date: Wed, 11 Feb 2009 04:06:37 +0000 Subject: [issue5213] _resolve_name in importlib/__init__.py left an index on rindex usage In-Reply-To: <1234325197.68.0.593462014279.issue5213@psf.upfronthosting.co.za> Message-ID: <1234325197.68.0.593462014279.issue5213@psf.upfronthosting.co.za> New submission from Guilherme Polo : I guess this happened due to the transition from rsplit to rindex. ---------- assignee: brett.cannon components: Library (Lib) files: _resolve_name_rindex.diff keywords: easy, patch messages: 81621 nosy: brett.cannon, gpolo severity: normal status: open title: _resolve_name in importlib/__init__.py left an index on rindex usage versions: Python 2.7 Added file: http://bugs.python.org/file13024/_resolve_name_rindex.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:13:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 04:13:27 +0000 Subject: [issue3844] Script: find untested C functions In-Reply-To: <1221183130.16.0.392255875498.issue3844@psf.upfronthosting.co.za> Message-ID: <1234325607.81.0.722657726122.issue3844@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing: resource available externally ( http://bazaar.launchpad.net/~ajaksu/ccoverage/trunk/files ) ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:14:02 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 11 Feb 2009 04:14:02 +0000 Subject: [issue5204] test.os/TestInvalidFD/test_fdopen on VC6 In-Reply-To: <1234274915.85.0.510245571983.issue5204@psf.upfronthosting.co.za> Message-ID: <1234325642.94.0.0923254990781.issue5204@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Thanks, committed in r69516. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:15:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 04:15:05 +0000 Subject: [issue1665206] Hangup when using cgitb in a thread while still in import Message-ID: <1234325705.99.0.614805131991.issue1665206@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:22:18 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 04:22:18 +0000 Subject: [issue1175686] add "reload" function to IDLE Message-ID: <1234326138.29.0.509181853739.issue1175686@psf.upfronthosting.co.za> Daniel Diniz added the comment: It seems discussion in issue 1721083 is more advanced... should this one be closed? :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:24:17 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 04:24:17 +0000 Subject: [issue1299] distutils.sysconfig is not cross-platform compatible In-Reply-To: <1192727810.38.0.522851261061.issue1299@psf.upfronthosting.co.za> Message-ID: <1234326257.54.0.813310568237.issue1299@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> tarek components: +Distutils -Windows nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:27:37 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 04:27:37 +0000 Subject: [issue2100] unit test UnicodeWarning In-Reply-To: <1202912464.45.0.11566210495.issue2100@psf.upfronthosting.co.za> Message-ID: <1234326457.81.0.31506346345.issue2100@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +brett.cannon, ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:29:23 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Feb 2009 04:29:23 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234326563.66.0.162302896251.issue5186@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Instead of a shift, how about a rotate or byteswap in case the lower bits ever become significant again in some build. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:39:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 04:39:12 +0000 Subject: [issue2308] Make structseq more like collections.namedtuple In-Reply-To: <1205702371.36.0.516999386883.issue2308@psf.upfronthosting.co.za> Message-ID: <1234327152.94.0.00349536345574.issue2308@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing as a duplicate of issue 1820. ---------- nosy: +ajaksu2, rhettinger resolution: -> duplicate status: open -> closed superseder: -> Enhance Object/structseq.c to match namedtuple and tuple api _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:40:45 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 04:40:45 +0000 Subject: [issue2437] Distutils runtime_library_dirs broken on Windows In-Reply-To: <1206044595.46.0.100105317073.issue2437@psf.upfronthosting.co.za> Message-ID: <1234327245.83.0.547114833935.issue2437@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> tarek nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:41:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 04:41:38 +0000 Subject: [issue2454] sha and md5 fixer In-Reply-To: <1206147643.89.0.60936055638.issue2454@psf.upfronthosting.co.za> Message-ID: <1234327298.24.0.00736273948069.issue2454@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:42:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 04:42:01 +0000 Subject: [issue2412] Check 2to3 for support of print function. In-Reply-To: <1205883738.38.0.0352891857591.issue2412@psf.upfronthosting.co.za> Message-ID: <1234327321.59.0.639522281882.issue2412@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:45:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 04:45:26 +0000 Subject: [issue2953] _zip_directory_cache untested and undocumented In-Reply-To: <1211574365.23.0.256921758457.issue2953@psf.upfronthosting.co.za> Message-ID: <1234327526.92.0.0194179277739.issue2953@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:45:58 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 04:45:58 +0000 Subject: [issue2805] 2to3 doesn't correct divisions In-Reply-To: <1210366311.62.0.240931801365.issue2805@psf.upfronthosting.co.za> Message-ID: <1234327558.27.0.457084118868.issue2805@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:46:20 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Feb 2009 04:46:20 +0000 Subject: [issue1820] Enhance Object/structseq.c to match namedtuple and tuple api In-Reply-To: <1200284428.58.0.762384814897.issue1820@psf.upfronthosting.co.za> Message-ID: <1234327580.9.0.732507104056.issue1820@psf.upfronthosting.co.za> Raymond Hettinger added the comment: See also issue 2308 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:46:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 04:46:34 +0000 Subject: [issue2972] arguments and default path not set in site.py and sitecustomize.py In-Reply-To: <1211818636.32.0.584139114136.issue2972@psf.upfronthosting.co.za> Message-ID: <1234327594.25.0.199547321124.issue2972@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:49:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 04:49:06 +0000 Subject: [issue3099] On windows, "import nul" always succeed In-Reply-To: <1213319928.58.0.193615390811.issue3099@psf.upfronthosting.co.za> Message-ID: <1234327746.09.0.329981250634.issue3099@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:52:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 04:52:11 +0000 Subject: [issue3370] importing with_statement causes exec to raise syntax error on block that doesn't end with a newline In-Reply-To: <1216160435.89.0.00837821764809.issue3370@psf.upfronthosting.co.za> Message-ID: <1234327931.62.0.0508950126388.issue3370@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing: fixed in trunk, 2.5 won't be receiving bugfixes anymore. ---------- nosy: +ajaksu2 resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:52:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 04:52:49 +0000 Subject: [issue3444] add warnings for intra-package imports In-Reply-To: <1216997291.25.0.564093390831.issue3444@psf.upfronthosting.co.za> Message-ID: <1234327969.11.0.282984396963.issue3444@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:53:19 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Feb 2009 04:53:19 +0000 Subject: [issue2805] 2to3 doesn't correct divisions In-Reply-To: <1210366311.62.0.240931801365.issue2805@psf.upfronthosting.co.za> Message-ID: <1234327999.28.0.675304347036.issue2805@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I thought the right way to handle this is with a -3 option. That's the only way to reliably detect the intended meaning of / and its change in meaning in 3.0. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 05:53:31 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 04:53:31 +0000 Subject: [issue3619] A more informative message for ImportError In-Reply-To: <1219240834.62.0.382152843898.issue3619@psf.upfronthosting.co.za> Message-ID: <1234328011.88.0.700578310296.issue3619@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 06:20:54 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 11 Feb 2009 05:20:54 +0000 Subject: [issue5204] test.os/TestInvalidFD/test_fdopen on VC6 In-Reply-To: <1234274915.85.0.510245571983.issue5204@psf.upfronthosting.co.za> Message-ID: <1234329654.51.0.00821440453544.issue5204@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- stage: commit review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 08:03:38 2009 From: report at bugs.python.org (Dwayne Bailey) Date: Wed, 11 Feb 2009 07:03:38 +0000 Subject: [issue5214] Add KOI8-RU as a known encoding In-Reply-To: <1234335818.61.0.321610259153.issue5214@psf.upfronthosting.co.za> Message-ID: <1234335818.61.0.321610259153.issue5214@psf.upfronthosting.co.za> New submission from Dwayne Bailey : >>> u = unicode("bob", "KOI8-RU") Traceback (most recent call last): File "", line 1, in LookupError: unknown encoding: KOI8-RU This could be broadened to see that we support all encodings that are supported by iconv. ---------- components: Unicode messages: 81630 nosy: dwayne severity: normal status: open title: Add KOI8-RU as a known encoding versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 08:15:00 2009 From: report at bugs.python.org (Akira Kitada) Date: Wed, 11 Feb 2009 07:15:00 +0000 Subject: [issue1635363] Add command line help to windows unistall binary Message-ID: <1234336500.42.0.450039624959.issue1635363@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- assignee: -> tarek components: +Windows nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 08:18:13 2009 From: report at bugs.python.org (Akira Kitada) Date: Wed, 11 Feb 2009 07:18:13 +0000 Subject: [issue969718] BASECFLAGS are not passed to module build line Message-ID: <1234336693.49.0.50118779135.issue969718@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 08:22:20 2009 From: report at bugs.python.org (Akira Kitada) Date: Wed, 11 Feb 2009 07:22:20 +0000 Subject: [issue1648890] HP-UX: ld -Wl,+b... Message-ID: <1234336940.44.0.75433484447.issue1648890@psf.upfronthosting.co.za> Changes by Akira Kitada : ---------- nosy: +tarek type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 08:43:02 2009 From: report at bugs.python.org (mproeller) Date: Wed, 11 Feb 2009 07:43:02 +0000 Subject: [issue5215] change value of local variable in debug In-Reply-To: <1234338182.69.0.0258607971835.issue5215@psf.upfronthosting.co.za> Message-ID: <1234338182.69.0.0258607971835.issue5215@psf.upfronthosting.co.za> New submission from mproeller : The following code produces problems: import pdb def func(): b = 13 pdb.set_trace() a = b + 2 print a func() If I change the value of b (e.g. to 3) everything works fine (print a => displays 5) but if I want to change b (e.g. to 3) and display the value, it is reset to 13 (and print a displays 15) ---------- components: None messages: 81631 nosy: mproeller severity: normal status: open title: change value of local variable in debug type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 09:24:06 2009 From: report at bugs.python.org (Peter Landgren) Date: Wed, 11 Feb 2009 08:24:06 +0000 Subject: [issue5200] unicode.normalize gives wrong result for some characters In-Reply-To: <4991F25F.8080205@v.loewis.de> Message-ID: <200902110925.24953.peter.talken@telia.com> Peter Landgren added the comment: > Martin v. L?wis added the comment: > > The same applies "?" and "A", "?" and "A" and "?" and "O" > > which also are also different letters as "?" and "O" are. > > Sure. And rightfully, they "?" is *not* (I repeat: not) > normalized as "A", under NFD: > > py> unicodedata.normalize("NFD", u"?") > u'A\u030a' > > > Maybe not in the unicode world but in treal life. > > They are different letters also in the Unicode world. > > > That's why I'm a little confused. > > I think the confusion comes from your assumption that > normalizing "?" produces "A". It does not. Really not. Yes, you are right. However the confusion/problem shows up when it is used in the application to build an alphabet and group for example all version of E, ?, ?, ?, ? together under E. The first character in the result of normalize is used to build alphabet labels for surnames: letter = normalize("NFD", surname)[0].upper() if letter != last_letter: last_letter = letter .... and this is why I get "A" when the surname begins with "?". This way it works for all variations of E to be grouped under "E", but fails as "?" is shown under the label "A", not the "A" in the beginning of the alphabet but after "Z", where "???" comes. So a previous sorting of the surnames works correctly. (The Swedish alphabet has 29 letters: A,B,C... X,Y,Z,?,?,?) Can you think of any solution to this conflict? u'\xd8' u'A\u030a' u'\xc5' This is obviously the result of how the unicode spec is written interpreting "?" as a variation of "A". which it is not. I have asked the unicode people, but not got any answer yet. The application is GRAMPS: http://gramps-project.org/ Once again thanks for make some of the unicode stuff clear! Regards, Peter Landgren Added file: http://bugs.python.org/file13025/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Wed Feb 11 09:56:55 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Feb 2009 08:56:55 +0000 Subject: [issue5211] Fix complex type to avoid coercion in 2.7. In-Reply-To: <1234307963.56.0.00813246872741.issue5211@psf.upfronthosting.co.za> Message-ID: <1234342615.23.0.310819696909.issue5211@psf.upfronthosting.co.za> Mark Dickinson added the comment: Comment by gumtree copied from issue3734 discussion: > While Mark Dickinson's patch fixes the documentation, it does not offer > a solution to the original problem, which was rooted in a need to > provide special behaviour based on the numeric types. I made the > original posting because I hoped that this problem could be resolved. gumtree, would you be interested in working on a patch for this feature- request? As mentioned above, the necessary changes are already present in 3.x, so all that's entailed is figuring out which bits of the Object/complexobject.c in the py3k source need to be transferred to the trunk, and making sure that everything's properly tested. Alternatively, could you explain in a little more detail why this change is important to you? Subclassing complex doesn't seem like a very common thing to want to do, so I'm curious about your use case. ---------- nosy: +gumtree _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 09:58:42 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Feb 2009 08:58:42 +0000 Subject: [issue3734] subclassing complex In-Reply-To: <1220049550.4.0.0881969750537.issue3734@psf.upfronthosting.co.za> Message-ID: <1234342722.03.0.267299551486.issue3734@psf.upfronthosting.co.za> Mark Dickinson added the comment: [gumtree] > [...] does not offer > a solution to the original problem, which was rooted in a need to > provide special behaviour based on the numeric types. I made the > original posting because I hoped that this problem could be resolved. Please see issue 5211 for further discussion. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 10:02:22 2009 From: report at bugs.python.org (Adam Olsen) Date: Wed, 11 Feb 2009 09:02:22 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234342942.4.0.947817885436.issue5186@psf.upfronthosting.co.za> Adam Olsen added the comment: The alignment requirements (long double) make it impossible to have anything in those bits. Hypothetically, a custom allocator could lower the alignment requirements to sizeof(void *). However, rotating to the high bits is pointless as they're the least likely to be used ? impossible in this case, as only the 2 highest bits would contain anything, and for that you'd need a dictionary with at least 2 billion entries on 32bit, which is more than the 32bit address space. 64-bit is similar. Note that mixing the bits back in, via XOR or similar, is actually more likely to hurt than help. It's just like ints and strings, who's hash values are very sequential, a simple shift tends to get us sequential hashes. This gives us a far lower collision rate than a statistically random hash. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 11:33:18 2009 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 11 Feb 2009 10:33:18 +0000 Subject: [issue1552880] Unicode Imports Message-ID: <1234348398.78.0.626673655873.issue1552880@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Ah, this one is still alive? We still use this patch at CCP for our 2.x python. I'll give it some more love to answer the issues raised. Hm, is this still an issue with 3.x? Does the imput machinery use unicode as the internal format when working with the import paths? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 11:53:25 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Feb 2009 10:53:25 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234349605.48.0.164667885737.issue5186@psf.upfronthosting.co.za> Mark Dickinson added the comment: [Adam Olsen] > The alignment requirements (long double) make it impossible to have > anything in those bits. Not necessarily, since not all pointers passed to _Py_HashPointer come from a PyObject_Malloc. _Py_HashPointer is used for function pointers as well. For example, on 64-bit linux I get: Python 2.7a0 (trunk:69516, Feb 11 2009, 10:43:51) [GCC 4.2.1 (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from hashlib import sha224 >>> hash(sha224) 47100514454970 >>> hash(sha224) % 16 10 > for that you'd need a dictionary with at least 2 billion entries > on 32bit, If I recall correctly, the higher bits of the hash value also get used in collision resolution: they're mixed in to the algorithm that's used to produce the probing sequence when looking for an empty slot. So the dictionary wouldn't necessarily have to be quite that large for the top bits to come into play. But I agree that mixing the bottom bits back in (via rotate, or xor, or whatever) doesn't seem likely to help. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 12:31:20 2009 From: report at bugs.python.org (Thomas Heller) Date: Wed, 11 Feb 2009 11:31:20 +0000 Subject: [issue1552880] Unicode Imports Message-ID: <1234351880.21.0.337589880792.issue1552880@psf.upfronthosting.co.za> Changes by Thomas Heller : ---------- nosy: +theller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 12:46:51 2009 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Wed, 11 Feb 2009 11:46:51 +0000 Subject: [issue1076233] distutils.core.setup() with unicode arguments broken Message-ID: <1234352811.12.0.938286414744.issue1076233@psf.upfronthosting.co.za> Walter D?rwald added the comment: It does indeed work with Python 2.6 (however not with 2.5). Closing. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 13:18:52 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 11 Feb 2009 12:18:52 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234323113.24.0.149926248907.issue5186@psf.upfronthosting.co.za> Message-ID: <1234354767.8256.3.camel@fsol> Antoine Pitrou added the comment: Le mercredi 11 f?vrier 2009 ? 03:31 +0000, Adam Olsen a ?crit : > > .. although, if I replace object() with list() I get best results with a > shift of 6 bits. Replacing it with dict() is best with 8 bits. But list() and dict() don't use id() for hash. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 13:28:04 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Feb 2009 12:28:04 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234355284.22.0.0469002855169.issue5186@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's an updated patch, that errs on the conservative side: - rotate instead of shifting, as suggested by Raymond. This costs very little, and I admit to feeling uncomfortable about the possibility of just throwing bits away - explicit check for -1 - special case for sizeof(void *) = 2*sizeof(long) All tests pass with the patch applied. I've left the 'convert to PyLong' code in as a safety net: it's used on platforms where sizeof(void *) > sizeof(long) but sizeof(void *) != 2*sizeof(long). I don't know of any such platforms in current use. Sample timings on 64-bit linux (non-debug trunk build, Core 2 Duo). before: dict creation (selected): 1.18751096725 dict creation (shuffled): 1.21234202385 dict creation: 1.00831198692 set creation (selected): 0.869561910629 set creation (shuffled): 0.867420911789 set creation: 0.77153301239 and after: dict creation (selected): 1.06817317009 dict creation (shuffled): 0.987659931183 dict creation: 0.662216901779 set creation (selected): 0.735805034637 set creation (shuffled): 0.659453868866 set creation: 0.445232152939 Added file: http://bugs.python.org/file13026/pointer_hash2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 13:54:30 2009 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Wed, 11 Feb 2009 12:54:30 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1234356870.41.0.0289243158435.issue5094@psf.upfronthosting.co.za> Walter D?rwald added the comment: The patch doesn't include any changes to the documentation. ---------- nosy: +doerwalter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 14:01:28 2009 From: report at bugs.python.org (=?utf-8?q?Chema_Cort=C3=A9s?=) Date: Wed, 11 Feb 2009 13:01:28 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234357288.64.0.393372198773.issue5186@psf.upfronthosting.co.za> Changes by Chema Cort?s : ---------- nosy: +chemacortes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 14:45:38 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Feb 2009 13:45:38 +0000 Subject: [issue4799] handling inf/nan in '%f' In-Reply-To: <1230796367.25.0.681154044554.issue4799@psf.upfronthosting.co.za> Message-ID: <1234359938.35.0.7871919557.issue4799@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> marketdickinson nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 14:47:55 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Feb 2009 13:47:55 +0000 Subject: [issue4880] PyInt_FromSsize_t LONG_MIN and LONG_MAX typecasts needed In-Reply-To: <1231426590.2.0.669134378939.issue4880@psf.upfronthosting.co.za> Message-ID: <1234360075.54.0.137004936592.issue4880@psf.upfronthosting.co.za> Mark Dickinson added the comment: It seems likely that this is a wine bug rather than a Python bug. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 15:02:36 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Feb 2009 14:02:36 +0000 Subject: [issue1507] complex constructor loses signs of zeros In-Reply-To: <1196202312.79.0.339731037994.issue1507@psf.upfronthosting.co.za> Message-ID: <1234360956.01.0.891124389791.issue1507@psf.upfronthosting.co.za> Mark Dickinson added the comment: This is out of date for 2.5. Closing. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 15:18:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 14:18:50 +0000 Subject: [issue1327971] HTTPResponse instance has no attribute 'fileno' Message-ID: <1234361930.27.0.485226286334.issue1327971@psf.upfronthosting.co.za> Daniel Diniz added the comment: OK, I'll work on a test + patch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 15:42:06 2009 From: report at bugs.python.org (Matthias Klose) Date: Wed, 11 Feb 2009 14:42:06 +0000 Subject: [issue5216] distutils.tests.test_build_ext.BuildExtTestCase fails when srcdir != builddir In-Reply-To: <1234363326.79.0.666992241975.issue5216@psf.upfronthosting.co.za> Message-ID: <1234363326.79.0.666992241975.issue5216@psf.upfronthosting.co.za> New submission from Matthias Klose : these tests fail, when python is built with builddir != srcdir. ====================================================================== ERROR: test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/packages/python/2.6/python2.6-2.6.1/Lib/distutils/tests/test_build_ext.p y", line 23, in setUp shutil.copy(xx_c, self.tmp_dir) File "/home/packages/python/2.6/python2.6-2.6.1/Lib/shutil.py", line 88, in copy copyfile(src, dst) File "/home/packages/python/2.6/python2.6-2.6.1/Lib/shutil.py", line 52, in copyfile fsrc = open(src, 'rb') IOError: [Errno 2] No such file or directory: '/home/packages/python/2.6/python2.6-2.6 .1/build-static/Modules/xxmodule.c' ====================================================================== ERROR: test_solaris_enable_shared (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/packages/python/2.6/python2.6-2.6.1/Lib/distutils/tests/test_build_ext.py", line 23, in setUp shutil.copy(xx_c, self.tmp_dir) File "/home/packages/python/2.6/python2.6-2.6.1/Lib/shutil.py", line 88, in copy copyfile(src, dst) File "/home/packages/python/2.6/python2.6-2.6.1/Lib/shutil.py", line 52, in copyfile fsrc = open(src, 'rb') IOError: [Errno 2] No such file or directory: '/home/packages/python/2.6/python2.6-2.6.1/build-static/Modules/xxmodule.c' ---------- assignee: tarek components: Distutils, Tests messages: 81645 nosy: doko, tarek severity: normal status: open title: distutils.tests.test_build_ext.BuildExtTestCase fails when srcdir != builddir type: compile error versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 15:51:24 2009 From: report at bugs.python.org (Matthias Klose) Date: Wed, 11 Feb 2009 14:51:24 +0000 Subject: [issue5217] testExtractDir (test.test_zipfile.TestWithDirectory) fails when python built with srcdir != builddir In-Reply-To: <1234363884.6.0.67560680288.issue5217@psf.upfronthosting.co.za> Message-ID: <1234363884.6.0.67560680288.issue5217@psf.upfronthosting.co.za> New submission from Matthias Klose : ====================================================================== ERROR: testExtractDir (test.test_zipfile.TestWithDirectory) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/packages/python/2.6/python2.6-2.6.1/Lib/test/test_zipfile.py", line 991, in testExtractDir zipf = zipfile.ZipFile(findfile("zipdir.zip")) File "/home/packages/python/2.6/python2.6-2.6.1/Lib/zipfile.py", line 680, in __init__ self.fp = open(file, modeDict[mode]) IOError: [Errno 2] No such file or directory: 'zipdir.zip' test.test_support.findfile searches in sys.path and in the directory where test_support.py is located. this seems to be wrong when python is built with srcdir != builddir. should the test overwrite the optional second argument when calling findfile? ---------- components: Tests messages: 81646 nosy: doko severity: normal status: open title: testExtractDir (test.test_zipfile.TestWithDirectory) fails when python built with srcdir != builddir versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 16:04:18 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Feb 2009 15:04:18 +0000 Subject: [issue1633648] incomplete numerical comparisons Message-ID: <1234364658.45.0.583157687893.issue1633648@psf.upfronthosting.co.za> Mark Dickinson added the comment: This issue is out of date from the perspective of python-pgsql, since that's long been fixed. It's difficult to figure out exactly what the issue is here. As best as I can guess, it's something like the following. After: class MyInt(object): def __init__(self, n): self.n = n def __coerce__(self, other): if type(other) is float: return float(self.n), other x = MyInt(3) the comparison "x < 4.0" gives False in the 2.4+, and True in 2.3. I'm closing this as a won't fix: it doesn't seem worth changing the comparison behaviour for Python 2.7 (which may well be the last in the line of 2.x releases anyway), and the whole coercion/three-way-comparison mess is gone in 3.x. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 16:04:22 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 15:04:22 +0000 Subject: [issue3694] Undetected error in _struct.pack_into In-Reply-To: <1219811392.29.0.37826020023.issue3694@psf.upfronthosting.co.za> Message-ID: <1234364662.25.0.186809476472.issue3694@psf.upfronthosting.co.za> Daniel Diniz added the comment: Looks like both Undetected errors were corrected by Victor's patches, which Benjamin committed around rev66693, so trunk only needs a test. Here are the patches. I think IndexError fits better (and matches trunk), as the issue is that None is passed as "offset", which should be an Integral. If you disagree, I'll modify the patch. Is PyErr_Format'ing the exception desired? BTW, there's a warning in _struct.c:180 -> warning: ?get_ulong? defined but not used, should I open a new issue? Added file: http://bugs.python.org/file13027/pynumber_assizet_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 16:04:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 15:04:47 +0000 Subject: [issue3694] Undetected error in _struct.pack_into In-Reply-To: <1219811392.29.0.37826020023.issue3694@psf.upfronthosting.co.za> Message-ID: <1234364687.59.0.517844309668.issue3694@psf.upfronthosting.co.za> Changes by Daniel Diniz : Removed file: http://bugs.python.org/file13017/pynumber_assizet.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 16:06:32 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 15:06:32 +0000 Subject: [issue3694] Undetected error in _struct.pack_into In-Reply-To: <1219811392.29.0.37826020023.issue3694@psf.upfronthosting.co.za> Message-ID: <1234364792.14.0.170351569285.issue3694@psf.upfronthosting.co.za> Changes by Daniel Diniz : Added file: http://bugs.python.org/file13028/pynumber_assizet_trunk.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 17:17:12 2009 From: report at bugs.python.org (Rafe Kaplan) Date: Wed, 11 Feb 2009 16:17:12 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1234369032.97.0.687743082383.issue5094@psf.upfronthosting.co.za> Rafe Kaplan added the comment: I thought I had uploaded this last night, apologies. Added file: http://bugs.python.org/file13029/datetime-utc-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 17:46:35 2009 From: report at bugs.python.org (George Sakkis) Date: Wed, 11 Feb 2009 16:46:35 +0000 Subject: [issue2279] distutils sdist add_defaults does not add data_files In-Reply-To: <1205333612.66.0.693918609529.issue2279@psf.upfronthosting.co.za> Message-ID: <1234370795.22.0.135387628882.issue2279@psf.upfronthosting.co.za> George Sakkis added the comment: Agreed; package_data are also ignored by sdist. Unfortunately, neither setuptools seems to work as expected on sdist but at least bdist_egg does. MANIFEST.in is an ugly hack and should be deprecated; you shouldn't have to repeat yourself in two files. ---------- nosy: +gsakkis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 17:56:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 16:56:56 +0000 Subject: [issue1327971] HTTPResponse instance has no attribute 'fileno' Message-ID: <1234371416.07.0.912735773345.issue1327971@psf.upfronthosting.co.za> Daniel Diniz added the comment: IMHO, using a fileno property looks better than __getattr__. Setting an attribute in init works too, unless fp changes during the object life (then 3.x is broken IIUC). It works OK as a property of either urllib.addinfourl or of httplib.HTTPResponse (socket would work, but is this broken there or a higher layer). Tests and fixes for both solutions attached. As soon as one is chosen, some docs on fileno would be nice, even for 3.x. This (current) test in test_urllibnet.py passes, but I don't see how to improve it, assuming it should fail/detect this bug (maybe self.urlopen isn't testing urllib.urlopen correctly?): def test_fileno(self): if (sys.platform in ('win32',) or not hasattr(os, 'fdopen')): # On Windows, socket handles are not file descriptors; this # test can't pass on Windows. return # Make sure fd returned by fileno is valid. open_url = self.urlopen("http://www.python.org/") fd = open_url.fileno() FILE = os.fdopen(fd) ---------- keywords: +patch stage: test needed -> patch review Added file: http://bugs.python.org/file13030/httplib_fileno.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 17:58:13 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 16:58:13 +0000 Subject: [issue1327971] HTTPResponse instance has no attribute 'fileno' Message-ID: <1234371493.86.0.580524971746.issue1327971@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -None type: -> behavior Added file: http://bugs.python.org/file13031/urllib_fileno.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 18:07:07 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Feb 2009 17:07:07 +0000 Subject: [issue4910] Remove uses of nb_long slot, and rename to nb_reserved. In-Reply-To: <1231619542.94.0.216272651809.issue4910@psf.upfronthosting.co.za> Message-ID: <1234372027.48.0.193706168062.issue4910@psf.upfronthosting.co.za> Mark Dickinson added the comment: PyNumber_Int deprecated in r69517, r69518. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 18:16:57 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 17:16:57 +0000 Subject: [issue1327971] HTTPResponse instance has no attribute 'fileno' Message-ID: <1234372617.93.0.189036782505.issue1327971@psf.upfronthosting.co.za> Daniel Diniz added the comment: Hmm, always run all the tests :) fileno is set in test_urllib2. New patches. Added file: http://bugs.python.org/file13032/httplib_fileno_2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 18:17:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 17:17:20 +0000 Subject: [issue1327971] HTTPResponse instance has no attribute 'fileno' Message-ID: <1234372640.47.0.339660691985.issue1327971@psf.upfronthosting.co.za> Changes by Daniel Diniz : Removed file: http://bugs.python.org/file13030/httplib_fileno.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 18:17:53 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 17:17:53 +0000 Subject: [issue1327971] HTTPResponse instance has no attribute 'fileno' Message-ID: <1234372673.97.0.841726654763.issue1327971@psf.upfronthosting.co.za> Changes by Daniel Diniz : Added file: http://bugs.python.org/file13033/urllib_fileno_2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 18:18:17 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 17:18:17 +0000 Subject: [issue1327971] HTTPResponse instance has no attribute 'fileno' Message-ID: <1234372697.48.0.431189694682.issue1327971@psf.upfronthosting.co.za> Changes by Daniel Diniz : Removed file: http://bugs.python.org/file13031/urllib_fileno.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 19:04:03 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Wed, 11 Feb 2009 18:04:03 +0000 Subject: [issue1294032] Distutils writes keywords comma-separated Message-ID: <1234375443.18.0.491273687097.issue1294032@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: akuchling -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 19:32:34 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 11 Feb 2009 18:32:34 +0000 Subject: [issue5200] unicode.normalize gives wrong result for some characters In-Reply-To: <200902110925.24953.peter.talken@telia.com> Message-ID: <499319BE.6070604@v.loewis.de> Martin v. L?wis added the comment: > Can you think of any solution to this conflict? I don't quite understand why you want to place ?, ?, ?, ? all along with E, yet ?,?,? after Z. Because that's what the Swedish alphabet says? Please understand that collation varies across languages. For example in German, we also have ?, but it does *not* come after Z. Instead, there are two ways to collate ? (telephone book vs. dictionary): 1. ? sorts exactly like A 2. ? sorts as if it was transcribed as Ae So there is no one true collation of ?, but you have to take into account what language rules you want to follow. If you want to implement Swedish rules, why then do you also want to support ?, ?, ?, ?? Do you have these letters in Swedish at all? If you want to use obscure collation rules, you might have to implement the collation algorithm yourself. For example, assign each letter a unique number (different from the Unicode ordinal), and then sort by these numbers. Take a look at ICU, which already includes collation algorithms for many locales. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 20:25:47 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Feb 2009 19:25:47 +0000 Subject: [issue2805] 2to3 doesn't correct divisions In-Reply-To: <1210366311.62.0.240931801365.issue2805@psf.upfronthosting.co.za> Message-ID: <1234380347.71.0.495846309376.issue2805@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I concur with Raymond. There isn't yet a "-3" warning for class division, though. I suppose the compiler could emit one when "/" is used without from __future__ import division. That's another issue, though. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 20:26:21 2009 From: report at bugs.python.org (Peter Landgren) Date: Wed, 11 Feb 2009 19:26:21 +0000 Subject: [issue5200] unicode.normalize gives wrong result for some characters In-Reply-To: <499319BE.6070604@v.loewis.de> Message-ID: <200902112027.43471.peter.talken@telia.com> Peter Landgren added the comment: The ?... comes from French surnames and our French developer wants to group all versions of E together. The ?... can be found in French surnames in Sweden as well as in Germany. The program, GRAMPS is a genealogy program used in about 20 languages, so there is no preferred language. I know. However, Swedish telephone books and dictionaries are sorted the same: A,B,C... X,Y,Z,?,?,?. True. I agree. GRAMPS runs in the locale of the user, but must be able to handle information coming from many other languages/countries. That's why it's hard to be universal. We can have them in names. See above. I think we have found a solution that can handle most cases. We treat surnames beginning with "???" special. I don't think that there are many surnames outside the Nordic countries that starts with any of these three letters. Vielen dank! /Peter Added file: http://bugs.python.org/file13034/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Wed Feb 11 20:32:43 2009 From: report at bugs.python.org (Guilherme Polo) Date: Wed, 11 Feb 2009 19:32:43 +0000 Subject: [issue5218] Check for tp_iter in ceval:ext_do_call before overriding exception message In-Reply-To: <1234380763.79.0.974439208897.issue5218@psf.upfronthosting.co.za> Message-ID: <1234380763.79.0.974439208897.issue5218@psf.upfronthosting.co.za> New submission from Guilherme Polo : Hi, I find it weird that given this sample code: def g(): yield iter(None) list(*g()) I get this traceback: Traceback (most recent call last): File "a1.py", line 3, in list(*g()) TypeError: type object argument after * must be a sequence, not generator At a minimum the exception message looks awkward to me. With the proposed patch, the new traceback would be: Traceback (most recent call last): File "a1.py", line 3, in list(*g()) File "a1.py", line 2, in g yield iter(None) TypeError: 'NoneType' object is not iterable ---------- files: check_tpiter_before_overriding_msg.diff keywords: patch messages: 81657 nosy: gpolo severity: normal status: open title: Check for tp_iter in ceval:ext_do_call before overriding exception message Added file: http://bugs.python.org/file13035/check_tpiter_before_overriding_msg.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 20:34:18 2009 From: report at bugs.python.org (Guilherme Polo) Date: Wed, 11 Feb 2009 19:34:18 +0000 Subject: [issue5218] Check for tp_iter in ceval:ext_do_call before overriding exception message In-Reply-To: <1234380763.79.0.974439208897.issue5218@psf.upfronthosting.co.za> Message-ID: <1234380858.11.0.155884275424.issue5218@psf.upfronthosting.co.za> Changes by Guilherme Polo : ---------- components: +Interpreter Core type: -> behavior versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 20:35:29 2009 From: report at bugs.python.org (Guilherme Polo) Date: Wed, 11 Feb 2009 19:35:29 +0000 Subject: [issue5218] Check for tp_iter in ceval:ext_do_call before overriding exception message In-Reply-To: <1234380763.79.0.974439208897.issue5218@psf.upfronthosting.co.za> Message-ID: <1234380929.32.0.701531292853.issue5218@psf.upfronthosting.co.za> Guilherme Polo added the comment: (Btw, the suggestion to check for tp_iter came from Antoine Pitrou. It seemed fine to me.) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 20:41:45 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 11 Feb 2009 19:41:45 +0000 Subject: [issue5218] Check for tp_iter in ceval:ext_do_call before overriding exception message In-Reply-To: <1234380763.79.0.974439208897.issue5218@psf.upfronthosting.co.za> Message-ID: <1234381305.38.0.100559023268.issue5218@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You must check tp_iter as well, not only Py_TPFLAGS_HAVE_ITER. Py_TPFLAGS_HAVE_ITER only tells you that the tp_iter field exists, not that it's non-NULL. (see the code for PyObject_GetIter() in Objects/abstract.c for an example) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 20:47:21 2009 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Feb 2009 19:47:21 +0000 Subject: [issue1159] os.getenv() not updated after external module uses C putenv() In-Reply-To: <1189668127.19.0.0258251668017.issue1159@psf.upfronthosting.co.za> Message-ID: <1234381641.92.0.0573399851046.issue1159@psf.upfronthosting.co.za> Jason R. Coombs added the comment: As a workaround, could you use ctypes to pull the environment back into the python context? For example: http://paste.turbogears.org/paste/34734 ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 20:54:26 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 11 Feb 2009 19:54:26 +0000 Subject: [issue5200] unicode.normalize gives wrong result for some characters In-Reply-To: <200902112027.43471.peter.talken@telia.com> Message-ID: <49932CEE.7050709@v.loewis.de> Martin v. L?wis added the comment: > The ?... comes from French surnames and our French developer wants to group all versions > of E together. The ?... can be found in French surnames in Sweden as well as in Germany. > The program, GRAMPS is a genealogy program used in about 20 languages, so there is no > preferred language. I think you'll find that you have to think much harder about collation, then. If you assume that the Unicode ordinal order will give right collation, it will be wrong many times, I predict. For example, it appears that Croatian puts D? as a single letter between D and ?. > I think we have found a solution that can handle most cases. > We treat surnames beginning with "???" special. I don't think that there are many surnames > outside the Nordic countries that starts with any of these three letters. It seems they are also common in Turkish (?ks?z, ?lc?m, ?nal, ..., taken from the Berlin phonebook), and Turkish puts ? after O. Hungarian also uses ? and ? (as well as ?, ?, ?, ?), but I don't know how common they are as first letters of surnames. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 20:58:20 2009 From: report at bugs.python.org (John DeLuca) Date: Wed, 11 Feb 2009 19:58:20 +0000 Subject: [issue5219] IDLE: slowness, pauses enter long strings In-Reply-To: <1234382300.54.0.847679485731.issue5219@psf.upfronthosting.co.za> Message-ID: <1234382300.54.0.847679485731.issue5219@psf.upfronthosting.co.za> New submission from John DeLuca : In Interpreted Mode, when enter long strings, such as ofile.write (" this is a long string...") or print ("this is a long string..."), the keyboard entry is delayed - sometimes for 20+ seconds. If one completes the string (typing blindly as not text is visible) and keys the closing ')', or one moves the entire shell window, the missing text is dropped on the entry line and one can continue typing. This occurs after about 25 characters of the string. ---------- components: IDLE messages: 81662 nosy: pyJohn severity: normal status: open title: IDLE: slowness, pauses enter long strings type: performance versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 21:18:14 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 20:18:14 +0000 Subject: [issue1327971] HTTPResponse instance has no attribute 'fileno' Message-ID: <1234383493.91.0.775573095406.issue1327971@psf.upfronthosting.co.za> Daniel Diniz added the comment: The urllib patch breaks test_pyclbr because test_pyclbr can't handle properties. I think the test is wrong here, hence the hack attached... otherwise, let's go with httplib. Added file: http://bugs.python.org/file13036/test_pyclbr_property.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 21:21:03 2009 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 11 Feb 2009 20:21:03 +0000 Subject: [issue2437] Distutils runtime_library_dirs broken on Windows In-Reply-To: <1206044595.46.0.100105317073.issue2437@psf.upfronthosting.co.za> Message-ID: <1234383663.81.0.790671870612.issue2437@psf.upfronthosting.co.za> Changes by Roumen Petrov : ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 21:24:17 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Feb 2009 20:24:17 +0000 Subject: [issue5215] change value of local variable in debug In-Reply-To: <1234338182.69.0.0258607971835.issue5215@psf.upfronthosting.co.za> Message-ID: <1234383857.61.0.64556786722.issue5215@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Could you describe the problem in more detail please? I've having trouble understanding you description. For example, you could you paste the pdb session you used and explain what you expected? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 21:26:41 2009 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 11 Feb 2009 20:26:41 +0000 Subject: [issue969718] BASECFLAGS are not passed to module build line Message-ID: <1234384001.27.0.775778702761.issue969718@psf.upfronthosting.co.za> Changes by Roumen Petrov : ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 21:34:16 2009 From: report at bugs.python.org (David Jones) Date: Wed, 11 Feb 2009 20:34:16 +0000 Subject: [issue5202] wave.py cannot write wave files into a shell pipeline In-Reply-To: <201829EA-2F63-4889-9F9E-97CD59A4CAEE@pobox.com> Message-ID: <508452C8-B3C8-4ECE-9AFC-B4FCD4AE91FC@pobox.com> David Jones added the comment: On 10 Feb 2009, at 21:15, David Jones wrote: > > David Jones added the comment: > > On 10 Feb 2009, at 16:57, Guilherme Polo wrote: > >> >> Guilherme Polo added the comment: >> >> Now, is there some problem if we remove the calls to the "tell" >> method >> in _write_header ? See patch attached (tests are very welcome too). > > Yes Ahem. Pardon me for answering you without reading your patch. I have now read your patch and it does more than just remove the calls to "tell". In fact it looks very fine. It makes wave.py more like sunau.py in that it "just knows" what the offsets into the header are. I think I like that (especially the way you use the struct format string to compute the second offset). It also removes that nagging question at the back of my mind: "why does wave.py use tell when it could simply just know the offsets, which are constant anyway?". And it works. How cool is that? I had changed my project to use sunau anyway, because that worked with pipes already. Tests, you say... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 21:36:11 2009 From: report at bugs.python.org (Joshua Bronson) Date: Wed, 11 Feb 2009 20:36:11 +0000 Subject: [issue5220] os.makedirs' mode argument has bad default value In-Reply-To: <1234384571.02.0.296749790343.issue5220@psf.upfronthosting.co.za> Message-ID: <1234384571.02.0.296749790343.issue5220@psf.upfronthosting.co.za> New submission from Joshua Bronson : os.makedirs' mode argument defaults to a hardcoded value of 511 (0777 in octal). This forces the caller to either pass in a different hardcoded value (commonly 0750), or to implement a workaround that calculates the expected mode based on the process owner's umask: umask, _ = subprocess.Popen(['sh', '-c', 'umask'], stdout=subprocess.PIPE).communicate() umask = int(umask, 8) mode = 0777 ^ umask os.makedirs(dir, mode) Preferred behavior would be to have the mode default to the value which takes the umask into account rather than the hardcoded value 0777, so that directories would be created with the same permissions as e.g. files created via open(..). N.B. I'm guessing the above workaround won't work on Windows (please excuse my poor Windows knowledge). All the more reason to have os.makedirs calculate the mode properly if none is given. ---------- messages: 81666 nosy: jab severity: normal status: open title: os.makedirs' mode argument has bad default value versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 21:37:31 2009 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 11 Feb 2009 20:37:31 +0000 Subject: [issue5216] distutils.tests.test_build_ext.BuildExtTestCase fails when srcdir != builddir In-Reply-To: <1234363326.79.0.666992241975.issue5216@psf.upfronthosting.co.za> Message-ID: <1234384651.25.0.237860813259.issue5216@psf.upfronthosting.co.za> Roumen Petrov added the comment: I guess fixed in trunk - see issue4070 and issue4151 . ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 21:48:10 2009 From: report at bugs.python.org (David W. Lambert) Date: Wed, 11 Feb 2009 20:48:10 +0000 Subject: [issue5221] help related topic doesn't exist In-Reply-To: <1234385289.6.0.0960868675321.issue5221@psf.upfronthosting.co.za> Message-ID: <1234385289.6.0.0960868675321.issue5221@psf.upfronthosting.co.za> New submission from David W. Lambert : help function is not current, then again, neither is my python3. Possibly sequencemethods[12] are eradicated. $ p3 Python 3.0rc1+ (py3k, Nov 5 2008, 14:44:46) [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> help('SEQUENCEMETHODS') ... Related help topics: SEQUENCES, SEQUENCEMETHODS2, SPECIALMETHODS >>> help('SEQUENCEMETHODS1') no Python documentation found for 'SEQUENCEMETHODS1' >>> help('SEQUENCEMETHODS2') no Python documentation found for 'SEQUENCEMETHODS2' ---------- components: Interpreter Core messages: 81668 nosy: LambertDW severity: normal status: open title: help related topic doesn't exist type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 21:50:56 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 11 Feb 2009 20:50:56 +0000 Subject: [issue5220] os.makedirs' mode argument has bad default value In-Reply-To: <1234384571.02.0.296749790343.issue5220@psf.upfronthosting.co.za> Message-ID: <1234385456.81.0.354445914029.issue5220@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't understand the problem. The directory creation *does* take the umask into account - that's the whole point of the umask! The directory being created has the bits (mode & ~umask & 0777) set - because of the semantics of mkdir(2), not because of Python's doing. Closing the report as invalid. ---------- nosy: +loewis resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 21:59:40 2009 From: report at bugs.python.org (Adam Olsen) Date: Wed, 11 Feb 2009 20:59:40 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234385980.02.0.08263489117.issue5186@psf.upfronthosting.co.za> Adam Olsen added the comment: Antoine, I only meant list() and dict() to be an example of objects with a larger allocation pattern. We get a substantial benefit from the sequentially increasing memory addresses, and I wanted to make sure that benefit wasn't lost on larger allocations than object(). Mark, I concede the point about rotating; I believe the cost on x86 is the same regardless. Why are you still only rotating 3 bits? My results were better with 4 bits, and that should be the sweet spot for the typical use cases. Also, would the use of size_t make this code simpler? It should be the size of the pointer even on windows. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 22:03:15 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 11 Feb 2009 21:03:15 +0000 Subject: [issue1303434] Please include pdb with windows distribution Message-ID: <1234386195.53.0.700944201025.issue1303434@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Hi Martin, wouldn't just uploading the pythonXX.pdb to the release page be enough. The distributed DLL already points to the source location on your system :-) E.g. for Python 2.5, this was c:\loewis\25\python\PCbuild\python25.pdb Or are you thinking of having a separate MSI installer with all the .pdb files included ? ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 22:03:32 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 11 Feb 2009 21:03:32 +0000 Subject: [issue1303434] Please include pdb with windows distribution Message-ID: <1234386212.66.0.189032589479.issue1303434@psf.upfronthosting.co.za> Changes by Marc-Andre Lemburg : ---------- versions: +Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 22:18:50 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Feb 2009 21:18:50 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234387130.57.0.36710005944.issue5186@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'm fine with rotating 4 bits instead of 3, especially if the timings look good on 32-bit as well as 64-bit. We should really benchmark dict lookups (and set membership tests) as well as dict creation. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 22:20:03 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 11 Feb 2009 21:20:03 +0000 Subject: [issue1303434] Please include pdb with windows distribution In-Reply-To: <1234386195.53.0.700944201025.issue1303434@psf.upfronthosting.co.za> Message-ID: <49934101.2020005@v.loewis.de> Martin v. L?wis added the comment: > Hi Martin, wouldn't just uploading the pythonXX.pdb to the release page > be enough. It's not clear to me what is being requested: just that single PDB file, or also the PDB files for all of the extension modules? Also, shouldn't the file be compressed somehow? I also dislike the clutter this would add to the release page, which already has a confusing number of files available for download. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 22:27:05 2009 From: report at bugs.python.org (Joshua Bronson) Date: Wed, 11 Feb 2009 21:27:05 +0000 Subject: [issue5220] os.makedirs' mode argument has bad default value In-Reply-To: <1234384571.02.0.296749790343.issue5220@psf.upfronthosting.co.za> Message-ID: <1234387624.82.0.602915301048.issue5220@psf.upfronthosting.co.za> Joshua Bronson added the comment: Ah, I was misunderstanding the behavior of mkdir, thank you for the explanation. My misunderstanding stemmed from recently coming across two widely-used packages which both pass mode=0750 to os.makedirs. I have no idea why they would be doing this (as it effectively throws away part of the umask), unless they too are misunderstanding the mode parameter. My suspicion is that the mode parameter is widely misunderstood to mean the desired permissions of the created directory. I have filed tickets in the packages in which I came across this to make sure they're doing what they intend. Could the __doc__ for os.mkdir and os.makedirs be expanded to make this clearer? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 22:34:34 2009 From: report at bugs.python.org (Guilherme Polo) Date: Wed, 11 Feb 2009 21:34:34 +0000 Subject: [issue5218] Check for tp_iter in ceval:ext_do_call before overriding exception message In-Reply-To: <1234380763.79.0.974439208897.issue5218@psf.upfronthosting.co.za> Message-ID: <1234388074.32.0.97484086643.issue5218@psf.upfronthosting.co.za> Guilherme Polo added the comment: Thanks for taking a look, my bad for taking so long to reply. I'm adding a new patch now. This one, besides the fix needed mentioned above, disregards tp_iter from old class instances (since they are always available and tell us nothing). Added file: http://bugs.python.org/file13037/check_before_overriding.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 22:36:54 2009 From: report at bugs.python.org (Guilherme Polo) Date: Wed, 11 Feb 2009 21:36:54 +0000 Subject: [issue5202] wave.py cannot write wave files into a shell pipeline In-Reply-To: <1234266301.49.0.830035453307.issue5202@psf.upfronthosting.co.za> Message-ID: <1234388214.1.0.13570648129.issue5202@psf.upfronthosting.co.za> Guilherme Polo added the comment: Nice. I said tests in hope wave gets more tests, since right one there is a single one. I will see if I can produce something. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 22:47:09 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 11 Feb 2009 21:47:09 +0000 Subject: [issue5220] os.makedirs' mode argument has bad default value In-Reply-To: <1234387624.82.0.602915301048.issue5220@psf.upfronthosting.co.za> Message-ID: <49934759.9020502@v.loewis.de> Martin v. L?wis added the comment: > My misunderstanding stemmed from recently coming across two widely-used > packages which both pass mode=0750 to os.makedirs. I have no idea why > they would be doing this (as it effectively throws away part of the > umask), unless they too are misunderstanding the mode parameter. You use such a mode if you want the resulting directory definitely not world-readable, and definitely not group-writable, despite what umask the user running the program may have set. A common case is installation programs, where the installer wants to create directories independent of the umask root may have set when running the installer. > My > suspicion is that the mode parameter is widely misunderstood to mean the > desired permissions of the created directory. I have filed tickets in > the packages in which I came across this to make sure they're doing what > they intend. My suspicion is that people setting explicit file permissions typically know what they are doing, and that you will find that your tickets get closed as invalid, explaining to you that this mode usage is fully intentional. > Could the __doc__ for os.mkdir and os.makedirs be expanded to make this > clearer? I'm skeptical that this should be necessary. Whoever explained umask to you should have mentioned how it really works (i.e. that it is built into and considered by the operating system every time a file or directory is created). By the same pattern, the doc string of mkdir should also explain what relative file names are and how the current directory affects their interpretation. IMO, the doc string shouldn't teach fundamental system principles. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 23:04:18 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Feb 2009 22:04:18 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234389858.14.0.0634193022618.issue5186@psf.upfronthosting.co.za> Raymond Hettinger added the comment: At four bits, you may be throwing away information and I don't think that's cool. Even if some selected timings are better with more bits shifted, all you're really showing is that there is more randomness in the upper bits than the lower ones. But that doesn't mean than the lower one contribute nothing at all. I'm *much* more comfortable with a byte-swap, rotation, or xoring-in upper bits than with shifts that potentially destroy entropy. Otherwise, your taxing apps that build giant sets/dicts and need all distinguishing bits to avoid collision pile-ups. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 23:22:40 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 11 Feb 2009 22:22:40 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234389858.14.0.0634193022618.issue5186@psf.upfronthosting.co.za> Message-ID: <1234390997.8256.8.camel@fsol> Antoine Pitrou added the comment: > I'm *much* more comfortable with a byte-swap, rotation, or xoring-in > upper bits than with shifts that potentially destroy entropy. > Otherwise, your taxing apps that build giant sets/dicts and need all > distinguishing bits to avoid collision pile-ups. Would (id() >> 4) + (id() & 15) be ok? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 23:26:28 2009 From: report at bugs.python.org (Joshua Bronson) Date: Wed, 11 Feb 2009 22:26:28 +0000 Subject: [issue5220] os.makedirs' mode argument has bad default value In-Reply-To: <1234384571.02.0.296749790343.issue5220@psf.upfronthosting.co.za> Message-ID: <1234391188.16.0.481985154732.issue5220@psf.upfronthosting.co.za> Joshua Bronson added the comment: > My suspicion is that people setting explicit file permissions > typically know what they are doing, and that you will find that > your tickets get closed as invalid, explaining to you that this > mode usage is fully intentional. For what it's worth, I asked Mike Bayer (author of Beaker and Mako, the packages in question) what the intention was, and the 0750 seems to have been an error: Apparently HTML::Mason (what Myghty was based on) may have originally used 0750 but has since changed it to 0775 (search for "0775" in http://svn.urth.org/filedetails.php? repname=Mason&path=%2Ftrunk%2Flib%2FHTML%2FMason%2FInterp.pm&rev=0&sc=0) . The 0750 propagated from Myghty into Mako and Beaker, but has no apparent reason to be there. For what else it's worth, I've run this by a few other programmers I consider quite smart and experienced (including Ian Bicking), and none of them realized the meaning of the mode parameter either. (If they had I never would have filed this ticket, as I checked with them first!) I agree that knowledge of relative paths should be assumed, but I'm convinced that the mode behavior is widely misunderstood enough to warrant at least one-line "gotcha" in the docstring. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 23:29:03 2009 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 11 Feb 2009 22:29:03 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234391343.66.0.594077190094.issue5186@psf.upfronthosting.co.za> Mark Dickinson added the comment: > At four bits, you may be throwing away information and I don't think > that's cool. The current patch *does* do a rotation: it doesn't throw away any information. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 23:52:12 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 11 Feb 2009 22:52:12 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234392732.29.0.359313303845.issue5186@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is an updated patch. It uses a 4-bit shift and an addition. We should avoid the use of logical or, because it makes the outputs non-uniformly distributed ('1' bits are more likely). Added file: http://bugs.python.org/file13038/pointer_hash3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 23:53:51 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 11 Feb 2009 22:53:51 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234392831.06.0.167328042754.issue5186@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is an updated benchmark script, for both object() and an user-defined class, and adding dict lookup, set lookup and set difference. Set difference is massively faster: up to 60% faster. Added file: http://bugs.python.org/file13039/time_object_hash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 23:53:59 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 11 Feb 2009 22:53:59 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234392839.77.0.543032283236.issue5186@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file12981/time_object_hash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 23:54:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 22:54:03 +0000 Subject: [issue1381476] csv.reader endless loop Message-ID: <1234392843.76.0.866894160683.issue1381476@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed as working on trunk and py3k. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 00:00:27 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Feb 2009 23:00:27 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234393227.58.0.930806092831.issue5186@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Guys, let's be careful. Make sure that efforts to randomize lower bits don't destroy information. Something like x |= x>>8 is reversible and fast. Other fun looking transformations are not: >>> len(set((x >> 4) + (x & 15) for x in range(10**6))) 62515 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 00:02:13 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 11 Feb 2009 23:02:13 +0000 Subject: [issue1303434] Please include pdb with windows distribution In-Reply-To: <49934101.2020005@v.loewis.de> Message-ID: <499358F1.6050904@egenix.com> Marc-Andre Lemburg added the comment: On 2009-02-11 22:20, Martin v. L?wis wrote: > Martin v. L?wis added the comment: > >> Hi Martin, wouldn't just uploading the pythonXX.pdb to the release page >> be enough. > > It's not clear to me what is being requested: just that single PDB file, > or also the PDB files for all of the extension modules? Also, shouldn't > the file be compressed somehow? > > I also dislike the clutter this would add to the release page, which > already has a confusing number of files available for download. I see these possibilities: * add just the Python DLL PDF file to the page * add a ZIP file with just the PDB files for all components * add a second MSI file which includes and installs the PDB files alongside the .dll/.pyd/.exe files * add the PDB files to the standard MSI files We could put such files into a separate section on the release page. Note that the PDB files are just around 1.6MB in compressed form (probably less if integrated into the MSI file), so the last option looks like the easiest solution. FWIW: I don't think that the current release page layout looks cluttered: http://www.python.org/download/releases/2.6.1/ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 00:04:40 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 23:04:40 +0000 Subject: [issue1008086] patch for 767150 Message-ID: <1234393480.35.0.935157160609.issue1008086@psf.upfronthosting.co.za> Daniel Diniz added the comment: Test from issue 767150: """ socket.inet_aton() returns an 8 byte string when built on Linux/IA64. This should be 4 bytes on all architectures. Example: >>> import socket >>> socket.inet_aton('192.168.2.1') '\xc0\xa8\x02\x01\x00\x00\x00\x00' """ The bug was confirmed by a third-party in 2006: http://mail.python.org/pipermail/python-list/2006-August/400655.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 00:05:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 23:05:28 +0000 Subject: [issue1103926] email.base64MIME.header_encode vs RFC 1522 Message-ID: <1234393528.69.0.781514211807.issue1103926@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 00:16:21 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Feb 2009 23:16:21 +0000 Subject: [issue1008086] patch for 767150 Message-ID: <1234394181.6.0.231767452956.issue1008086@psf.upfronthosting.co.za> Gregory P. Smith added the comment: fixing now. ---------- assignee: twouters -> gregory.p.smith keywords: +easy nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 00:27:10 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 11 Feb 2009 23:27:10 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234394830.0.0.719353555692.issue5186@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, updated patch: - uses a 4-bit rotate (not shift) - avoids comparing an unsigned long to -1 - tries to streamline the win64 special path (but I can't test) Added file: http://bugs.python.org/file13040/pointer_hash4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 00:33:43 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Feb 2009 23:33:43 +0000 Subject: [issue767150] socket.inet_aton on 64bit platform Message-ID: <1234395223.23.0.256878104603.issue767150@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Sad that this was closed as wontfix years ago. anyways I am fixing this. see #1008086. ---------- keywords: +64bit nosy: +gregory.p.smith superseder: -> patch for 767150 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 00:47:30 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Feb 2009 23:47:30 +0000 Subject: [issue1008086] socket.inet_aton returns 8 bytes on LP64 platforms Message-ID: <1234396050.26.0.610004975222.issue1008086@psf.upfronthosting.co.za> Gregory P. Smith added the comment: fixed in trunk r69519. needs backporting to release26-maint and release30-maint. leaving open until that happens. ---------- keywords: +64bit -patch title: patch for 767150 -> socket.inet_aton returns 8 bytes on LP64 platforms type: -> behavior versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 00:57:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Wed, 11 Feb 2009 23:57:49 +0000 Subject: [issue1046092] HTMLParser fix to accept mailformed tag attributes Message-ID: <1234396669.93.0.0429162689504.issue1046092@psf.upfronthosting.co.za> Daniel Diniz added the comment: Heh, the patch applies cleanly to trunk more than four years later and tests pass fine. We'll surely need better tests if the behavior change is considered an improvement. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 01:15:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 00:15:03 +0000 Subject: [issue755660] allow HTMLParser to continue after a parse error Message-ID: <1234397703.39.0.0232853220881.issue755660@psf.upfronthosting.co.za> Daniel Diniz added the comment: Tests still pass with updated patch, but new tests (and docs!) for this feature are needed if Titus' positive review stands. ---------- nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7 -Python 2.3 Added file: http://bugs.python.org/file13041/htmlparser_error.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 01:15:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 00:15:27 +0000 Subject: [issue755660] allow HTMLParser to continue after a parse error Message-ID: <1234397727.71.0.126588310998.issue755660@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 01:36:54 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 00:36:54 +0000 Subject: [issue775321] plistlib error handling Message-ID: <1234399014.82.0.466094553666.issue775321@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +plistlib error handling stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 01:40:49 2009 From: report at bugs.python.org (Blair) Date: Thu, 12 Feb 2009 00:40:49 +0000 Subject: [issue5211] Fix complex type to avoid coercion in 2.7. In-Reply-To: <1234307963.56.0.00813246872741.issue5211@psf.upfronthosting.co.za> Message-ID: <1234399249.52.0.75704341045.issue5211@psf.upfronthosting.co.za> Blair added the comment: I am happy to collaborate in finding a solution, but I do not have enough knowledge or skill to work with the code alone. Simply documenting it does not remove the frustration that a few people will enounter. The key point being that you can subclass the other numeric types, but not complex. Worse, you may think that you have succeeded in subclassing complex too, because it is only when the __ropn__ binary operators are used that the type reverts to the base class type. Would you want to subclass a numeric type? I agree, it is a bit obsure, but I did a search on this before making the post and there have been others who found the problem too. In my case, I think that the motivation may seem a bit obscure. I had developed some numerical-like types (from scratch -- no subclassing) and I wanted to be able to write functions taking as possible arguments these types and Python numerical types indifferently. I realised that I could not achieve exactly what I wanted, however, by subclassing float, int, etc I could add a few methods that would allow my generic functions to work with either my types or the subclassed Python types. At the same time, the subclassed numerical types could still be used as numerical quantities (float, int,...). It seemed like a pretty elegant solution. If that explanation does not make sense, then I suppose other simpler motivations could be, eg, to subclass float so that only positive values are acceptable; to subclass complex so that only values lying within the unit circle are acceptable, etc. That is, one might like to define a type that can only take on physically meaningful values (mass cannot be negative, a complex reflection coeffcieint cannot have a magnitude greater than unity, ..) So, my feeling is that this is worth fixing because the work done on float, int etc, is clearly useful and it appears (to me) that the complex case is an oversight. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 01:42:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 00:42:42 +0000 Subject: [issue816059] popen2 work, fixes bugs 768649 and 761888 Message-ID: <1234399362.19.0.26980339783.issue816059@psf.upfronthosting.co.za> Daniel Diniz added the comment: The test code seems to run fine in a debug build of trunk, but the linked issues requires a more complex context. ---------- dependencies: +popen2.Popen3 and popen2.Popen4 leaks filedescriptors stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 01:43:57 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 00:43:57 +0000 Subject: [issue1153027] http_error_302() crashes with 'HTTP/1.1 400 Bad Request Message-ID: <1234399437.33.0.395840072192.issue1153027@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 01:45:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 00:45:04 +0000 Subject: [issue1153027] http_error_302() crashes with 'HTTP/1.1 400 Bad Request Message-ID: <1234399504.93.0.810557107424.issue1153027@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 01:46:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 00:46:24 +0000 Subject: [issue918368] urllib doesn't correct server returned urls Message-ID: <1234399584.07.0.00109565947818.issue918368@psf.upfronthosting.co.za> Daniel Diniz added the comment: Any idea about how to test this one reliably? ---------- stage: -> test needed type: -> behavior versions: +Python 2.6, Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 01:51:59 2009 From: report at bugs.python.org (John DeLuca) Date: Thu, 12 Feb 2009 00:51:59 +0000 Subject: [issue5219] IDLE: slowness, pauses enter long strings In-Reply-To: <1234382300.54.0.847679485731.issue5219@psf.upfronthosting.co.za> Message-ID: <1234399919.41.0.060520374442.issue5219@psf.upfronthosting.co.za> John DeLuca added the comment: (pyJohn)... additional information since this is a performance issue: Lenovo s10; Win XP; 1GB; Intel Atom 1.66 Mhz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 01:58:32 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 00:58:32 +0000 Subject: [issue1562822] decimal module borks thread Message-ID: <1234400312.78.0.572865759117.issue1562822@psf.upfronthosting.co.za> Daniel Diniz added the comment: Here's the output of trunk (debug) for OP's test: ./python ../thread.py Exiting test. Exception KeyError: KeyError(-1210869568,) in ignored [31071 refs] ---------- nosy: +ajaksu2 type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 02:02:13 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 01:02:13 +0000 Subject: [issue1548371] filterwarnings('error') has no effect Message-ID: <1234400533.57.0.689384859454.issue1548371@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed in trunk. ---------- nosy: +ajaksu2 stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 02:07:11 2009 From: report at bugs.python.org (Adam Olsen) Date: Thu, 12 Feb 2009 01:07:11 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234400831.82.0.640693928521.issue5186@psf.upfronthosting.co.za> Adam Olsen added the comment: > At four bits, you may be throwing away information and I don't think > that's cool. Even if some selected timings are better with more bits > shifted, all you're really showing is that there is more randomness in > the upper bits than the lower ones. But that doesn't mean than the > lower one contribute nothing at all. On the contrary, the expected collision rate for a half-full dictionary is about 21%, whereas I'm getting less than 5%. I'm taking advantage of the sequentiality of addresses, just as int and str hashes do for their values. However, you're right that it's only one use case. Although creating a burst of objects for a throw-away set may itself be common, it's typically with int or str, and doing it with custom objects is presumably fairly rare; certainly not a good microbenchmark for the rest of the interpreter. Creating a list of 100000 objects, then shuffling and picking a few increases my collision rate back up to 21%. That should more accurately reflect a long-running program using custom objects as keys in a dict. That said, I still prefer the simplicity of a rotate. Adding an arbitrary set of OR, XOR, or add makes me uneasy; I know enough to do them wrong (reduce entropy), but not enough to do them right. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 02:17:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 01:17:01 +0000 Subject: [issue1534764] sys.path gets munged with certain directory structures Message-ID: <1234401421.45.0.0788821795593.issue1534764@psf.upfronthosting.co.za> Daniel Diniz added the comment: Reproduced on trunk, needed unsetting PYTHONPATH. A test case with os.mkdir, chdir, etc. would be great. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 02:22:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 01:22:10 +0000 Subject: [issue1074015] current directory in sys.path handles symlinks badly Message-ID: <1234401730.93.0.452841021118.issue1074015@psf.upfronthosting.co.za> Daniel Diniz added the comment: Still happens in trunk. ---------- nosy: +ajaksu2 stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 02:38:13 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 01:38:13 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1234402693.17.0.46805790042.issue1161031@psf.upfronthosting.co.za> Daniel Diniz added the comment: Josiah: that'd be around rev36408, as 1.53 corresponds to rev36033 (from the log and issue 957240) ---------- nosy: +ajaksu2 stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 03:07:31 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 02:07:31 +0000 Subject: [issue5208] urllib2.build_opener([handler, ...]) incorrect signature in docs In-Reply-To: <1234286185.85.0.555213161426.issue5208@psf.upfronthosting.co.za> Message-ID: <1234404451.98.0.550837907028.issue5208@psf.upfronthosting.co.za> Daniel Diniz added the comment: I believe those square brackets mean "supplying handlers is optional", but even so it'd be very ambiguous. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 03:08:47 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Feb 2009 02:08:47 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234404527.5.0.805516224345.issue5186@psf.upfronthosting.co.za> Raymond Hettinger added the comment: [Antoine] > Ok, updated patch: > - uses a 4-bit rotate (not shift) > - avoids comparing an unsigned long to -1 > - tries to streamline the win64 special path (but I can't test) pointer_hash4.patch looks fine to me. Still, I think it's worth considering the simpler and faster: x |= x>>4. The latter doesn't require any special-casing for various pointer sizes. It just works. [Adam] > Adding an arbitrary set of OR, XOR, or add makes me uneasy; > I know enough to do them wrong (reduce entropy), but not > enough to do them right. It's easy enough to prove (just show that the function is reversible) and easy enough to test: assert len(set(ids)) == len(set(map(f, set(ids)))) # for any large group of ids _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 03:14:25 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 02:14:25 +0000 Subject: [issue1661108] base64.urlsafe_b64encode() shouldn't use the = character Message-ID: <1234404865.72.0.882176761022.issue1661108@psf.upfronthosting.co.za> Daniel Diniz added the comment: Not following the spec doesn't seem reasonable. Adding a caveat about how we follow the spec doesn't make much sense (I started to write one and dropped it at "The resulting string" :D). ---------- nosy: +ajaksu2 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 03:28:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 02:28:47 +0000 Subject: [issue1777134] minidom pretty xml output improvement Message-ID: <1234405727.55.0.0558530093161.issue1777134@psf.upfronthosting.co.za> Daniel Diniz added the comment: @Roy: we can try :) Patch updated, tests pass. However, keeping the default output and adding an option to prettyprint should keep lots of current users sane, while those wanting prettier output could have it. ---------- keywords: +easy nosy: +ajaksu2 stage: -> patch review type: -> feature request versions: +Python 2.6, Python 2.7 Added file: http://bugs.python.org/file13042/minidom_output_improvement_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 03:32:28 2009 From: report at bugs.python.org (Roy Wood) Date: Thu, 12 Feb 2009 02:32:28 +0000 Subject: [issue1777134] minidom pretty xml output improvement In-Reply-To: <1234405727.55.0.0558530093161.issue1777134@psf.upfronthosting.co.za> Message-ID: Roy Wood added the comment: Thanks! :-) On Wed, Feb 11, 2009 at 9:28 PM, Daniel Diniz wrote: > > Daniel Diniz added the comment: > > @Roy: we can try :) > > Patch updated, tests pass. However, keeping the default output and > adding an option to prettyprint should keep lots of current users sane, > while those wanting prettier output could have it. > > ---------- > keywords: +easy > nosy: +ajaksu2 > stage: -> patch review > type: -> feature request > versions: +Python 2.6, Python 2.7 > Added file: > http://bugs.python.org/file13042/minidom_output_improvement_v3.patch > > _______________________________________ > Python tracker > > _______________________________________ > Added file: http://bugs.python.org/file13043/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Thu Feb 12 03:37:16 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 02:37:16 +0000 Subject: [issue3991] urllib.request.urlopen does not handle non-ASCII characters In-Reply-To: <1222627636.82.0.587488225038.issue3991@psf.upfronthosting.co.za> Message-ID: <1234406236.06.0.0407142293209.issue3991@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) keywords: +easy stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 03:41:00 2009 From: report at bugs.python.org (David W. Lambert) Date: Thu, 12 Feb 2009 02:41:00 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234406460.42.0.983818965703.issue5186@psf.upfronthosting.co.za> David W. Lambert added the comment: "x |= x>>4" Are you (Ray) sure you didn't mean "x ^= x>>4" ? ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 03:56:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 02:56:50 +0000 Subject: [issue776100] new function 'islastline' in fileinput Message-ID: <1234407410.02.0.637225924923.issue776100@psf.upfronthosting.co.za> Daniel Diniz added the comment: Issue 968063 has better patch, use case and discussion. ---------- nosy: +ajaksu2 resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Add fileinput.islastline() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 03:58:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 02:58:06 +0000 Subject: [issue968063] Add fileinput.islastline() Message-ID: <1234407486.38.0.094248979399.issue968063@psf.upfronthosting.co.za> Daniel Diniz added the comment: Issue issue 776100 closed as duplicated. ---------- nosy: +ajaksu2 priority: normal -> low versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 04:01:19 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 03:01:19 +0000 Subject: [issue755670] improve HTMLParser attribute processing regexps Message-ID: <1234407679.74.0.601909856309.issue755670@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +HTMLParser attribute parsing bug, allow HTMLParser to continue after a parse error stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 04:02:18 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 03:02:18 +0000 Subject: [issue749722] isinstance and weakref proxies. Message-ID: <1234407738.82.0.740882773661.issue749722@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 04:10:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 03:10:12 +0000 Subject: [issue747320] rfc2822 formatdate functionality duplication Message-ID: <1234408212.99.0.0020444003258.issue747320@psf.upfronthosting.co.za> Daniel Diniz added the comment: Still present in source, but doesn't seem too bad. ---------- nosy: +ajaksu2 versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 04:14:22 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 03:14:22 +0000 Subject: [issue740495] API enhancement: poplib.MailReader() Message-ID: <1234408462.42.0.116431337485.issue740495@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 04:16:54 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 03:16:54 +0000 Subject: [issue730467] Not detecting AIX_GENUINE_CPLUSPLUS Message-ID: <1234408614.72.0.667622016881.issue730467@psf.upfronthosting.co.za> Daniel Diniz added the comment: Check still present in mentioned form in configure.in ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 04:19:59 2009 From: report at bugs.python.org (Adam Olsen) Date: Thu, 12 Feb 2009 03:19:59 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234408799.19.0.711064837654.issue5186@psf.upfronthosting.co.za> Adam Olsen added the comment: Testing with a large set of ids is a good demonstration, but not proof. Forming a set of *all* possible values within a certain range is proof. However, XOR does work (OR definitely does not) ? it's a 1-to-1 transformation (reversible as you say.) Additionally, it still gives the unnaturally low collision rate when using sequential addresses, so there's no objection there. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 04:20:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 03:20:08 +0000 Subject: [issue727732] getpath.c-generated prefix wrong for Tru64 scripts Message-ID: <1234408808.77.0.595667481312.issue727732@psf.upfronthosting.co.za> Daniel Diniz added the comment: We'd need confirmation, preferably with assistance from a Tru64 guru. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 04:21:22 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 03:21:22 +0000 Subject: [issue724459] Add documentation about line endings in email messages. Message-ID: <1234408882.18.0.729636162282.issue724459@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> needs patch versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 04:23:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 03:23:12 +0000 Subject: [issue700921] Wide-character curses Message-ID: <1234408992.64.0.976311084748.issue700921@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 04:25:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 03:25:02 +0000 Subject: [issue683938] HTMLParser attribute parsing bug Message-ID: <1234409102.97.0.0135209067114.issue683938@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 04:28:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 03:28:27 +0000 Subject: [issue678250] test_mmap failling on AIX Message-ID: <1234409307.47.0.151673632065.issue678250@psf.upfronthosting.co.za> Daniel Diniz added the comment: Is this concern still valid? ---------- components: +Tests nosy: +ajaksu2 type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 04:34:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 03:34:02 +0000 Subject: [issue660095] GNU readline version confusion Message-ID: <1234409642.7.0.275548726218.issue660095@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 04:42:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 03:42:04 +0000 Subject: [issue637094] print to unicode stream should __unicode Message-ID: <1234410124.42.0.119713021796.issue637094@psf.upfronthosting.co.za> Daniel Diniz added the comment: Not sure it's still important after 3.0 release. Confirmed in trunk: import codecs class X: def __unicode__(self): print 'unicode' return u'unicode' def __str__(self): print 'str' return 'str' x=X() f = codecs.getwriter('utf8')(open("/tmp/out","w")) print >> f, x # 'str' ---------- nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 04:43:32 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Feb 2009 03:43:32 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234410212.3.0.900525879846.issue5186@psf.upfronthosting.co.za> Raymond Hettinger added the comment: David, yes, I did mean x ^= x>>4; How embarrassing. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 05:04:10 2009 From: report at bugs.python.org (Don Rozenberg) Date: Thu, 12 Feb 2009 04:04:10 +0000 Subject: [issue5222] Please include AutoScroll and create_container in pyttk and Tkinter support In-Reply-To: <1234411450.15.0.433002333862.issue5222@psf.upfronthosting.co.za> Message-ID: <1234411450.15.0.433002333862.issue5222@psf.upfronthosting.co.za> New submission from Don Rozenberg : I have just released PAGE, a Python GUI generator utilizing tk and ttk widgets. It requires the Pyttk extension to Tkinter to support the ttk widgets. It would be great if Pyttk were included in the Python library if not into Tkinter. I also suggest that Pyttk be augmented to include Guilherme Polo's functions AutoScroll and create_container as well as ScrolledText and ScrolledTreeview. See Pyttk-samples.tar.gz. ---------- components: Tkinter messages: 81719 nosy: rozen severity: normal status: open title: Please include AutoScroll and create_container in pyttk and Tkinter support versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 05:14:42 2009 From: report at bugs.python.org (Mike Coleman) Date: Thu, 12 Feb 2009 04:14:42 +0000 Subject: [issue727732] getpath.c-generated prefix wrong for Tru64 scripts Message-ID: <1234412082.76.0.728599651248.issue727732@psf.upfronthosting.co.za> Mike Coleman added the comment: I'll go down to the cemetery and see if I can dig one up. :-) All of our Tru64 machines have been powered-down for over three years now, so as far as I'm concerned you can mark this one as no longer relevant. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 05:28:35 2009 From: report at bugs.python.org (lplatypus) Date: Thu, 12 Feb 2009 04:28:35 +0000 Subject: [issue5223] infinite recursion in PyErr_WriteUnraisable In-Reply-To: <1234412915.77.0.527314714811.issue5223@psf.upfronthosting.co.za> Message-ID: <1234412915.77.0.527314714811.issue5223@psf.upfronthosting.co.za> New submission from lplatypus : Here is an example of pure Python code which can cause the interpreter to crash. I can reproduce the problem in 2.6.0 and 2.6.1 but not in 2.5.2. The __getattr__ function in this example is interesting in that it involves infinite recursion, but then the RuntimeError("maximum recursion depth exceeded") actually causes it to behave correctly. This is due to the behaviour of hasattr which suppresses any exception caught when checking for attributes. Added to the mix we have sys.stderr replaced by an instance with a write method. The key ingredient here is that getattr(sys.stderr, "write") invokes Python code. Near the interpreter's recursion limit this python code can fail. This causes infinite recursion in C. Here is a snippet of the call stack from gdb showing the recursion cycle (using 2.6.0 source code): #9 0x00000000004a442c in PyErr_WriteUnraisable (obj=0x64ae40) at Python/errors.c:606 #10 0x00000000004a48f5 in PyErr_GivenExceptionMatches (err=0x64ae40, exc=0x64ae40) at Python/errors.c:115 #11 0x0000000000466056 in slot_tp_getattr_hook (self=0x70a910, name=0x2b4a94d47e70) at Objects/typeobject.c:5426 #12 0x0000000000449f4d in PyObject_GetAttrString (v=0x70a910, name=0x7fff155e2fe0
) at Objects/object.c:1176 #13 0x000000000042e316 in PyFile_WriteObject (v=0xd02d88, f=0x70a910, flags=1) at Objects/fileobject.c:2362 #14 0x000000000042e5c5 in PyFile_WriteString (s=0x51704a "Exception ", f=0x70a910) at Objects/fileobject.c:2422 #15 0x00000000004a442c in PyErr_WriteUnraisable (obj=0x64ae40) at Python/errors.c:606 ---------- components: Interpreter Core files: recursebug.py messages: 81721 nosy: ldeller severity: normal status: open title: infinite recursion in PyErr_WriteUnraisable type: crash versions: Python 2.6 Added file: http://bugs.python.org/file13044/recursebug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 06:03:41 2009 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 12 Feb 2009 05:03:41 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1234415021.95.0.2916320635.issue1161031@psf.upfronthosting.co.za> Josiah Carlson added the comment: Considering that we're looking at 2.7 and 3.1, I think that (paraphrased) "logging fallout from changes to 2.4" are a bit out-of- date. People who have continued to use asyncore/asynchat in the last 4 years have already changed their code. People who write new code already deal with the logging. Does anyone have a compelling reason as to why we shouldn't just close this bug? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 06:09:19 2009 From: report at bugs.python.org (lplatypus) Date: Thu, 12 Feb 2009 05:09:19 +0000 Subject: [issue5223] infinite recursion in PyErr_WriteUnraisable In-Reply-To: <1234412915.77.0.527314714811.issue5223@psf.upfronthosting.co.za> Message-ID: <1234415359.76.0.690070109574.issue5223@psf.upfronthosting.co.za> lplatypus added the comment: I believe that this problem was introduced in subversion revision 65319. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 06:11:25 2009 From: report at bugs.python.org (lplatypus) Date: Thu, 12 Feb 2009 05:11:25 +0000 Subject: [issue5223] infinite recursion in PyErr_WriteUnraisable In-Reply-To: <1234412915.77.0.527314714811.issue5223@psf.upfronthosting.co.za> Message-ID: <1234415485.48.0.0525161976874.issue5223@psf.upfronthosting.co.za> lplatypus added the comment: sorry I meant revision 65320 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 06:40:43 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Feb 2009 05:40:43 +0000 Subject: [issue5032] itertools.count step In-Reply-To: <1232630071.89.0.921140735063.issue5032@psf.upfronthosting.co.za> Message-ID: <1234417243.16.0.042214027565.issue5032@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Found a way to do this while keeping full speed on the default case. Also, fixed an error where the start argument was rounded to the nearest integer. Also, improved the utility over its cousin, range() by allowing floating point arguments. See r69522 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 06:42:47 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Feb 2009 05:42:47 +0000 Subject: [issue5032] itertools.count step In-Reply-To: <1232630071.89.0.921140735063.issue5032@psf.upfronthosting.co.za> Message-ID: <1234417367.07.0.173995601261.issue5032@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 08:36:57 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Feb 2009 07:36:57 +0000 Subject: [issue3745] _sha256 et al. encode to UTF-8 by default In-Reply-To: <1220261226.32.0.128110321757.issue3745@psf.upfronthosting.co.za> Message-ID: <1234424217.81.0.637702696207.issue3745@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Fixed in py3k branch r69524. needs porting to release30-maint. possibly also release26-maint and trunk. ---------- priority: -> normal versions: +Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 08:39:25 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Feb 2009 07:39:25 +0000 Subject: [issue4818] Patch for thread-support in md5module.c In-Reply-To: <1230981840.09.0.761060151323.issue4818@psf.upfronthosting.co.za> Message-ID: <1234424365.05.0.122805485952.issue4818@psf.upfronthosting.co.za> Gregory P. Smith added the comment: fyi - I took care of the unicode data acceptance issue for all hashlib related modules in the py3k branch in r69524. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 08:40:35 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Feb 2009 07:40:35 +0000 Subject: [issue4821] Patches for thread-support in built-in SHA modules In-Reply-To: <1231002504.32.0.171592356443.issue4821@psf.upfronthosting.co.za> Message-ID: <1234424435.38.0.702227093642.issue4821@psf.upfronthosting.co.za> Gregory P. Smith added the comment: fyi - I took care of the unicode data acceptance issue for all hashlib related modules in the py3k branch in r69524. Yes, the hashlib modules have a -lot- of code in common. Refactoring that would be nice but i haven't looked into it. I at least moved the commonly used #define into a new hashlib.h for the above change. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 08:42:26 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Feb 2009 07:42:26 +0000 Subject: [issue4751] Patch for better thread support in hashlib In-Reply-To: <1230298756.92.0.632482701363.issue4751@psf.upfronthosting.co.za> Message-ID: <1234424546.02.0.88180040091.issue4751@psf.upfronthosting.co.za> Gregory P. Smith added the comment: assigning to me so i don't lose track of making sure this happens for trunk. ---------- assignee: -> gregory.p.smith components: +Extension Modules -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 08:56:26 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 12 Feb 2009 07:56:26 +0000 Subject: [issue5222] Please include AutoScroll and create_container in pyttk and Tkinter support In-Reply-To: <1234411450.15.0.433002333862.issue5222@psf.upfronthosting.co.za> Message-ID: <1234425386.92.0.369595384803.issue5222@psf.upfronthosting.co.za> Martin v. L?wis added the comment: No additional libraries can be included into 2.6. For 2.7, Guilherme Polo ttk module is already included, so closing this as fixed. ---------- nosy: +loewis resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 09:10:39 2009 From: report at bugs.python.org (Tony Meyer) Date: Thu, 12 Feb 2009 08:10:39 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1234426239.45.0.549584939547.issue1161031@psf.upfronthosting.co.za> Tony Meyer added the comment: None of my arguments have really changed since 2.4. I still believe that this is a poor choice of default behaviour (and if it is meant to be overridden to be useable, then 'pass' or 'raise NotYetImplementedError' would be a better choice). However, my impression is that nothing I say will convince you of that, so I'll give up on that. It would have been interesting to hear from Andrew the reason for the code. However, this is definitely a documentation bug (as outlined previously), and so should be fixed, not closed. I can provide a patch if it stands a chance of being accepted. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 09:18:58 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Feb 2009 08:18:58 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1234426738.23.0.489114407109.issue1161031@psf.upfronthosting.co.za> Gregory P. Smith added the comment: A documentation patch would be appreciated, thanks! ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 09:33:30 2009 From: report at bugs.python.org (mproeller) Date: Thu, 12 Feb 2009 08:33:30 +0000 Subject: [issue5215] change value of local variable in debug In-Reply-To: <1234338182.69.0.0258607971835.issue5215@psf.upfronthosting.co.za> Message-ID: <1234427610.43.0.119243560215.issue5215@psf.upfronthosting.co.za> mproeller added the comment: This is the pdb session at the tracepoint in line 4 in the function func () So I did the following first: > c:\test.py(5)func() -> a = b + 2 (Pdb) p b 13 (Pdb) !b=5 (Pdb) p b 13 (Pdb) n > c:\test.py(6)func() -> print a (Pdb) n 15 I tried to change the value of b but it didn't work, as the print a statement printed 15, but it should have printed 7 because I set b to 5!! Then I did the same again: > c:\test.py(5)func() -> a = b + 2 (Pdb) p b 13 (Pdb) !b = 5 (Pdb) n > c:\test.py(6)func() -> print a (Pdb) n 7 Note that I changed the value of b to 5 and than didn't print the value of b and it seems to work as the print statement printed 7. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 09:57:26 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 12 Feb 2009 08:57:26 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234429046.69.0.362401801997.issue5186@psf.upfronthosting.co.za> Mark Dickinson added the comment: > > - avoids comparing an unsigned long to -1 Just out of interest, why? The cast is unnecessary: there's no ambiguity or undefinedness (the int -1 gets promoted to unsigned long, with wraparound semantics), and neither gcc nor MSVC complains. Other than that, the patch looks fine to me; x ^= x >> 4 would be fine too. I really don't see that it makes much difference either way, since both transformations are reversible and fast enough. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 10:00:11 2009 From: report at bugs.python.org (David Jones) Date: Thu, 12 Feb 2009 09:00:11 +0000 Subject: [issue5202] wave.py cannot write wave files into a shell pipeline In-Reply-To: <1234266301.49.0.830035453307.issue5202@psf.upfronthosting.co.za> Message-ID: <1234429211.16.0.456760009707.issue5202@psf.upfronthosting.co.za> David Jones added the comment: The following program does a very basic do-i-get-back-what-i-wrote test. sunau can't cope; I am investigating. #!/usr/bin/env python # $Id$ # Audio File Tests import aifc import sunau import wave import struct import sys from StringIO import StringIO frames = struct.pack('256B', *range(256)) log = sys.stderr # Basic test of reproducability. # We test that a set of frames (an entirely artifical set, see `frames`, # above) can be written to an audio file and read back again to get the # same set of frames. # We test mono/stereo, 8-bit/16-bit, and a few framerates. # As of 2009-02-12 sunau does not pass these tests, so I recommend that # you remove it. for af in (aifc, sunau, wave): for nchannels in (1, 2): for sampwidth in (1, 2): for framerate in (11000, 44100, 96000): print >> log, "%s %d/%d/%d" % (af.__name__, nchannels, sampwidth, framerate) f = StringIO() w = af.open(f, 'w') w.setnchannels(nchannels) w.setsampwidth(sampwidth) w.setframerate(framerate) w.writeframesraw(frames) w.close() s = f.getvalue() f = StringIO(s) w = af.open(f) assert w.getnchannels() == nchannels assert w.getsampwidth() == sampwidth assert w.getframerate() == framerate assert w.readframes(len(frames)//nchannels//sampwidth) == frames assert w.readframes(1) == '' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 11:57:49 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 12 Feb 2009 10:57:49 +0000 Subject: [issue5032] itertools.count step In-Reply-To: <1232630071.89.0.921140735063.issue5032@psf.upfronthosting.co.za> Message-ID: <1234436269.66.0.0812186086859.issue5032@psf.upfronthosting.co.za> Mark Dickinson added the comment: A couple of comments: > Also, improved the utility over its cousin, range() by allowing floating > point arguments. Is this wise? From a numerical perspective, it seems to me that using count with floating-point arguments is almost always going to be the wrong thing to do (unless those floats are integral), and that allowing floating-point arguments invites misuse. For example, I'd be suspicious of code that looked like: for x in count(0.0, 0.1): do_something_with_x where it seems quite likely that what's intended is the more robust: for i in count(): x = i/10.0 do_something_with_x Second (unrelated) comment: on my machine, list(count()) appears to hang, and is unresponsive to keyboard interrupts. Is there any easy way to make this interruptible? While list(count()) is clearly a stupid thing to type, it would be nice if it didn't hang the interpreter. ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:09:25 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 12 Feb 2009 11:09:25 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234429046.69.0.362401801997.issue5186@psf.upfronthosting.co.za> Message-ID: <1234437002.7414.8.camel@fsol> Antoine Pitrou added the comment: Mark: > Just out of interest, why? The cast is unnecessary: there's no ambiguity > or undefinedness (the int -1 gets promoted to unsigned long, with > wraparound semantics), and neither gcc nor MSVC complains. Well, I had memories of a weird signed/unsigned problem (issue4935) and I wasn't sure whether it could raise its head in the present case or not. Raymond: > The latter doesn't > require any special-casing for various pointer sizes. The special casing is just there so as to make all pointer bits participate in the final hash (which is what the original implementation does). Otherwise we could just unconditionally cast to unsigned long. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:18:04 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 12 Feb 2009 11:18:04 +0000 Subject: [issue3745] _sha256 et al. encode to UTF-8 by default In-Reply-To: <1220261226.32.0.128110321757.issue3745@psf.upfronthosting.co.za> Message-ID: <1234437484.12.0.658101839813.issue3745@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think backporting to 2.6 is fine, people may be relying on the current behaviour. As for 3.0.1, you'd better be quick, it's scheduled for tomorrow. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:21:05 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 11:21:05 +0000 Subject: [issue3745] _sha256 et al. encode to UTF-8 by default In-Reply-To: <1220261226.32.0.128110321757.issue3745@psf.upfronthosting.co.za> Message-ID: <1234437665.06.0.161405529155.issue3745@psf.upfronthosting.co.za> Changes by STINNER Victor : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:22:05 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 11:22:05 +0000 Subject: [issue3745] _sha256 et al. encode to UTF-8 by default In-Reply-To: <1220261226.32.0.128110321757.issue3745@psf.upfronthosting.co.za> Message-ID: <1234437725.84.0.618688168762.issue3745@psf.upfronthosting.co.za> STINNER Victor added the comment: Wooops, my mouse clicked on Remove!? I removed Message73550, sorry gregory. Here was the content of the message: --- agreed. most platforms should be using the openssl version, i will update the non-openssl implementations to behave the same. I don't think this is worth being a release blocker. I'll do it for 3.0.1. --- ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:25:25 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 11:25:25 +0000 Subject: [issue3745] _sha256 et al. encode to UTF-8 by default In-Reply-To: <1220261226.32.0.128110321757.issue3745@psf.upfronthosting.co.za> Message-ID: <1234437925.53.0.194857891977.issue3745@psf.upfronthosting.co.za> STINNER Victor added the comment: I agree with pitrou: leave python 2.6 unchanged, but please backport to 3.0.1 ;-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:27:31 2009 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 12 Feb 2009 11:27:31 +0000 Subject: [issue3833] python-2.6b3.msi and python-2.6b3.amd64.msi can't both be installed on one machine In-Reply-To: <1221106076.33.0.246620485581.issue3833@psf.upfronthosting.co.za> Message-ID: <1222045305.11.0.948946930644.issue3745@psf.upfronthosting.co.za> Guilherme Polo added the comment: agreed. most platforms should be using the openssl version, i will update the non-openssl implementations to behave the same. I don't think this is worth being a release blocker. I'll do it for 3.0.1. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:28:12 2009 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 12 Feb 2009 11:28:12 +0000 Subject: [issue3833] python-2.6b3.msi and python-2.6b3.amd64.msi can't both be installed on one machine In-Reply-To: <1221106076.33.0.246620485581.issue3833@psf.upfronthosting.co.za> Message-ID: <1234438092.89.0.41737453432.issue3833@psf.upfronthosting.co.za> Changes by Guilherme Polo : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:28:34 2009 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 12 Feb 2009 11:28:34 +0000 Subject: [issue3833] python-2.6b3.msi and python-2.6b3.amd64.msi can't both be installed on one machine In-Reply-To: <1221106076.33.0.246620485581.issue3833@psf.upfronthosting.co.za> Message-ID: <1234438114.12.0.168770079113.issue3833@psf.upfronthosting.co.za> Changes by Guilherme Polo : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:28:55 2009 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 12 Feb 2009 11:28:55 +0000 Subject: [issue3833] python-2.6b3.msi and python-2.6b3.amd64.msi can't both be installed on one machine In-Reply-To: <1221106076.33.0.246620485581.issue3833@psf.upfronthosting.co.za> Message-ID: <1234438135.09.0.533503930436.issue3833@psf.upfronthosting.co.za> Changes by Guilherme Polo : ---------- nosy: -gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:31:47 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 11:31:47 +0000 Subject: [issue3745] _sha256 et al. encode to UTF-8 by default In-Reply-To: <1220261226.32.0.128110321757.issue3745@psf.upfronthosting.co.za> Message-ID: <1222045305.11.0.948946930644.issue3745@psf.upfronthosting.co.za> STINNER Victor added the comment: agreed. most platforms should be using the openssl version, i will update the non-openssl implementations to behave the same. I don't think this is worth being a release blocker. I'll do it for 3.0.1. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:32:35 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 11:32:35 +0000 Subject: [issue3745] _sha256 et al. encode to UTF-8 by default In-Reply-To: <1220261226.32.0.128110321757.issue3745@psf.upfronthosting.co.za> Message-ID: <1234438355.7.0.863349538202.issue3745@psf.upfronthosting.co.za> STINNER Victor added the comment: gpolo gave me the solution to restore a deleted message: http://bugs.python.org/issueXXXX?@action=edit&@add at messages=MSGNUM _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:34:59 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 11:34:59 +0000 Subject: [issue4751] Patch for better thread support in hashlib In-Reply-To: <1230298756.92.0.632482701363.issue4751@psf.upfronthosting.co.za> Message-ID: <1234438499.6.0.220022141239.issue4751@psf.upfronthosting.co.za> STINNER Victor added the comment: @ebfe: Did you wrote the patch (for python 2.7)? Are you still interrested to write the patch? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:36:56 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 11:36:56 +0000 Subject: [issue5223] infinite recursion in PyErr_WriteUnraisable In-Reply-To: <1234412915.77.0.527314714811.issue5223@psf.upfronthosting.co.za> Message-ID: <1234438616.37.0.459992855786.issue5223@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:49:25 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 11:49:25 +0000 Subject: [issue637094] print to unicode stream should __unicode Message-ID: <1234439365.49.0.00501762992646.issue637094@psf.upfronthosting.co.za> STINNER Victor added the comment: ajaksu2> Not sure it's still important after 3.0 release. Python2 has too much issues related to unicode. It's easier to switch to Python3 which use unicode by default for most functions (eg. print). The issue can't be fixed in Python2 without breaking the compatibility (introduce regression). I think that the issue is fixed in Python3. If you disagree, reopen this issue and *attach your patch* ;-) ---------- nosy: +haypo resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:54:26 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 12 Feb 2009 11:54:26 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234439666.1.0.259140408986.issue5186@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Well, I had memories of a weird signed/unsigned problem (issue4935) and > I wasn't sure whether it could raise its head in the present case or > not. I'm 99.9% sure that it's not a problem here. If it is a problem then it needs to be fixed in long_hash in longobject.c as well, which uses exactly the same code. The relevant section of the C99 standard is 6.3.1.8, para. 1 (try googling for 'n1256' if you don't have a copy of the standard). The only really nasty cases are those of the form unsigned_int + signed_long, or more generally, low_rank_unsigned_integer binary_op higher_rank_signed_integer where the type of the expression depends on the relative sizes (not just ranks) of the integer types, giving potential portability problems. And there are similar problems with the integer promotions (6.3.1.1, para. 2). I guess it comes down to personal taste, but my own preference is to leave out casts where the conversion they describe is already implied by the C language rules, adding them back in to silence compiler warnings if necessary. I find it reduces noise in the code and makes the important casts more visible, but chacun ? son go?t. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:56:50 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Feb 2009 11:56:50 +0000 Subject: [issue5032] itertools.count step In-Reply-To: <1232630071.89.0.921140735063.issue5032@psf.upfronthosting.co.za> Message-ID: <1234439810.46.0.525996530379.issue5032@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Not too worried about either issue. For the first, it makes the code closer to its pure python equivalent. Better to add some math module function like Matlab's linspace(). It's hard to prevent people from creating numerical mistakes no matter what. Besides, now it's possible to write: count(Decimal('1.1'), Decimal('.1')) and get exact progressions. For the second, the non-interruptability issue is everpresent throughout the language. If we get some uniform way of dealing with it, that would be great (though I expect it will slow down lots of things we care about and provide nearly zero benefit). Since count() and repeat() came out in itertools eons ago, there have been zero bug reports or user complaints about the issue. So, I'll take it as a non-issue. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:58:07 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 11:58:07 +0000 Subject: [issue660095] GNU readline version confusion Message-ID: <1234439887.49.0.428734885378.issue660095@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is related to old versions: - readline 4.2: current is 5.2 - gcc 3.2.1: current is 4.3.3 - python 2.2.2: current is 2.6.1 - etc. If the problem is still valid today, please reopen this issue. ---------- nosy: +haypo resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:01:09 2009 From: report at bugs.python.org (Ned Deily) Date: Thu, 12 Feb 2009 12:01:09 +0000 Subject: [issue5224] OS X installer: "Update Shell Profile" script is not updated In-Reply-To: <1234440069.85.0.865907357783.issue5224@psf.upfronthosting.co.za> Message-ID: <1234440069.85.0.865907357783.issue5224@psf.upfronthosting.co.za> New submission from Ned Deily : ANALYSIS The script used by the Python installer to update the user's shell script has a hard-coded version number. This script is also installed in the "/Applications/Python n.n" directory as "Update Shell Profile.command". The installer is not updating the version in the command so the wrong version of Python may be inserted into the user's shell path. SOLUTION Ensure that the build major version is auto-updated in both. APPLIES py3k, 3.0, trunk, 2.6 NOTE Patch is in two parts: patch-nad0005.txt (this file) py3k, 3.0, trunk, 2.6 and one of: patch-nad0005-py3k-30.txt py3k, 3.0 patch-nad0005-trunk.txt trunk patch-nad0005-26.txt 2.6 ---------- components: Macintosh files: patch-nad0005.txt messages: 81747 nosy: nad severity: normal status: open title: OS X installer: "Update Shell Profile" script is not updated versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13045/patch-nad0005.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:01:31 2009 From: report at bugs.python.org (Ned Deily) Date: Thu, 12 Feb 2009 12:01:31 +0000 Subject: [issue5224] OS X installer: "Update Shell Profile" script is not updated In-Reply-To: <1234440069.85.0.865907357783.issue5224@psf.upfronthosting.co.za> Message-ID: <1234440091.79.0.861260535741.issue5224@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file13046/patch-nad0005-py3k-30.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:01:44 2009 From: report at bugs.python.org (Ned Deily) Date: Thu, 12 Feb 2009 12:01:44 +0000 Subject: [issue5224] OS X installer: "Update Shell Profile" script is not updated In-Reply-To: <1234440069.85.0.865907357783.issue5224@psf.upfronthosting.co.za> Message-ID: <1234440104.89.0.607489270978.issue5224@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file13047/patch-nad0005-trunk.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:01:56 2009 From: report at bugs.python.org (Ned Deily) Date: Thu, 12 Feb 2009 12:01:56 +0000 Subject: [issue5224] OS X installer: "Update Shell Profile" script is not updated In-Reply-To: <1234440069.85.0.865907357783.issue5224@psf.upfronthosting.co.za> Message-ID: <1234440116.2.0.722369599743.issue5224@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file13048/patch-nad0005-26.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:02:19 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 12 Feb 2009 12:02:19 +0000 Subject: [issue5032] itertools.count step In-Reply-To: <1232630071.89.0.921140735063.issue5032@psf.upfronthosting.co.za> Message-ID: <1234440139.4.0.27421928168.issue5032@psf.upfronthosting.co.za> Mark Dickinson added the comment: > to write: count(Decimal('1.1'), Decimal('.1')) and get exact > progressions. That's pretty cool. :-) > in itertools eons ago, there have been zero bug reports or user > complaints about the issue. So, I'll take it as a non-issue. Fair enough. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:05:46 2009 From: report at bugs.python.org (Ned Deily) Date: Thu, 12 Feb 2009 12:05:46 +0000 Subject: [issue5225] OS X "Update Shell Profile" may not update $PATH if run more than once In-Reply-To: <1234440346.58.0.444916712806.issue5225@psf.upfronthosting.co.za> Message-ID: <1234440346.58.0.444916712806.issue5225@psf.upfronthosting.co.za> New submission from Ned Deily : An instance of the shell script "Update Shell Profile.command" is installed in each "/Applications/Python x.x" folder. Clicking on the script allows the user to change the default Python version. If the scripts are run more than once - say first to make 3.0 the default then 2.6 the default then back to 3.0 again - the script will fail to update the user's $PATH, forcing users to manually edit their shell profile. SOLUTION Ensure that $PATH is updated if there are other Python frameworks already on its head. (This is not the most elegant solution since it leaves the previous versions later in the path but it is safer to only append to the user's profile - and a backup copy is made.) APPLIES py3k, 3.0, trunk, 2.6 ---------- components: Macintosh files: patch-nad0020.txt messages: 81749 nosy: nad severity: normal status: open title: OS X "Update Shell Profile" may not update $PATH if run more than once type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13049/patch-nad0020.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:09:21 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 12 Feb 2009 12:09:21 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234429046.69.0.362401801997.issue5186@psf.upfronthosting.co.za> Message-ID: <1234440604.7414.14.camel@fsol> Antoine Pitrou added the comment: > Other than that, the patch looks fine to me; x ^= x >> 4 would be fine > too. I've just tried x ^= x >> 4 and the speedup is smaller on our microbenchmark (time_object_hash.py). I conjecture that trying to maintain the sequentiality of adresses may have beneficial cache locality effects. Should we care? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:09:26 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 12:09:26 +0000 Subject: [issue5214] Add KOI8-RU as a known encoding In-Reply-To: <1234335818.61.0.321610259153.issue5214@psf.upfronthosting.co.za> Message-ID: <1234440566.45.0.499561274431.issue5214@psf.upfronthosting.co.za> STINNER Victor added the comment: I found this file http://ra.dkuug.dk/i18n/charmaps/KOI8-RU. I converted it to a format compatible with gencodec.py. Here is the resulting file: copy it into /encodings/. ---------- nosy: +haypo Added file: http://bugs.python.org/file13050/koi8_ru.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:09:38 2009 From: report at bugs.python.org (Ned Deily) Date: Thu, 12 Feb 2009 12:09:38 +0000 Subject: [issue5226] OS X installer: Welcome and Readme files are out-of-date In-Reply-To: <1234440578.91.0.615393071826.issue5226@psf.upfronthosting.co.za> Message-ID: <1234440578.91.0.615393071826.issue5226@psf.upfronthosting.co.za> New submission from Ned Deily : The information in the installer Welcome and README is out-of-date. APPLIES py3k, 3.0, trunk, 2.6 NOTE patch-nad0019-py3k-30.txt py3k, 3.0 patch-nad0019-trunk-26.txt trunk, 2.6 ---------- components: Macintosh files: patch-nad0019-py3k-30.txt messages: 81752 nosy: nad severity: normal status: open title: OS X installer: Welcome and Readme files are out-of-date type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13051/patch-nad0019-py3k-30.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:10:16 2009 From: report at bugs.python.org (Ned Deily) Date: Thu, 12 Feb 2009 12:10:16 +0000 Subject: [issue5226] OS X installer: Welcome and Readme files are out-of-date In-Reply-To: <1234440578.91.0.615393071826.issue5226@psf.upfronthosting.co.za> Message-ID: <1234440616.88.0.107970048778.issue5226@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file13052/patch-nad0019-trunk-26.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:10:31 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 12:10:31 +0000 Subject: [issue5214] Add KOI8-RU as a known encoding In-Reply-To: <1234335818.61.0.321610259153.issue5214@psf.upfronthosting.co.za> Message-ID: <1234440631.24.0.628063646462.issue5214@psf.upfronthosting.co.za> STINNER Victor added the comment: Attach file used as gencodec.py input: koi8-ru. dwayne: Does the result look correct? Added file: http://bugs.python.org/file13053/koi8-ru _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:14:25 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 12:14:25 +0000 Subject: [issue5214] Add KOI8-RU as a known encoding In-Reply-To: <1234335818.61.0.321610259153.issue5214@psf.upfronthosting.co.za> Message-ID: <1234440865.51.0.383690106128.issue5214@psf.upfronthosting.co.za> STINNER Victor added the comment: My version of iconv (2.6.1) doesn't support KOI8-RU, only: - CSKOI8R - KOI-7 - KOI-8 - KOI8-R: supported by python trunk - KOI8-T - KOI8-U: supported by python trunk - KOI8 - KOI8R - KOI8U Note: python trunk doesn't support KOI8R nor KOI8U (which are just aliases to KOI8-R and KOI8-U). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:14:40 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 12 Feb 2009 12:14:40 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234440880.67.0.318957441284.issue5186@psf.upfronthosting.co.za> Mark Dickinson added the comment: +1 for checking in pointer_hash4.patch, provided Raymond approves. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:25:51 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 12 Feb 2009 12:25:51 +0000 Subject: [issue5214] Add KOI8-RU as a known encoding In-Reply-To: <1234335818.61.0.321610259153.issue5214@psf.upfronthosting.co.za> Message-ID: <1234441551.22.0.743168092236.issue5214@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Could you please clarify the official status of this encoding. According to this page: http://www.terena.org/activities/multiling/koi8-ru/index.html it is currently only a proposed draft which hasn't been updated since 1997. ---------- nosy: +lemburg versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:32:20 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 12 Feb 2009 12:32:20 +0000 Subject: [issue637094] print to unicode stream should __unicode In-Reply-To: <1234439365.49.0.00501762992646.issue637094@psf.upfronthosting.co.za> Message-ID: <499416D0.3060006@egenix.com> Marc-Andre Lemburg added the comment: On 2009-02-12 12:49, STINNER Victor wrote: > STINNER Victor added the comment: > > ajaksu2> Not sure it's still important after 3.0 release. > > Python2 has too much issues related to unicode. It's easier to switch > to Python3 which use unicode by default for most functions (eg. > print). I don't agree with that statement. Python3 has better Unicode I/O support, but apart from that it's pretty much the same show. > The issue can't be fixed in Python2 without breaking the compatibility > (introduce regression). I think that the issue is fixed in Python3. Python3 fixes the "print" statement to be a function, which allows much better extensibility of the concept. You can have the same in Python2 with a little effort: just create your own myprint() function and have it process Unicode in whatever way you want. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:40:34 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Feb 2009 12:40:34 +0000 Subject: [issue5032] itertools.count step In-Reply-To: <1232630071.89.0.921140735063.issue5032@psf.upfronthosting.co.za> Message-ID: <1234442434.31.0.646905250061.issue5032@psf.upfronthosting.co.za> Raymond Hettinger added the comment: More coolness: count(Fraction(2,3), Fraction(1,6)) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:51:14 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Feb 2009 12:51:14 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234443074.34.0.82076964905.issue5186@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Consider it approved. Though I prefer you switch to x ^= x >> 4. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 14:00:48 2009 From: report at bugs.python.org (Rogi) Date: Thu, 12 Feb 2009 13:00:48 +0000 Subject: [issue5227] Py_Main() does not return on sys.exit() In-Reply-To: <1234443648.41.0.597133870232.issue5227@psf.upfronthosting.co.za> Message-ID: <1234443648.41.0.597133870232.issue5227@psf.upfronthosting.co.za> New submission from Rogi : >From teh documentation: http://docs.python.org/c-api/veryhigh.html int Py_Main(int argc, char **argv)? The main program for the standard interpreter. This is made available for programs which embed Python. The argc and argv parameters should be prepared exactly as those which are passed to a C program?s main function. It is important to note that the argument list may be modified (but the contents of the strings pointed to by the argument list are not). The return value will be the integer passed to the sys.exit() function, 1 if the interpreter exits due to an exception, or 2 if the parameter list does not represent a valid Python command line. However, if teh user type sys.exit(whatever), Py_Main() is call exit() instead of returning, which cause program termination before cleanup and stuff. ---------- components: None messages: 81760 nosy: Rogi severity: normal status: open title: Py_Main() does not return on sys.exit() versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 14:22:33 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 13:22:33 +0000 Subject: [issue637094] print to unicode stream should __unicode In-Reply-To: <499416D0.3060006@egenix.com> Message-ID: <200902121422.25671.victor.stinner@haypocalc.com> STINNER Victor added the comment: > Python3 fixes the "print" statement to be a function, which allows > much better extensibility of the concept. > > You can have the same in Python2 with a little effort: just create > your own myprint() function and have it process Unicode in whatever > way you want. About myprint(): sure, it's possible to write a custom issue. But the feature request was to use obj.__unicode__() instead of obj.__str__() for an "unicode aware stream". The problem with Python2 is that there is not clear separation between "bytes stream" ("raw stream"?) and "unicode aware stream" (like io.open or codecs.open). I think that fixing this issue (#637094) was one of the goal of the new I/O library (io in Python3). Using __unicode__() for some object and __str__() for some other sounds strange/dangerous to me. I prefer bytes-only stream or unicode-only stream, but not bytes-and-sometimes-unicode stream. Python2 has only bytes stream. Python3 has both: open(name, 'rb') is bytes only, and open(name, 'r') is unicode only. lemburg> Does your message mean that you want to reopen the issue? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 14:23:28 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 12 Feb 2009 13:23:28 +0000 Subject: [issue4998] __slots__ on Fraction is useless In-Reply-To: <1232368882.79.0.616892747667.issue4998@psf.upfronthosting.co.za> Message-ID: <1234445008.89.0.485171028057.issue4998@psf.upfronthosting.co.za> Mark Dickinson added the comment: This needs to be merged before 3.0.1 goes out. I can't do it right now since I don't have ssh access; will do it when I get home if no-one beats me to it. ---------- priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 14:32:36 2009 From: report at bugs.python.org (Matthias Klose) Date: Thu, 12 Feb 2009 13:32:36 +0000 Subject: [issue4151] Separate build dir broken In-Reply-To: <1224522256.17.0.820973690454.issue4151@psf.upfronthosting.co.za> Message-ID: <1234445556.88.0.573185737896.issue4151@psf.upfronthosting.co.za> Matthias Klose added the comment: still seen on the 2.6 branch. applying r69374 on the branch doesn't fix it there. ---------- nosy: +doko resolution: fixed -> status: closed -> open versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 15:01:22 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 12 Feb 2009 14:01:22 +0000 Subject: [issue637094] print to unicode stream should __unicode In-Reply-To: <200902121422.25671.victor.stinner@haypocalc.com> Message-ID: <49942BAE.7070107@egenix.com> Marc-Andre Lemburg added the comment: On 2009-02-12 14:22, STINNER Victor wrote: > STINNER Victor added the comment: > >> Python3 fixes the "print" statement to be a function, which allows >> much better extensibility of the concept. >> >> You can have the same in Python2 with a little effort: just create >> your own myprint() function and have it process Unicode in whatever >> way you want. > > About myprint(): sure, it's possible to write a custom issue. But the feature > request was to use obj.__unicode__() instead of obj.__str__() for an "unicode > aware stream". > > The problem with Python2 is that there is not clear separation between "bytes > stream" ("raw stream"?) and "unicode aware stream" (like io.open or > codecs.open). I think that fixing this issue (#637094) was one of the goal of > the new I/O library (io in Python3). True, but the point of the original request was that the stream should decide how to print the object, ie. you pass the object to the stream's .write() method instead of first running str() on it and then passing this to the .write() method. This is easy to have using a custom print function and indeed a good way to proceed if you want to port to Python3 at some later point. > Using __unicode__() for some object and __str__() for some other sounds > strange/dangerous to me. I prefer bytes-only stream or unicode-only stream, > but not bytes-and-sometimes-unicode stream. If you use a StreamWriter instance in Python2 which uses one of the Unicode codecs, then it will accept ASCII strings or Unicode as input for .write(), ie. the stream decides on how to process the input. > Python2 has only bytes stream. Python3 has both: open(name, 'rb') is bytes > only, and open(name, 'r') is unicode only. That's not entirely correct. Python2's codecs.py module provides streams which can implement several different type combinations for input and output. > lemburg> Does your message mean that you want to reopen the issue? No, I just wanted to correct your statement :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 15:06:23 2009 From: report at bugs.python.org (Lukas Lueg) Date: Thu, 12 Feb 2009 14:06:23 +0000 Subject: [issue4751] Patch for better thread support in hashlib In-Reply-To: <1230298756.92.0.632482701363.issue4751@psf.upfronthosting.co.za> Message-ID: <1234447583.31.0.755906858429.issue4751@psf.upfronthosting.co.za> Lukas Lueg added the comment: yes, I got lost on that one. I'll create a patch for 2.7 tonight. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 15:26:30 2009 From: report at bugs.python.org (ndbecker) Date: Thu, 12 Feb 2009 14:26:30 +0000 Subject: [issue5228] multiprocessing not compatible with functools.partial In-Reply-To: <1234448790.05.0.305625917638.issue5228@psf.upfronthosting.co.za> Message-ID: <1234448790.05.0.305625917638.issue5228@psf.upfronthosting.co.za> New submission from ndbecker : from multiprocessing import Pool def power (x, pwr=2): return x**pwr import functools run_test = functools.partial (power, pwr=3) if __name__ == "__main__": pool = Pool() cases = [3,4,5] results = pool.map (run_test, cases) TypeError: type 'partial' takes at least one argument Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/multiprocessing-2.6.1.1-py2.5- self.run() File "/usr/lib/python2.5/site-packages/multiprocessing-2.6.1.1-py2.5- self._target(*self._args, **self._kwargs) File "/usr/lib/python2.5/site-packages/multiprocessing-2.6.1.1-py2.5- task = get() File "/usr/lib/python2.5/site-packages/multiprocessing-2.6.1.1-py2.5- return recv() TypeError: type 'partial' takes at least one argument ---------- components: Library (Lib) messages: 81766 nosy: jnoller, ndbecker severity: normal status: open title: multiprocessing not compatible with functools.partial type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 15:27:56 2009 From: report at bugs.python.org (Jesse Noller) Date: Thu, 12 Feb 2009 14:27:56 +0000 Subject: [issue5228] multiprocessing not compatible with functools.partial In-Reply-To: <1234448790.05.0.305625917638.issue5228@psf.upfronthosting.co.za> Message-ID: <1234448876.54.0.949441286951.issue5228@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: -> jnoller nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 15:28:27 2009 From: report at bugs.python.org (Jesse Noller) Date: Thu, 12 Feb 2009 14:28:27 +0000 Subject: [issue5228] multiprocessing not compatible with functools.partial In-Reply-To: <1234448790.05.0.305625917638.issue5228@psf.upfronthosting.co.za> Message-ID: <1234448907.43.0.273254241358.issue5228@psf.upfronthosting.co.za> Jesse Noller added the comment: See this mail thread: http://mail.python.org/pipermail/python-dev/2009-February/086034.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 15:55:55 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 12 Feb 2009 14:55:55 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234450555.3.0.661422265211.issue5186@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Though I prefer you switch to x ^= x >> 4. Okay, how about this one? Short and sweet. No loss of information except when sizeof(void *) > sizeof(long) (unavoidable until someone finds a way to fit all 64-bit pointers into a 32-bit integer type...) Added file: http://bugs.python.org/file13054/pointer_hash5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 16:05:18 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 12 Feb 2009 15:05:18 +0000 Subject: [issue5194] OS X IDLE.app and bin/idle: missing/extra menu options In-Reply-To: <1234234507.58.0.689231089961.issue5194@psf.upfronthosting.co.za> Message-ID: <1234451118.55.0.674541413185.issue5194@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've fixed this for 3.1 in r69532. Fixed for 3.0 in r69533 (backport of the other patch). The actual checkin is based on "patch-nad0014-py3k-30.txt", but with some minor tweaks (I use "idlelib.macosxSupport.runningAsOSXApp" throughout, instead of sometimes doing the same check by hand). ---------- nosy: +ronaldoussoren resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 16:12:59 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 12 Feb 2009 15:12:59 +0000 Subject: [issue5195] OS X IDLE.app and bin/idle: incorrect key defaults in 3.x In-Reply-To: <1234234764.34.0.510660013878.issue5195@psf.upfronthosting.co.za> Message-ID: <1234451579.31.0.666578890251.issue5195@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Applied the patch as r69534 (3.1) and r69534 (3.0) ---------- nosy: +ronaldoussoren resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 16:19:22 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 12 Feb 2009 15:19:22 +0000 Subject: [issue5196] OS X IDLE.app: may not launch on 3.x In-Reply-To: <1234235086.65.0.906288935492.issue5196@psf.upfronthosting.co.za> Message-ID: <1234451962.83.0.288793053343.issue5196@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Applied as r69536 (3.1) and r69537 (3.0) ---------- nosy: +ronaldoussoren resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 16:22:37 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 12 Feb 2009 15:22:37 +0000 Subject: [issue5225] OS X "Update Shell Profile" may not update $PATH if run more than once In-Reply-To: <1234440346.58.0.444916712806.issue5225@psf.upfronthosting.co.za> Message-ID: <1234452157.09.0.0755771798978.issue5225@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I don't like this patch because it could grow the users profile without bounds when switching back and forth between two python versions. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 16:27:29 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 12 Feb 2009 15:27:29 +0000 Subject: [issue5226] OS X installer: Welcome and Readme files are out-of-date In-Reply-To: <1234440578.91.0.615393071826.issue5226@psf.upfronthosting.co.za> Message-ID: <1234452449.34.0.25390051927.issue5226@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Applied patch for 3.1 (r69538) and 3.0 (r69539). ---------- nosy: +ronaldoussoren resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 16:42:39 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Feb 2009 15:42:39 +0000 Subject: [issue5226] OS X installer: Welcome and Readme files are out-of-date In-Reply-To: <1234440578.91.0.615393071826.issue5226@psf.upfronthosting.co.za> Message-ID: <1234453359.27.0.723713057703.issue5226@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 16:57:08 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 12 Feb 2009 15:57:08 +0000 Subject: [issue5143] OS X: Py_SetProgramName argument has type char*; should be wchar_t* In-Reply-To: <1233679989.65.0.0874106595792.issue5143@psf.upfronthosting.co.za> Message-ID: <1234454228.06.0.0129123326435.issue5143@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've applied both the fix and tests in r69540 (3.1) and r69541 (3.0) ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 17:04:01 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 12 Feb 2009 16:04:01 +0000 Subject: [issue3883] Bottom buttons of IDLE Preferences Pane on Mac not wide enough for their text. In-Reply-To: <1221598645.05.0.789748104063.issue3883@psf.upfronthosting.co.za> Message-ID: <1234454641.26.0.810215108273.issue3883@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've committed the ronald-configDialog.patch to 3.1 and 3.0. This does mostly the same as Kevin's patch, but only on OSX (that is, I check for OSX and don't add the padding arguments in that case). I haven't applied Kevin's patch as is because I don't know if that will break other platforms and the 3.0.1 release is very near. Committed as r69542 (3.1) and r69543 (3.0) Still need to commit the same patch for 2.6 ---------- nosy: +ronaldoussoren resolution: -> accepted Added file: http://bugs.python.org/file13055/ronald-configDialog.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 17:09:45 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 12 Feb 2009 16:09:45 +0000 Subject: [issue5224] OS X installer: "Update Shell Profile" script is not updated In-Reply-To: <1234440069.85.0.865907357783.issue5224@psf.upfronthosting.co.za> Message-ID: <1234454985.96.0.793611662809.issue5224@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Committed as r69544 (3.1) and r69545 (3.0) ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 17:31:39 2009 From: report at bugs.python.org (Jim Baker) Date: Thu, 12 Feb 2009 16:31:39 +0000 Subject: [issue1533164] Installed but not listed *.pyo break bdist_rpm Message-ID: <1234456299.4.0.908201366562.issue1533164@psf.upfronthosting.co.za> Jim Baker added the comment: Ideally packages should not need to add "optimize=1" to their setup.cfg, as this currently breaks Jython compatibility. This is because Jython, including 2.5, does not support the -O flag. ---------- nosy: +jbaker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 17:32:26 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Feb 2009 16:32:26 +0000 Subject: [issue5224] OS X installer: "Update Shell Profile" script is not updated In-Reply-To: <1234440069.85.0.865907357783.issue5224@psf.upfronthosting.co.za> Message-ID: <1234456346.98.0.242750356259.issue5224@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 17:58:36 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 12 Feb 2009 16:58:36 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234450555.3.0.661422265211.issue5186@psf.upfronthosting.co.za> Message-ID: <1234457958.6880.0.camel@fsol> Antoine Pitrou added the comment: > Okay, how about this one? Apart from the misindentation (the file should use tabs not spaces), have you run the benchmark script with it? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 17:59:52 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 12 Feb 2009 16:59:52 +0000 Subject: [issue5226] OS X installer: Welcome and Readme files are out-of-date In-Reply-To: <1234440578.91.0.615393071826.issue5226@psf.upfronthosting.co.za> Message-ID: <1234457991.92.0.280556404.issue5226@psf.upfronthosting.co.za> Ronald Oussoren added the comment: reopened because this issue was only fixed for python 3.x ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:00:09 2009 From: report at bugs.python.org (Travis Hassloch) Date: Thu, 12 Feb 2009 17:00:09 +0000 Subject: [issue5210] zlib does not indicate end of compressed stream properly In-Reply-To: <1234295180.57.0.273384677161.issue5210@psf.upfronthosting.co.za> Message-ID: <1234458009.55.0.195606559424.issue5210@psf.upfronthosting.co.za> Travis Hassloch added the comment: Here is a patch which adds a member called is_finished to decompression objects that allows client code to know when it has reached the end of the compressed stream. ---------- keywords: +patch Added file: http://bugs.python.org/file13056/zlibmodule.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:00:36 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 12 Feb 2009 17:00:36 +0000 Subject: [issue5224] OS X installer: "Update Shell Profile" script is not updated In-Reply-To: <1234440069.85.0.865907357783.issue5224@psf.upfronthosting.co.za> Message-ID: <1234458036.71.0.336886950266.issue5224@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Reopened the issue because it is only fixed for 3.x at the moment. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:02:37 2009 From: report at bugs.python.org (engelbert gruber) Date: Thu, 12 Feb 2009 17:02:37 +0000 Subject: [issue2263] struct.pack() + numpy int raises SystemError In-Reply-To: <1205134764.8.0.415620235375.issue2263@psf.upfronthosting.co.za> Message-ID: <1234458157.9.0.0514926329516.issue2263@psf.upfronthosting.co.za> engelbert gruber added the comment: Including Py_TPFLAGS_INT_SUBCLASS in numpy's BASEFLAGS cures this. This is an external problem then. But I could not find any reference to Py_TPFLAGS_*_SUBCLASS in the documentation, that is a python problem. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:19:16 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 12 Feb 2009 17:19:16 +0000 Subject: [issue2263] struct.pack() + numpy int raises SystemError In-Reply-To: <1205134764.8.0.415620235375.issue2263@psf.upfronthosting.co.za> Message-ID: <1234459156.21.0.26553213954.issue2263@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, so Python has to improve its C-API documentation, and numpy to fix its int types :) ---------- assignee: -> georg.brandl components: +Documentation -Library (Lib) nosy: +georg.brandl, pitrou priority: -> normal versions: +Python 2.6, Python 3.0, Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:36:58 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:36:58 +0000 Subject: [issue1537445] urllib2 httplib _read_chunked timeout Message-ID: <1234460218.48.0.142614418965.issue1537445@psf.upfronthosting.co.za> Daniel Diniz added the comment: Should this one be closed and docs discussed in a new one? Volunteers? :) ---------- assignee: -> georg.brandl components: +Documentation, Library (Lib) -None nosy: +ajaksu2, georg.brandl, orsenthil stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:37:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:37:27 +0000 Subject: [issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth) In-Reply-To: <1204223194.19.0.670418970441.issue2202@psf.upfronthosting.co.za> Message-ID: <1234460247.09.0.161357673114.issue2202@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil stage: -> test needed versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:38:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:38:04 +0000 Subject: [issue1448934] urllib2+https+proxy not working Message-ID: <1234460284.62.0.153769482631.issue1448934@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +Added HTTP{,S}ProxyConnection nosy: +orsenthil stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:38:22 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:38:22 +0000 Subject: [issue1595365] User-agent header added by an opener is "frozen" Message-ID: <1234460302.53.0.891118404798.issue1595365@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -None nosy: +orsenthil stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:39:45 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:39:45 +0000 Subject: [issue1520831] urrlib2 max_redirections=0 disables redirects Message-ID: <1234460385.57.0.761733883545.issue1520831@psf.upfronthosting.co.za> Daniel Diniz added the comment: rus_r_orange: Can you share your patch and tests? ---------- nosy: +ajaksu2, orsenthil stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:40:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:40:26 +0000 Subject: [issue1160328] urllib2 post error when using httpproxy Message-ID: <1234460426.93.0.312643905455.issue1160328@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:41:18 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:41:18 +0000 Subject: [issue1368312] fix for scheme identification in urllib2? Message-ID: <1234460478.44.0.0702763536509.issue1368312@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:42:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:42:24 +0000 Subject: [issue979407] urllib2 digest auth totally broken Message-ID: <1234460544.82.0.124100636895.issue979407@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -None dependencies: +urllib2 doesn't handle username/password in url nosy: +orsenthil stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:42:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:42:44 +0000 Subject: [issue1508475] transparent gzip compression in liburl2 Message-ID: <1234460564.08.0.852812203009.issue1508475@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) nosy: +orsenthil stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:44:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:44:20 +0000 Subject: [issue1490929] urllib.retrieve's reporthook called with non-helpful value Message-ID: <1234460660.14.0.802979603083.issue1490929@psf.upfronthosting.co.za> Daniel Diniz added the comment: Patch has docs, tests needed. ---------- nosy: +ajaksu2, orsenthil stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:46:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:46:10 +0000 Subject: [issue4894] Docs for urllib.request.HTTPRedirectHandler.redirect_request missing "hdrs" paramether In-Reply-To: <1231509516.06.0.732679259028.issue4894@psf.upfronthosting.co.za> Message-ID: <1234460770.49.0.770929555152.issue4894@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy nosy: +orsenthil stage: -> patch review title: documentaion doesn't include parameter in urllib.request.HTTPRedirectHandler.redirect_request -> Docs for urllib.request.HTTPRedirectHandler.redirect_request missing "hdrs" paramether type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:47:25 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:47:25 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1234460845.49.0.152301312971.issue3244@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +Support iterable bodies in httplib keywords: +easy nosy: +orsenthil stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:50:36 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:50:36 +0000 Subject: [issue3066] FD leak in urllib2 In-Reply-To: <1213009389.23.0.132424094421.issue3066@psf.upfronthosting.co.za> Message-ID: <1234461036.29.0.869126913913.issue3066@psf.upfronthosting.co.za> Daniel Diniz added the comment: Has (non-unittest) test and proposed (non-diff) patch inline. ---------- nosy: +ajaksu2, orsenthil stage: -> test needed versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:51:29 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:51:29 +0000 Subject: [issue3407] test_urllib2_localnet fails on MacOS X 10.4.11 (Intel) In-Reply-To: <1216406874.33.0.238022254592.issue3407@psf.upfronthosting.co.za> Message-ID: <1234461089.69.0.793606127779.issue3407@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:52:33 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:52:33 +0000 Subject: [issue3407] test_urllib2_localnet fails on MacOS X 10.4.11 (Intel) In-Reply-To: <1216406874.33.0.238022254592.issue3407@psf.upfronthosting.co.za> Message-ID: <1234461153.72.0.223079461905.issue3407@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:53:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:53:49 +0000 Subject: [issue3583] test_urllibnet.test_bad_address() fails when using OpenDNS In-Reply-To: <1219008061.86.0.538682955954.issue3583@psf.upfronthosting.co.za> Message-ID: <1234461229.91.0.656268657872.issue3583@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Tests -Library (Lib) nosy: +orsenthil stage: -> test needed versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:56:14 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:56:14 +0000 Subject: [issue1453973] addheaders for urlopen / open / xxxx_open Message-ID: <1234461374.6.0.725061332514.issue1453973@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil stage: -> test needed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:57:18 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:57:18 +0000 Subject: [issue1519816] urllib2 proxy does not work in 2.4.3 Message-ID: <1234461438.27.0.306409827771.issue1519816@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 18:58:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 17:58:34 +0000 Subject: [issue3702] test_urllib2.test_trivial fails when run from another Windows drive In-Reply-To: <1219845702.82.0.0720973084926.issue3702@psf.upfronthosting.co.za> Message-ID: <1234461514.43.0.709730229152.issue3702@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:00:36 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:00:36 +0000 Subject: [issue2244] urllib and urllib2 decode userinfo multiple times In-Reply-To: <1204819810.33.0.413464262118.issue2244@psf.upfronthosting.co.za> Message-ID: <1234461636.9.0.247191780016.issue2244@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil stage: -> test needed versions: +Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:01:52 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 12 Feb 2009 18:01:52 +0000 Subject: [issue5228] multiprocessing not compatible with functools.partial In-Reply-To: <1234448790.05.0.305625917638.issue5228@psf.upfronthosting.co.za> Message-ID: <1234461712.32.0.643993105701.issue5228@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Rather than implement a multiprocessing-specific fix, it would certainly be better to make functools.partial picklable, as pointed out in the ML thread Jesse linked to. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:03:29 2009 From: report at bugs.python.org (Jesse Noller) Date: Thu, 12 Feb 2009 18:03:29 +0000 Subject: [issue5228] multiprocessing not compatible with functools.partial In-Reply-To: <1234461712.32.0.643993105701.issue5228@psf.upfronthosting.co.za> Message-ID: <4222a8490902121003y7562b053i87aa631572d03e08@mail.gmail.com> Jesse Noller added the comment: > Antoine Pitrou added the comment: > > Rather than implement a multiprocessing-specific fix, it would certainly > be better to make functools.partial picklable, as pointed out in the ML > thread Jesse linked to. > I would tend to agree _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:07:09 2009 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 12 Feb 2009 18:07:09 +0000 Subject: [issue4998] __slots__ on Fraction is useless In-Reply-To: <1232368882.79.0.616892747667.issue4998@psf.upfronthosting.co.za> Message-ID: <1234462029.09.0.607204676575.issue4998@psf.upfronthosting.co.za> Mark Dickinson added the comment: Merged (manually) to py3k in r69547; svnmerged to 3.0 and 2.6 in r69548, r69549. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:08:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:08:01 +0000 Subject: [issue618023] imap handler in urllib(2) Message-ID: <1234462081.07.0.690026220974.issue618023@psf.upfronthosting.co.za> Daniel Diniz added the comment: Does imaplib cover this? ---------- components: +Library (Lib) -Extension Modules nosy: +ajaksu2, orsenthil versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:08:18 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:08:18 +0000 Subject: [issue1285440] Digest Authentication not working in all cases Message-ID: <1234462098.57.0.581414642371.issue1285440@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -Extension Modules nosy: +orsenthil stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:09:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:09:44 +0000 Subject: [issue1368368] prompt_user_passwd() in FancyURLopener masks 401 Unauthorized error page Message-ID: <1234462184.98.0.773326296459.issue1368368@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -None nosy: +orsenthil stage: -> test needed title: prompt_user_passwd() in FancyURLopener -> prompt_user_passwd() in FancyURLopener masks 401 Unauthorized error page type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:10:13 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:10:13 +0000 Subject: [issue1634770] Please provide rsync-method in the urllib[2] module Message-ID: <1234462213.68.0.0136738000857.issue1634770@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil stage: -> test needed versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:11:58 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:11:58 +0000 Subject: [issue1682241] Problems with urllib2 read() Message-ID: <1234462318.68.0.297167030283.issue1682241@psf.upfronthosting.co.za> Daniel Diniz added the comment: Patch has tests too (might need updating). ---------- nosy: +ajaksu2, orsenthil stage: -> patch review type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:12:19 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:12:19 +0000 Subject: [issue1682241] Problems with urllib2 read() Message-ID: <1234462339.58.0.554523649511.issue1682241@psf.upfronthosting.co.za> Changes by Daniel Diniz : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:12:33 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:12:33 +0000 Subject: [issue1682241] Problems with urllib2 read() Message-ID: <1234462353.2.0.420442601575.issue1682241@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:13:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:13:42 +0000 Subject: [issue1673007] urllib2 requests history + HEAD support Message-ID: <1234462422.91.0.901663360798.issue1673007@psf.upfronthosting.co.za> Daniel Diniz added the comment: Patch has tests too, might need updating. :) ---------- nosy: +ajaksu2, orsenthil stage: -> patch review type: -> feature request versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:14:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:14:47 +0000 Subject: [issue1424148] urllib.FancyURLopener.redirect_internal looses data on POST! Message-ID: <1234462487.77.0.732096867716.issue1424148@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +urllib2 POSTs on redirect nosy: +orsenthil stage: -> test needed type: -> behavior versions: +Python 2.6, Python 3.0 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:17:36 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:17:36 +0000 Subject: [issue1067702] urllib fails with multiple ftps Message-ID: <1234462656.31.0.53641645154.issue1067702@psf.upfronthosting.co.za> Daniel Diniz added the comment: OP supplied a detailed test. Needs confirmation. ---------- nosy: +ajaksu2, orsenthil stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:18:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:18:56 +0000 Subject: [issue1285086] urllib.quote is too slow Message-ID: <1234462736.73.0.62878843391.issue1285086@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:20:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:20:12 +0000 Subject: [issue4140] urllib2: request with digest auth through proxy fail In-Reply-To: <1224258333.01.0.331002758914.issue4140@psf.upfronthosting.co.za> Message-ID: <1234462812.65.0.202904451951.issue4140@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:21:34 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 12 Feb 2009 18:21:34 +0000 Subject: [issue1682241] Problems with urllib2 read() Message-ID: <1234462894.75.0.453996014199.issue1682241@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think the bug should be closed as invalid. seek() should only be implemented by genuinely seekable streams, which HTTP responses aren't. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:21:40 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:21:40 +0000 Subject: [issue4733] Add a "decode to declared encoding" version of urlopen to urllib In-Reply-To: <1230068654.82.0.881542673607.issue4733@psf.upfronthosting.co.za> Message-ID: <1234462900.07.0.110564831218.issue4733@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:23:53 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:23:53 +0000 Subject: [issue1599329] urllib(2) should allow automatic decoding by charset Message-ID: <1234463033.15.0.451534823505.issue1599329@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +Add a "decode to declared encoding" version of urlopen to urllib nosy: +orsenthil stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:24:23 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:24:23 +0000 Subject: [issue4733] Add a "decode to declared encoding" version of urlopen to urllib In-Reply-To: <1230068654.82.0.881542673607.issue4733@psf.upfronthosting.co.za> Message-ID: <1234463063.72.0.85420052419.issue4733@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +urllib(2) should allow automatic decoding by charset _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:25:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:25:59 +0000 Subject: [issue1349732] urllib.urlencode provides two features in one param Message-ID: <1234463159.51.0.094665800821.issue1349732@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil type: -> feature request versions: +Python 2.6 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:26:46 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:26:46 +0000 Subject: [issue1027206] unicode DNS names in socket, urllib, urlopen Message-ID: <1234463206.38.0.168764384517.issue1027206@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Unicode nosy: +haypo, orsenthil stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:27:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:27:34 +0000 Subject: [issue1327971] HTTPResponse instance has no attribute 'fileno' Message-ID: <1234463254.36.0.791675371803.issue1327971@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil versions: -Python 2.4, Python 2.5, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:28:48 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:28:48 +0000 Subject: [issue918368] urllib doesn't correct server returned urls Message-ID: <1234463328.91.0.0734451673941.issue918368@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +http_error_302() crashes with 'HTTP/1.1 400 Bad Request nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:29:31 2009 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 12 Feb 2009 18:29:31 +0000 Subject: [issue4151] Separate build dir broken In-Reply-To: <1234445556.88.0.573185737896.issue4151@psf.upfronthosting.co.za> Message-ID: <20090212182926.GD3683@arctrix.com> Neil Schemenauer added the comment: On Thu, Feb 12, 2009 at 01:32:37PM +0000, Matthias Klose wrote: > still seen on the 2.6 branch. applying r69374 on the branch doesn't fix > it there. The fix is spread over a number of commits: r69374, r69322, r69315, r69305, r69304, r69303, r69302. It could be backported but changing the build system is always fraught with portability traps and that's why it ends up turning to crud over time. Obviously most core Python developers don't build in a separate directory otherwise this feature won't have been broken for so long. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:29:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:29:49 +0000 Subject: [issue2600] BindingHTTPConnectionWithTimeout and BindingHTTPHandlerWithTimeout In-Reply-To: <1207688700.18.0.242817334294.issue2600@psf.upfronthosting.co.za> Message-ID: <1234463389.77.0.0723931198652.issue2600@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil stage: -> test needed versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:32:17 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 12 Feb 2009 18:32:17 +0000 Subject: [issue1368368] prompt_user_passwd() in FancyURLopener masks 401 Unauthorized error page Message-ID: <1234463537.09.0.480713286939.issue1368368@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Adding something like an `interactive=True` could do the trick (setting it to False meaning you don't want any password prompt or any other similar console interaction with the user). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:33:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:33:27 +0000 Subject: [issue3991] urllib.request.urlopen does not handle non-ASCII characters In-Reply-To: <1222627636.82.0.587488225038.issue3991@psf.upfronthosting.co.za> Message-ID: <1234463607.02.0.0111374759817.issue3991@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:37:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:37:06 +0000 Subject: [issue5072] urllib.open sends full URL after GET command instead of local path In-Reply-To: <1232997774.08.0.438260332945.issue5072@psf.upfronthosting.co.za> Message-ID: <1234463826.96.0.186529970666.issue5072@psf.upfronthosting.co.za> Daniel Diniz added the comment: Anyone against closing this as "works for me"? ---------- keywords: +patch nosy: +ajaksu2, orsenthil stage: -> test needed versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:38:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:38:39 +0000 Subject: [issue5038] urrlib2/httplib doesn't reset file position between requests In-Reply-To: <1232730438.9.0.904675957675.issue5038@psf.upfronthosting.co.za> Message-ID: <1234463919.28.0.719168700633.issue5038@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +ajaksu2, orsenthil stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:40:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:40:02 +0000 Subject: [issue4932] Little improvement on urlparse module, urlparse function. In-Reply-To: <1231867955.83.0.32658151911.issue4932@psf.upfronthosting.co.za> Message-ID: <1234464002.9.0.726995924922.issue4932@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil stage: -> test needed versions: +Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:44:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:44:50 +0000 Subject: [issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0 In-Reply-To: <1230586952.45.0.591912771259.issue4773@psf.upfronthosting.co.za> Message-ID: <1234464290.91.0.827464379043.issue4773@psf.upfronthosting.co.za> Daniel Diniz added the comment: ISTM that these issues tend to go all the way up to test coverage and organization :/ ---------- assignee: -> georg.brandl components: +Documentation nosy: +ajaksu2, georg.brandl, orsenthil stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:45:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:45:38 +0000 Subject: [issue4758] Python 3.0 internet documentation needs work In-Reply-To: <1230383680.06.0.695552325819.issue4758@psf.upfronthosting.co.za> Message-ID: <1234464338.31.0.83993980128.issue4758@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:47:57 2009 From: report at bugs.python.org (David W. Lambert) Date: Thu, 12 Feb 2009 18:47:57 +0000 Subject: [issue5032] itertools.count step In-Reply-To: <1234436269.66.0.0812186086859.issue5032@psf.upfronthosting.co.za> Message-ID: <84B204FFB016BA4984227335D8257FBA968E89@CVCV0XI05.na.corning.com> David W. Lambert added the comment: I run my shells with low priority so I can sneak around and kill them. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:48:25 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:48:25 +0000 Subject: [issue4675] urllib's splitpasswd does not accept newline chars in passwords In-Reply-To: <1229455632.0.0.358250268025.issue4675@psf.upfronthosting.co.za> Message-ID: <1234464505.26.0.103382617722.issue4675@psf.upfronthosting.co.za> Daniel Diniz added the comment: Inline test included in the patch. ---------- nosy: +ajaksu2, orsenthil stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:50:00 2009 From: report at bugs.python.org (=?utf-8?q?Fran=C3=A7ois_Granade?=) Date: Thu, 12 Feb 2009 18:50:00 +0000 Subject: [issue3002] shutil.copyfile blocks indefinitely on named pipes In-Reply-To: <1212075150.42.0.761610345558.issue3002@psf.upfronthosting.co.za> Message-ID: <1234464600.64.0.785436439037.issue3002@psf.upfronthosting.co.za> Fran?ois Granade added the comment: Note that the 'cp' user command in Linux blocks also. Although this is *very* painful, you could argue that since the OS commands do the same thing, it shouldn't be fixed. ---------- nosy: +farialima _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:50:40 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:50:40 +0000 Subject: [issue3428] httplib.HTTPMessage undocumented In-Reply-To: <1216746541.05.0.162492292768.issue3428@psf.upfronthosting.co.za> Message-ID: <1234464640.66.0.759006833355.issue3428@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +ajaksu2, orsenthil priority: -> normal stage: -> needs patch type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:53:13 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:53:13 +0000 Subject: [issue3849] FUD in documentation for urllib.urlopen() In-Reply-To: <1221246343.23.0.128587140594.issue3849@psf.upfronthosting.co.za> Message-ID: <1234464793.81.0.493284416157.issue3849@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil stage: -> needs patch versions: +Python 2.6, Python 3.0 -Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:59:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 18:59:01 +0000 Subject: [issue2637] urllib.quote() escapes characters unnecessarily and contrary to docs In-Reply-To: <1208272151.95.0.897886992301.issue2637@psf.upfronthosting.co.za> Message-ID: <1234465141.54.0.951849506251.issue2637@psf.upfronthosting.co.za> Daniel Diniz added the comment: @Tom: issue 1712522 tracks Unicode support. ---------- assignee: -> georg.brandl components: +Documentation dependencies: +urllib.quote throws exception on Unicode URL keywords: +easy nosy: +ajaksu2, ezio.melotti, georg.brandl, haypo, orsenthil stage: -> test needed versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:03:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 19:03:39 +0000 Subject: [issue3427] urllib documentation: urlopen().info() return type In-Reply-To: <1216746335.31.0.451776222673.issue3427@psf.upfronthosting.co.za> Message-ID: <1234465419.89.0.0554730992394.issue3427@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +httplib.HTTPMessage undocumented nosy: +orsenthil stage: -> needs patch versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:03:48 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 19:03:48 +0000 Subject: [issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0 In-Reply-To: <1230586952.45.0.591912771259.issue4773@psf.upfronthosting.co.za> Message-ID: <1234465428.61.0.910494910001.issue4773@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +httplib.HTTPMessage undocumented _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:14:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 19:14:38 +0000 Subject: [issue4493] urllib2 doesn't always supply / where URI path component is empty In-Reply-To: <1228250772.41.0.047917224679.issue4493@psf.upfronthosting.co.za> Message-ID: <1234466079.0.0.506959970331.issue4493@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +urllib2 can't handle http://www.wikispaces.com nosy: +orsenthil stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:24:05 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Thu, 12 Feb 2009 19:24:05 +0000 Subject: [issue5229] Documentation for super() neglects to say what super() actually does In-Reply-To: <1234466645.34.0.103434314376.issue5229@psf.upfronthosting.co.za> Message-ID: <1234466645.34.0.103434314376.issue5229@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : The documentation for super() describes the arguments that can be passed to super(), use cases for super(), an example, and caveats about what cannot be done with the returned object. However, the documentation neglects to mention what super() actually *does*, except for the circular definition in the first line: "Return a super object that acts as a proxy to superclasses of type." Worse still, the definition in the first line is incorrect, since it may proxy any type in the type hierarchy (not necessarily a superclass). I found this webpage helpful for understanding what super() actually does: http://fuhm.net/super-harmful/ I would submit a suggested improvement to the documentation, but I do not really understand what super() does when the second argument is omitted or a class. ---------- assignee: georg.brandl components: Documentation messages: 81804 nosy: georg.brandl, stutzbach severity: normal status: open title: Documentation for super() neglects to say what super() actually does versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:24:58 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 12 Feb 2009 19:24:58 +0000 Subject: [issue1285086] urllib.quote is too slow Message-ID: <1234466698.44.0.83122582955.issue1285086@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If someone needs a faster quote(), it's probably easy to write an insanely fast C version... ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:28:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 19:28:11 +0000 Subject: [issue404444] [IDLE] auto indent/parentheses Message-ID: <1234466891.09.0.439902849113.issue404444@psf.upfronthosting.co.za> Daniel Diniz added the comment: Auto-indent and parenthesis matching already work, Tab triggers auto-completion, but indention can be increased/decreased with Ctrl + ] / Ctrl + [ ---------- nosy: +ajaksu2 resolution: later -> out of date status: open -> closed versions: +Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:32:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 19:32:43 +0000 Subject: [issue214033] re incompatibility in sre Message-ID: <1234467163.54.0.576443924265.issue214033@psf.upfronthosting.co.za> Daniel Diniz added the comment: Jeffrey, Collin, thanks for reviewing. ---------- nosy: +ajaksu2 resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:35:13 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 19:35:13 +0000 Subject: [issue433024] SRE: (?flag) isn't properly scoped Message-ID: <1234467313.63.0.838808525947.issue433024@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +Major reworking of Python 2.5.2 re module versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:36:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 19:36:06 +0000 Subject: [issue433027] SRE: (?-flag) is not supported. Message-ID: <1234467366.78.0.516202357101.issue433027@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +Major reworking of Python 2.5.2 re module versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:40:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 19:40:47 +0000 Subject: [issue444582] Finding programs in PATH, addition to os Message-ID: <1234467647.99.0.52267591018.issue444582@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -None nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:42:32 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 19:42:32 +0000 Subject: [issue459007] Document sys.path on Windows Message-ID: <1234467752.95.0.0503625444292.issue459007@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +ajaksu2 stage: -> needs patch type: -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:45:22 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 19:45:22 +0000 Subject: [issue460474] codecs.StreamWriter: reset() on close() Message-ID: <1234467922.93.0.601128271951.issue460474@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -None nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:51:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 19:51:11 +0000 Subject: [issue231540] threads and profiler don't work together Message-ID: <1234468271.55.0.266582448372.issue231540@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed as of (around) rev69500. ---------- nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:55:50 2009 From: report at bugs.python.org (Lukas Lueg) Date: Thu, 12 Feb 2009 19:55:50 +0000 Subject: [issue4751] Patch for better thread support in hashlib In-Reply-To: <1230298756.92.0.632482701363.issue4751@psf.upfronthosting.co.za> Message-ID: <1234468550.11.0.678666092927.issue4751@psf.upfronthosting.co.za> Lukas Lueg added the comment: Patch for 2.7 Added file: http://bugs.python.org/file13057/hashlibopenssl_gil_py27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:58:15 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 19:58:15 +0000 Subject: [issue626452] Support RFC 2111 in email package Message-ID: <1234468695.92.0.625702720845.issue626452@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -None nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:58:23 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 19:58:23 +0000 Subject: [issue665194] datetime-RFC2822 roundtripping Message-ID: <1234468703.32.0.83635672104.issue665194@psf.upfronthosting.co.za> Daniel Diniz added the comment: Patch includes tests, should be updated. ---------- components: +Library (Lib) -None keywords: +patch nosy: +ajaksu2 stage: -> needs patch versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 20:58:48 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 19:58:48 +0000 Subject: [issue515074] Extended storage in new-style classes Message-ID: <1234468728.24.0.313217534077.issue515074@psf.upfronthosting.co.za> Daniel Diniz added the comment: Seems very out of date. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 21:00:33 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 20:00:33 +0000 Subject: [issue539907] Tkinter lock conflicts extension widgets Message-ID: <1234468833.16.0.153580302128.issue539907@psf.upfronthosting.co.za> Daniel Diniz added the comment: No reply from OP, will close unless someone argues against it. ---------- nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 21:01:24 2009 From: report at bugs.python.org (Ned Deily) Date: Thu, 12 Feb 2009 20:01:24 +0000 Subject: [issue5225] OS X "Update Shell Profile" may not update $PATH if run more than once In-Reply-To: <1234440346.58.0.444916712806.issue5225@psf.upfronthosting.co.za> Message-ID: <1234468884.73.0.688998057052.issue5225@psf.upfronthosting.co.za> Ned Deily added the comment: I agree the patch is not a good solution but it is relatively safe. I suppose the current buggy behavior of Update Shell Profile *does* limit the growth to the number of Python versions you've installed. However the patch does allow users not comfortable with shell scripts to move between versions. On the other hand, they can always use the various IDLEs. This whole area of PATH manipulation and symlinks for OS X could use a good re- thinking; a lot of cruft has accumulated over the years and it gets worse with 4-way builds. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 21:02:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 20:02:06 +0000 Subject: [issue665336] win32 os.path.normpath not correct for leading slash cases Message-ID: <1234468926.56.0.108947391012.issue665336@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Windows stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 21:03:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 20:03:12 +0000 Subject: [issue513840] entity unescape for sgml/htmllib Message-ID: <1234468992.77.0.802649266038.issue513840@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 21:10:41 2009 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 12 Feb 2009 20:10:41 +0000 Subject: [issue539907] Tkinter lock conflicts extension widgets Message-ID: <1234469441.34.0.892811892204.issue539907@psf.upfronthosting.co.za> Guilherme Polo added the comment: Why close ? It is still a valid feature request (with no patch yet). ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 21:29:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 12 Feb 2009 20:29:12 +0000 Subject: [issue539907] Tkinter lock conflicts extension widgets Message-ID: <1234470552.45.0.090178144526.issue539907@psf.upfronthosting.co.za> Daniel Diniz added the comment: Leaving open, then :) Thanks! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 21:37:55 2009 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 12 Feb 2009 20:37:55 +0000 Subject: [issue460474] codecs.StreamWriter: reset() on close() Message-ID: <1234471075.54.0.454500309194.issue460474@psf.upfronthosting.co.za> Changes by Marc-Andre Lemburg : ---------- stage: test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 21:39:02 2009 From: report at bugs.python.org (David W. Lambert) Date: Thu, 12 Feb 2009 20:39:02 +0000 Subject: [issue5229] Documentation for super() neglects to say what super() actually does In-Reply-To: <1234466645.34.0.103434314376.issue5229@psf.upfronthosting.co.za> Message-ID: <1234471142.89.0.246616241334.issue5229@psf.upfronthosting.co.za> Changes by David W. Lambert : ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 21:48:11 2009 From: report at bugs.python.org (John J Lee) Date: Thu, 12 Feb 2009 20:48:11 +0000 Subject: [issue918368] urllib doesn't correct server returned urls Message-ID: <1234471691.21.0.561538277986.issue918368@psf.upfronthosting.co.za> John J Lee added the comment: Mike's list is missing one more character, "%" itself. So, the replacement should be: quote(newurl, safe="%/:=&?~#+!$,;'@()*[]") The replacement should be done in the .open() method, not in the code that handles redirects. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 21:51:31 2009 From: report at bugs.python.org (John J Lee) Date: Thu, 12 Feb 2009 20:51:31 +0000 Subject: [issue918368] urllib doesn't correct server returned urls Message-ID: <1234471891.81.0.793877459458.issue918368@psf.upfronthosting.co.za> John J Lee added the comment: A suitable test would be to derive a urllib.URLOpener subclass that has an open_spam(url) method which records the URL. Then call .open("spam://") in the test and verify that the URL has been quoted. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 22:09:09 2009 From: report at bugs.python.org (John J Lee) Date: Thu, 12 Feb 2009 21:09:09 +0000 Subject: [issue918368] urllib doesn't correct server returned urls Message-ID: <1234472949.11.0.694815972064.issue918368@psf.upfronthosting.co.za> John J Lee added the comment: Uh, that should have beeen something like .open("spam://example.com/%2E/") of course. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 22:10:22 2009 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 12 Feb 2009 21:10:22 +0000 Subject: [issue3407] test_urllib2_localnet fails on MacOS X 10.4.11 (Intel) In-Reply-To: <1216406874.33.0.238022254592.issue3407@psf.upfronthosting.co.za> Message-ID: <1234473022.92.0.193202231241.issue3407@psf.upfronthosting.co.za> Roumen Petrov added the comment: May be same as issue4666 ? ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 22:16:01 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Feb 2009 21:16:01 +0000 Subject: [issue3745] _sha256 et al. encode to UTF-8 by default In-Reply-To: <1220261226.32.0.128110321757.issue3745@psf.upfronthosting.co.za> Message-ID: <1234473361.28.0.674924568024.issue3745@psf.upfronthosting.co.za> Gregory P. Smith added the comment: fixed in release30-maint r69555. sounds like its out of the question for 2.6. i will backport it to trunk. ---------- keywords: +26backport versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 22:16:28 2009 From: report at bugs.python.org (Jean-Paul Calderone) Date: Thu, 12 Feb 2009 21:16:28 +0000 Subject: [issue5230] pydoc reports misleading failure if target module raises an ImportError In-Reply-To: <1234473388.92.0.353382315269.issue5230@psf.upfronthosting.co.za> Message-ID: <1234473388.92.0.353382315269.issue5230@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : If pydoc is used to try to look up the documentation for a module which does not exist, this is reported reasonably: exarkun at charm:~$ pydoc foobarbaz no Python documentation found for 'foobarbaz' exarkun at charm:~$ However, if it is used to look up the documentation for a module which does exist but which itself imports a module which does not exist, then the same report is made: exarkun at charm:~$ cat > foobarbaz.py import barbazquux exarkun at charm:~$ pydoc foobarbaz no Python documentation found for 'foobarbaz' exarkun at charm:~$ This is somewhat misleading, since it suggests that there is no such module "foobarbaz", when the problem is solved by installing the module "barbazquux": exarkun at charm:~$ touch barbazquux.py exarkun at charm:~$ pydoc foobarbaz Help on module foobarbaz: ... exarkun at charm:~$ I'm sure the cause of this is the incautious handling of ImportError by pydoc, resulting in the mistaken identification of the problem. ---------- messages: 81821 nosy: exarkun severity: normal status: open title: pydoc reports misleading failure if target module raises an ImportError type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 22:33:34 2009 From: report at bugs.python.org (Adam Olsen) Date: Thu, 12 Feb 2009 21:33:34 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234474414.21.0.240785638217.issue5186@psf.upfronthosting.co.za> Adam Olsen added the comment: Antoine, x ^= x>>4 has a higher collision rate than just a rotate. However, it's still lower than a statistically random hash. If you modify the benchmark to randomly discard 90% of its contents this should give you random addresses, reflecting a long-running program. Here's the results I got (I used shift, too lazy to rotate): XOR, sequential: 20.174627065692999 XOR, random: 30.460708379770004 shift, sequential: 19.148091554626003 shift, random: 30.495631933229998 original, sequential: 23.736469268799997 original, random: 33.536177158379999 Not massive, but still worth fixing the hash. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 22:39:03 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 12 Feb 2009 21:39:03 +0000 Subject: [issue5231] Change format of a memoryview In-Reply-To: <1234474743.76.0.794318305676.issue5231@psf.upfronthosting.co.za> Message-ID: <1234474743.76.0.794318305676.issue5231@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Memoryview objects provide a structured view over a memory area, meaning the length, indexing and slicing operations respect the itemsize: >>> import array >>> a = array.array('i', [1,2,3]) >>> m = memoryview(a) >>> len(a) 3 >>> m.itemsize 4 >>> m.format 'i' However, in some cases, you want the memoryview to behave as a chunk of pure bytes regardless of the original object *and without making a copy*. Therefore, it would be handy to be able to change the format of the memoryview, or ask for a new memoryview with another format. An example of use could be: >>> a = array.array('i', [1,2,3]) >>> m = memoryview(a).with_format('B') >>> len(a), m.itemsize, m.format (12, 1, 'B') ---------- components: Interpreter Core messages: 81823 nosy: gregory.p.smith, ncoghlan, pitrou, teoliphant priority: normal severity: normal status: open title: Change format of a memoryview type: feature request versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 22:47:21 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 12 Feb 2009 21:47:21 +0000 Subject: [issue5231] Change format of a memoryview In-Reply-To: <1234474743.76.0.794318305676.issue5231@psf.upfronthosting.co.za> Message-ID: <1234475241.23.0.466615525707.issue5231@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (Another way to see it is as supplying a Python equivalent to the C buffer API, with access to the raw Py_buffer) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 22:53:27 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 21:53:27 +0000 Subject: [issue4751] Patch for better thread support in hashlib In-Reply-To: <1230298756.92.0.632482701363.issue4751@psf.upfronthosting.co.za> Message-ID: <1234475607.13.0.0288711653691.issue4751@psf.upfronthosting.co.za> STINNER Victor added the comment: @ebfe: Your patch is very close to r68411 (patch for py3k), and so it looks correct (I didn't test it). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 22:58:13 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 21:58:13 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1234475893.62.0.258814790748.issue1712522@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +Unicode nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 22:58:27 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 21:58:27 +0000 Subject: [issue2637] urllib.quote() escapes characters unnecessarily and contrary to docs In-Reply-To: <1208272151.95.0.897886992301.issue2637@psf.upfronthosting.co.za> Message-ID: <1234475907.33.0.300125390171.issue2637@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 23:05:43 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Feb 2009 22:05:43 +0000 Subject: [issue5229] Documentation for super() neglects to say what super() actually does In-Reply-To: <1234466645.34.0.103434314376.issue5229@psf.upfronthosting.co.za> Message-ID: <1234476343.93.0.865574969656.issue5229@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I will work on this a bit more. Keep in mind that it will be hard to please the author of that article, as he finds the whole notion of multiple inheritance to be bankrupt. ---------- assignee: georg.brandl -> rhettinger nosy: +rhettinger priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 23:08:26 2009 From: report at bugs.python.org (Mitchell Model) Date: Thu, 12 Feb 2009 22:08:26 +0000 Subject: [issue5232] Setting font from preference dialog in IDLE on OS X broken In-Reply-To: <1234476506.45.0.29629224735.issue5232@psf.upfronthosting.co.za> Message-ID: <1234476506.45.0.29629224735.issue5232@psf.upfronthosting.co.za> New submission from Mitchell Model : When setting the font in IDLE's Preferences dialog on OSX, having started IDLE from the command line, the font is changed and the following is printed: Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/tkinter /__init__.py", line 1399, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/idlelib /configDialog.py", line 1125, in Ok self.Apply() File "/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/idlelib /configDialog.py", line 1129, in Apply self.DeactivateCurrentConfig() File "/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/idlelib /configDialog.py", line 1107, in DeactivateCurrentConfig winInstances = self.parent.instance_dict.keys() File "/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/tkinter /__init__.py", line 1708, in __getattr__ return getattr(self.tk, attr) AttributeError: 'tkapp' object has no attribute 'instance_dict' ---------- components: IDLE messages: 81827 nosy: MLModel severity: normal status: open title: Setting font from preference dialog in IDLE on OS X broken versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 23:14:03 2009 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Feb 2009 22:14:03 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1234476843.96.0.936279088185.issue1712522@psf.upfronthosting.co.za> STINNER Victor added the comment: quote() works in Python3 with any bytes string (not only ASCII) and any unicode string: Python 3.1a0 (py3k:69105M, Feb 3 2009, 15:04:35) >>> from urllib.parse import quote >>> quote('?') '%C3%A9' >>> quote('\xe9') '%C3%A9' >>> quote('\xe9'.encode('utf-8')) '%C3%A9' >>> quote('\xe9'.encode('latin-1')) '%E9' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 23:18:32 2009 From: report at bugs.python.org (Daniel Stutzbach) Date: Thu, 12 Feb 2009 22:18:32 +0000 Subject: [issue5229] Documentation for super() neglects to say what super() actually does In-Reply-To: <1234466645.34.0.103434314376.issue5229@psf.upfronthosting.co.za> Message-ID: <1234477112.97.0.619399175193.issue5229@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: Yes, by citing that article I don't mean to endorse its opinions. Regrettably, it's the best documentation on super() I could find (in an admittedly quick search). Any improvements efforts you make to improve the existing super() documentation would much appreciated. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 23:33:47 2009 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 12 Feb 2009 22:33:47 +0000 Subject: [issue5225] OS X "Update Shell Profile" may not update $PATH if run more than once In-Reply-To: <1234440346.58.0.444916712806.issue5225@psf.upfronthosting.co.za> Message-ID: <1234478027.31.0.64125190286.issue5225@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I agree that we need a better solution to select which version of Python is the default one of your path. One way to do that is to have a tool that can change the "Current" link inside the framework, that way we could have /Library/Frameworks/Python.framework/Version/Current/bin early on $PATH and add the various version directories after that. I'd also like to see a per-user way to change the default python without manually editing the shell profile. W.r.t. to the myriad of other variations in a 4-way universal build: those are necessary to ensure that you can easily force the use of a 32- bit or 64-bit build because at the time a lot of GUI code required 32- bit code. I hope this will change over time, I'd love to have a much simpler framework that contains only a single copy of the python executable instead of the 3 variants that are currently present in a 4- way universal build. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 23:34:42 2009 From: report at bugs.python.org (Mitchell Model) Date: Thu, 12 Feb 2009 22:34:42 +0000 Subject: [issue5233] Enhance 2.7 IDLE to exec IDLESTARTUP/PYTHONSTARTUP on restart In-Reply-To: <1234478082.8.0.463106292983.issue5233@psf.upfronthosting.co.za> Message-ID: <1234478082.8.0.463106292983.issue5233@psf.upfronthosting.co.za> New submission from Mitchell Model : The main thing the patch does is: modify the subprocess restart procedure so that it reloads whatever file, if any, was loaded when IDLE first started and looked for IDLESTARTUP then PYTHONSTARTUP environment variables. In addition: a -q option is added for starting IDLE on the command line to mean "quiet", as with Emacs, e.g., to suppress loading of IDLESTARTUP or PYTHONSTARTUP The former effect of -s would now be the default, which is desirable so double-clicking an IDLE icon to start it will cause the startup file to run. -s is changed to take an argument that is an alternate startup file to use I am a bit concerned about changing -s to have a different meaning. Perhaps it's better to leave -s as an option that is simplhy superfluous and use a different letter for the alternate startup. ---------- components: IDLE files: PyShell-2.7.diff keywords: patch messages: 81831 nosy: MLModel severity: normal status: open title: Enhance 2.7 IDLE to exec IDLESTARTUP/PYTHONSTARTUP on restart type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file13058/PyShell-2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 23:35:29 2009 From: report at bugs.python.org (Mitchell Model) Date: Thu, 12 Feb 2009 22:35:29 +0000 Subject: [issue5234] Enhance 3.1 IDLE to exec IDLESTARTUP/PYTHONSTARTUP on restart In-Reply-To: <1234478129.58.0.678019243108.issue5234@psf.upfronthosting.co.za> Message-ID: <1234478129.58.0.678019243108.issue5234@psf.upfronthosting.co.za> New submission from Mitchell Model : The main thing the patch does is: modify the subprocess restart procedure so that it reloads whatever file, if any, was loaded when IDLE first started and looked for IDLESTARTUP then PYTHONSTARTUP environment variables. In addition: a -q option is added for starting IDLE on the command line to mean "quiet", as with Emacs, e.g., to suppress loading of IDLESTARTUP or PYTHONSTARTUP The former effect of -s would now be the default, which is desirable so double-clicking an IDLE icon to start it will cause the startup file to run. -s is changed to take an argument that is an alternate startup file to use I am a bit concerned about changing -s to have a different meaning. Perhaps it's better to leave -s as an option that is simplhy superfluous and use a different letter for the alternate startup. ---------- components: IDLE files: PyShell-3.1.diff keywords: patch messages: 81832 nosy: MLModel severity: normal status: open title: Enhance 3.1 IDLE to exec IDLESTARTUP/PYTHONSTARTUP on restart type: behavior versions: Python 3.1 Added file: http://bugs.python.org/file13059/PyShell-3.1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 23:40:55 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Feb 2009 22:40:55 +0000 Subject: [issue5234] Enhance 3.1 IDLE to exec IDLESTARTUP/PYTHONSTARTUP on restart In-Reply-To: <1234478129.58.0.678019243108.issue5234@psf.upfronthosting.co.za> Message-ID: <1234478455.26.0.855733282011.issue5234@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> kbk nosy: +kbk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 23:43:00 2009 From: report at bugs.python.org (Eric Swenson) Date: Thu, 12 Feb 2009 22:43:00 +0000 Subject: [issue5235] distutils seems to only work with VC++ 2008 (9.0) In-Reply-To: <1234478580.55.0.077455747153.issue5235@psf.upfronthosting.co.za> Message-ID: <1234478580.55.0.077455747153.issue5235@psf.upfronthosting.co.za> New submission from Eric Swenson : Building python extensions using distutils in python 2.6 with only VC++ 2005 installed no longer works. distutils appears to require VC++ 2008. The documentation on building extensions for Python 2.6 seems to suggest that VC++ 2008, while preferred, is not required and that it should be possible to build extensions with VC++ 2005. distutils appears to look for vcvarsall.bat in the VC++ 9.0 directories. It decides to use 9.0 based on the return value of distutils.msvc9compiler.find_build_version, which returns 9.0 -- presumably because python 2.6 was built on VC++ 9.0 (2008). Why is does it no longer search for older versions of VC++ (like 2005)? Is this a bug in distutils? If VC++ 2008 (9.0) is required to build extensions, then the python 2.6 web site should make this clear. ---------- assignee: tarek components: Distutils messages: 81833 nosy: eswenson, tarek severity: normal status: open title: distutils seems to only work with VC++ 2008 (9.0) versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 23:50:34 2009 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 12 Feb 2009 22:50:34 +0000 Subject: [issue5236] time.strptime should reject bytes arguments on Py3 In-Reply-To: <1234479034.17.0.353291380083.issue5236@psf.upfronthosting.co.za> Message-ID: <1234479034.17.0.353291380083.issue5236@psf.upfronthosting.co.za> New submission from Ezio Melotti : On Python3 time.strptime(string[, format]) accepts bytes as arguments and then fails: >>> strptime(b"2009", "%Y") Traceback (most recent call last): File "", line 1, in File "C:\Programs\Python30\lib\_strptime.py", line 454, in _strptime_time return _strptime(data_string, format)[0] File "C:\Programs\Python30\lib\_strptime.py", line 322, in _strptime found = format_regex.match(data_string) TypeError: can't use a string pattern on a bytes-like object time.strftime already rejects bytes arguments: >>> strftime(b'%Y') Traceback (most recent call last): File "", line 1, in TypeError: strftime() argument 1 must be str, not bytes time.strptime should do the same and reject bytes for both the arguments (string and format). (With Py2.x both str and unicode args work.) ---------- components: Library (Lib), Unicode messages: 81834 nosy: ezio.melotti severity: normal status: open title: time.strptime should reject bytes arguments on Py3 type: behavior versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 23:56:52 2009 From: report at bugs.python.org (Ned Deily) Date: Thu, 12 Feb 2009 22:56:52 +0000 Subject: [issue5232] Setting font from preference dialog in IDLE on OS X broken In-Reply-To: <1234476506.45.0.29629224735.issue5232@psf.upfronthosting.co.za> Message-ID: <1234479412.9.0.282909912329.issue5232@psf.upfronthosting.co.za> Ned Deily added the comment: FWIW, I am not able to reproduce this using a release3.0 IDLE (so with today's patches) built with the default Apple-supplied Tcl/Tk in 10.5. Are you using a newer Tcl/Tk? Does it happen if you move your current preferences out of ~/.idlerc? ---------- nosy: +nad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 00:03:54 2009 From: report at bugs.python.org (Collin Winter) Date: Thu, 12 Feb 2009 23:03:54 +0000 Subject: [issue4751] Patch for better thread support in hashlib In-Reply-To: <1230298756.92.0.632482701363.issue4751@psf.upfronthosting.co.za> Message-ID: <1234479834.74.0.478175943837.issue4751@psf.upfronthosting.co.za> Changes by Collin Winter : ---------- nosy: +collinwinter, jyasskin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 00:20:38 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Thu, 12 Feb 2009 23:20:38 +0000 Subject: [issue5235] distutils seems to only work with VC++ 2008 (9.0) In-Reply-To: <1234478580.55.0.077455747153.issue5235@psf.upfronthosting.co.za> Message-ID: <1234480838.83.0.082685652345.issue5235@psf.upfronthosting.co.za> Tarek Ziad? added the comment: distutils will use the same compiler used to build Python. If you want to build with a previous version of MSVC, you need to compile Python with that particular version. That said, MSVCCompiler could probably take new options, to force the MSVC version and the arch. This is in theory. Are you willing to help me build that patch ? Some tests on your system would be appreciated. ---------- priority: -> normal type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 00:28:49 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 12 Feb 2009 23:28:49 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> New submission from Terry J. Reedy : 3.x str.format() format strings denote replacement fields with braces {}. Currently, replacement fields *must* contain "either the numeric index of a positional argument, or the name of a keyword argument". [lib ref / builtin types / sequence types / string methods /str.format()] For simple sequential positional replacements, such as: "{0} is {1} {2}".format('Numbering fields', 'an annoying', 'nuisance') the writer has to do what computers are so good at, counting, and what was *not* required with % interpolation, where one could write more simply "%s is %s %s" % (('Auto-numbering', 'a convenient', 'feature') . Proposal: Allow field names to be omitted for all fields in a string and then default to 0, 1, ... so one could also write "{} is {} {}".format('Auto-numbering', 'a convenient', 'feature' This proposal is currently all or nothing for simplicity of description and presumed ease of implementation. The patch to the doc could then be "If all replacement fields are left blank, then sequential indexes 0, 1, ... will be automatically inserted." inserted after the phrase quoted above. Mixing blank and non-blank specs would then be an error and raise an exception. This idea was posted today on Python-ideas thread "String formatting and named tuple". So far, +1 from Aahz, Raymond Hettinger, and Mathias Panzenbock. ---------- components: Interpreter Core messages: 81837 nosy: tjreedy severity: normal status: open title: Allow auto-numbered replacement fields in str.format() strings type: feature request versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 00:33:45 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Thu, 12 Feb 2009 23:33:45 +0000 Subject: [issue2437] Distutils runtime_library_dirs broken on Windows In-Reply-To: <1206044595.46.0.100105317073.issue2437@psf.upfronthosting.co.za> Message-ID: <1234481625.9.0.679435447613.issue2437@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Bill, do you have a example to reproduce the problem so I can write the test ? Laurent, right. but we need to figure out how to get the CC name in MinGW/Cygwin environment. I am not familiar with them. Does CC gets set in the environment ? if so we could use a similar mechanism that we have in customize_compiler() ---------- versions: +Python 2.7, Python 3.1 -Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 00:53:37 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Feb 2009 23:53:37 +0000 Subject: [issue5231] Change format of a memoryview In-Reply-To: <1234474743.76.0.794318305676.issue5231@psf.upfronthosting.co.za> Message-ID: <1234482817.22.0.0853541124653.issue5231@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Agreed, this would be useful. See http://codereview.appspot.com/12470/show if anyone doesn't believe us. ;) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 01:02:22 2009 From: report at bugs.python.org (Eric Swenson) Date: Fri, 13 Feb 2009 00:02:22 +0000 Subject: [issue5235] distutils seems to only work with VC++ 2008 (9.0) In-Reply-To: <1234480838.83.0.082685652345.issue5235@psf.upfronthosting.co.za> Message-ID: Eric Swenson added the comment: Hi Tarek, I have been debugging this and found the following: If you set the DISTUTILS_USE_SDK environment variable to any value (I used DISTUTILS_USE_SDK=1) and the MSSdk environment variable to anything (I used MSSdk=1), and you manually run the "vcvarsall.bat" file that a VC++ user should find in his "c:/Program Files/Visual Studio 8/VC" directory, then easy_install/setuptools/distutils works fine for building extensions. It would appear that if you set those environment variables, and the "cl.exe", and "link.exe", etc. commands can be found on the path (the vcvarsall.bat file would have done this), then distutils.MSVCompiler (msvc9compiler) is perfectly happy to build the extension. That said, I think it would be nice to have a means of making this more painless. I'm more than happy to help out. If you have things for me to try/test, I'll be happy to do that. Since the compiler class is located automatically, and I don't know much about distutils, I don't, off the top of my head, know how to elegantly provide options to the not-yet-determined compiler class. (I'm sure you could point me in the right direction...) I have a vmware VM setup with windows xp, python 2.6, and VC++ 2008 to use for testing, so please let me know how I can best be of assistance. Thanks. -- Eric On Thu, Feb 12, 2009 at 3:20 PM, Tarek Ziad? wrote: > > Tarek Ziad? added the comment: > > distutils will use the same compiler used to build Python. > > If you want to build with a previous version of MSVC, you need to > compile Python with that particular version. > > That said, MSVCCompiler could probably take new options, to force the > MSVC version and the arch. > > This is in theory. Are you willing to help me build that patch ? > > Some tests on your system would be appreciated. > > ---------- > priority: -> normal > type: -> feature request > versions: +Python 2.7, Python 3.1 -Python 2.6 > > _______________________________________ > Python tracker > > _______________________________________ > Added file: http://bugs.python.org/file13060/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Fri Feb 13 01:16:15 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Feb 2009 00:16:15 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234484175.33.0.335948883802.issue5237@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 01:17:28 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 13 Feb 2009 00:17:28 +0000 Subject: [issue5110] Printing Unicode chars from the interpreter in a non-UTF8 terminal raises an error (Py3) In-Reply-To: <1233329209.55.0.55287436123.issue5110@psf.upfronthosting.co.za> Message-ID: <1234484248.33.0.430492360019.issue5110@psf.upfronthosting.co.za> Ezio Melotti added the comment: I've also noticed that if an error contains non-encodable characters, they are escaped: >>> raise ValueError("\u2620 can't be printed here, but '\u00e8' works fine!") Traceback (most recent call last): File "", line 1, in ValueError: \u2620 can't be printed here, but '?' works fine! but: >>> "\u2620 can't be printed here, but '\u00e8' works fine!" UnicodeEncodeError: 'charmap' codec can't encode character '\u2620' in position 1: character maps to The mechanism used to escape errors is even better than my patch, because it escapes only the chars that can't be encoded, instead of escaping every non-ascii chars when at least one char can't be encoded: >>> "\u2620 can't be printed here, but '\u00e8' works fine!" "\u2620 can't be printed here, but '\xe8' works fine!" I wonder if we can reuse the same mechanism here. By the way, the patch I proposed in msg80852 is just a proof of concept, if you think it's OK, someone will probably have to implement it in C. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 01:34:38 2009 From: report at bugs.python.org (David Christian) Date: Fri, 13 Feb 2009 00:34:38 +0000 Subject: [issue5238] ssl makefile never closes socket In-Reply-To: <1234485278.29.0.554185864263.issue5238@psf.upfronthosting.co.za> Message-ID: <1234485278.29.0.554185864263.issue5238@psf.upfronthosting.co.za> New submission from David Christian : The ssl.py makefile function returns a socket._fileobject object with a reference to itself, and also increments the makefile_refs variable. However, the _fileobject is created with the parameter close=False, which means that when you call _fileobject.close, it does not call close on the ssl socket! >>> import socket, ssl >>> s = socket.create_connection(('www.rpath.com', 443)) >>> sslSocket = ssl.wrap_socket(s) >>> f1 = sslSocket.makefile() >>> f2 = sslSocket.makefile() >>> f3 = sslSocket.makefile() >>> sslSocket._makefile_refs 3 >>> sslSocket._sock >>> sslSocket.close() >>> f1.close() >>> f2.close() >>> f3.close() >>> sslSocket._makefile_refs 2 The quick fix is to add close=True on the _fileobject call in ssl.py. Note that this close=True is _not_ needed in the socket.py makefile call as that makefile does not do reference counting. ---------- messages: 81842 nosy: dugan severity: normal status: open title: ssl makefile never closes socket versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 01:43:39 2009 From: report at bugs.python.org (David Christian) Date: Fri, 13 Feb 2009 00:43:39 +0000 Subject: [issue5238] ssl makefile never closes socket In-Reply-To: <1234485278.29.0.554185864263.issue5238@psf.upfronthosting.co.za> Message-ID: <1234485819.59.0.686810491613.issue5238@psf.upfronthosting.co.za> Changes by David Christian : ---------- components: +Library (Lib) keywords: +patch type: -> resource usage Added file: http://bugs.python.org/file13061/ssl.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 01:46:29 2009 From: report at bugs.python.org (David Christian) Date: Fri, 13 Feb 2009 00:46:29 +0000 Subject: [issue5188] telnetlib process_rawq buffer handling is confused In-Reply-To: <1234131372.15.0.372715702734.issue5188@psf.upfronthosting.co.za> Message-ID: <1234485989.74.0.26579221685.issue5188@psf.upfronthosting.co.za> Changes by David Christian : ---------- keywords: +patch Added file: http://bugs.python.org/file13062/telnetlib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 01:46:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 00:46:41 +0000 Subject: [issue592703] HTTPS does not handle pipelined requests Message-ID: <1234486001.08.0.634686030984.issue592703@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:16:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:16:34 +0000 Subject: [issue1375011] Improper handling of duplicate cookies Message-ID: <1234487794.12.0.673040887981.issue1375011@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:16:43 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:16:43 +0000 Subject: [issue1564508] RFC 2965 BaseCookie does not support "$Port" Message-ID: <1234487803.92.0.0121894089159.issue1564508@psf.upfronthosting.co.za> Daniel Diniz added the comment: Does anybody else need this one or should it be closed? ---------- nosy: +ajaksu2 title: BaseCookie does not support "$Port" -> RFC 2965 BaseCookie does not support "$Port" type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:17:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:17:02 +0000 Subject: [issue1372650] Cookie and multiple names Message-ID: <1234487822.19.0.434124110736.issue1372650@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:17:31 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:17:31 +0000 Subject: [issue1210326] comma separated cookie values Message-ID: <1234487851.39.0.546536988834.issue1210326@psf.upfronthosting.co.za> Daniel Diniz added the comment: Will close if nobody objects. ---------- nosy: +ajaksu2 type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:17:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:17:44 +0000 Subject: [issue1172011] BaseCookie does not call value_decode Message-ID: <1234487864.36.0.2436858347.issue1172011@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:18:53 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:18:53 +0000 Subject: [issue991266] Cookie.py does not correctly quote Morsels Message-ID: <1234487933.13.0.98765122219.issue991266@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:19:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:19:05 +0000 Subject: [issue3407] test_urllib2_localnet fails on MacOS X 10.4.11 (Intel) In-Reply-To: <1216406874.33.0.238022254592.issue3407@psf.upfronthosting.co.za> Message-ID: <1234487945.22.0.195802273069.issue3407@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:19:21 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:19:21 +0000 Subject: [issue3066] FD leak in urllib2 In-Reply-To: <1213009389.23.0.132424094421.issue3066@psf.upfronthosting.co.za> Message-ID: <1234487961.12.0.677577387996.issue3066@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:19:32 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:19:32 +0000 Subject: [issue4683] urllib2.HTTPDigestAuthHandler fails on third hostname? In-Reply-To: <1229523259.96.0.571468029932.issue4683@psf.upfronthosting.co.za> Message-ID: <1234487972.43.0.237586154764.issue4683@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee, orsenthil stage: -> needs patch versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:19:48 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:19:48 +0000 Subject: [issue2756] urllib2 add_header fails with existing unredirected_header In-Reply-To: <1209913898.38.0.175541514636.issue2756@psf.upfronthosting.co.za> Message-ID: <1234487988.17.0.827040661881.issue2756@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:19:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:19:59 +0000 Subject: [issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails Message-ID: <1234487999.97.0.0289467094338.issue1424152@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee stage: -> test needed type: -> feature request versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:20:11 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:20:11 +0000 Subject: [issue1327971] HTTPResponse instance has no attribute 'fileno' Message-ID: <1234488011.65.0.301760058916.issue1327971@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:20:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:20:26 +0000 Subject: [issue1599329] urllib(2) should allow automatic decoding by charset Message-ID: <1234488026.27.0.231371951532.issue1599329@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:20:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:20:41 +0000 Subject: [issue1682241] Problems with urllib2 read() Message-ID: <1234488041.58.0.224396185812.issue1682241@psf.upfronthosting.co.za> Daniel Diniz added the comment: Anyone against closing? ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:20:54 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:20:54 +0000 Subject: [issue4140] urllib2: request with digest auth through proxy fail In-Reply-To: <1224258333.01.0.331002758914.issue4140@psf.upfronthosting.co.za> Message-ID: <1234488054.22.0.546465817876.issue4140@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:21:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:21:08 +0000 Subject: [issue1673007] urllib2 requests history + HEAD support Message-ID: <1234488068.28.0.324197353282.issue1673007@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:22:17 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:22:17 +0000 Subject: [issue2193] Cookie Colon Name Bug In-Reply-To: <1203992843.27.0.867127322082.issue2193@psf.upfronthosting.co.za> Message-ID: <1234488137.04.0.604499948311.issue2193@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee stage: -> test needed versions: -Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:30:16 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:30:16 +0000 Subject: [issue3704] cookielib doesn't handle URLs with / in parameters In-Reply-To: <1219856501.23.0.0473308500082.issue3704@psf.upfronthosting.co.za> Message-ID: <1234488616.74.0.813172849092.issue3704@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -None stage: -> patch review versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:31:48 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:31:48 +0000 Subject: [issue3924] cookielib chokes on non-integer cookie version, should ignore it instead In-Reply-To: <1222021824.75.0.209543556591.issue3924@psf.upfronthosting.co.za> Message-ID: <1234488708.39.0.334674455415.issue3924@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:36:07 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:36:07 +0000 Subject: [issue1591035] update urlparse to RFC 3986 Message-ID: <1234488967.72.0.0778380104682.issue1591035@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +URI parsing library nosy: +jjlee stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:36:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:36:42 +0000 Subject: [issue1643370] recursive urlparse Message-ID: <1234489002.35.0.878864537188.issue1643370@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee stage: -> test needed versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:37:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:37:12 +0000 Subject: [issue5007] urllib2 HTTPS connection failure (BadStatusLine Exception) In-Reply-To: <1232408710.01.0.641128080754.issue5007@psf.upfronthosting.co.za> Message-ID: <1234489032.58.0.637634813725.issue5007@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee, orsenthil stage: -> test needed versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:37:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:37:56 +0000 Subject: [issue754016] urlparse goes wrong with IP:port without scheme Message-ID: <1234489076.18.0.434984475093.issue754016@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee stage: -> patch review type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:40:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:40:20 +0000 Subject: [issue1462525] URI parsing library Message-ID: <1234489220.32.0.421471018735.issue1462525@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:44:17 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:44:17 +0000 Subject: [issue2987] RFC2732 support for urlparse (e.g. http://[::1]:80/) In-Reply-To: <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za> Message-ID: <1234489457.41.0.929054109323.issue2987@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee stage: -> patch review versions: +Python 2.7 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:45:31 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:45:31 +0000 Subject: [issue4191] urlparse normalize URL path In-Reply-To: <1224834633.73.0.450098014303.issue4191@psf.upfronthosting.co.za> Message-ID: <1234489531.69.0.709796025244.issue4191@psf.upfronthosting.co.za> Daniel Diniz added the comment: Will close soon if nobody is against it. ---------- nosy: +ajaksu2, jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:46:31 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:46:31 +0000 Subject: [issue4962] urlparse & nfs url (rfc 2224) In-Reply-To: <1232101704.89.0.669847506906.issue4962@psf.upfronthosting.co.za> Message-ID: <1234489591.7.0.37167979274.issue4962@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:46:35 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 13 Feb 2009 01:46:35 +0000 Subject: =?utf-8?q?[issue5239]_time.strptime("=EF=BC=92=EF=BC=90=EF=BC=90=EF=BC=99", _"%Y")_raises_a_value_error?= In-Reply-To: <1234489595.64.0.741014433527.issue5239@psf.upfronthosting.co.za> Message-ID: <1234489595.64.0.741014433527.issue5239@psf.upfronthosting.co.za> New submission from Ezio Melotti : On Py3 strptime("????", "%Y") fails: >>> strptime("????", "%Y") Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.0/_strptime.py", line 454, in _strptime_time return _strptime(data_string, format)[0] File "/usr/local/lib/python3.0/_strptime.py", line 325, in _strptime (data_string, format)) ValueError: time data '????' does not match format '%Y' but non-ascii numbers are supported elsewhere: >>> int("????") 2009 >>> re.match("^\d{4}$", "????").group() '????' The problem seems to be at the line 265 of _strptime.py: return re_compile(self.pattern(format), IGNORECASE | ASCII) The ASCII flag prevent the regex to work properly with '????': >>> re.match("^\d{4}$", "????", re.ASCII) >>> I tried to remove the ASCII flag and it worked fine. On Py2.x the problem is the same: >>> strptime(u"????", "%Y") Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.5/_strptime.py", line 330, in strptime (data_string, format)) ValueError>>> >>> int(u"????") 2009 >>> re.match("^\d{4}$", u"????") Here there's probably to add the re.UNICODE flag at the line 265 (untested): return re_compile(self.pattern(format), IGNORECASE | UNICODE) in order to make it work: >>> re.match("^\d{4}$", u"????", re.U).group() u'\uff12\uff10\uff10\uff19' ---------- messages: 81847 nosy: ezio.melotti severity: normal status: open title: time.strptime("????", "%Y") raises a value error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:47:01 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 13 Feb 2009 01:47:01 +0000 Subject: =?utf-8?q?[issue5239]_time.strptime("=EF=BC=92=EF=BC=90=EF=BC=90=EF=BC=99", _"%Y")_raises_a_value_error?= In-Reply-To: <1234489595.64.0.741014433527.issue5239@psf.upfronthosting.co.za> Message-ID: <1234489621.85.0.854202154458.issue5239@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Library (Lib), Unicode type: -> behavior versions: +Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:47:06 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:47:06 +0000 Subject: [issue4932] Little improvement on urlparse module, urlparse function. In-Reply-To: <1231867955.83.0.32658151911.issue4932@psf.upfronthosting.co.za> Message-ID: <1234489626.41.0.622588616939.issue4932@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:47:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:47:44 +0000 Subject: [issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0 In-Reply-To: <1230586952.45.0.591912771259.issue4773@psf.upfronthosting.co.za> Message-ID: <1234489664.03.0.453915074854.issue4773@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:48:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:48:27 +0000 Subject: [issue5038] urrlib2/httplib doesn't reset file position between requests In-Reply-To: <1232730438.9.0.904675957675.issue5038@psf.upfronthosting.co.za> Message-ID: <1234489707.1.0.274924321977.issue5038@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:54:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:54:05 +0000 Subject: [issue3819] urllib2 sends Basic auth across redirects In-Reply-To: <1220973164.56.0.503421072226.issue3819@psf.upfronthosting.co.za> Message-ID: <1234490045.06.0.784221161568.issue3819@psf.upfronthosting.co.za> Daniel Diniz added the comment: I think the test is close enough to acceptable, will adapt it if nobody does first :) ---------- nosy: +ajaksu2 stage: -> needs patch type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:54:29 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:54:29 +0000 Subject: [issue5102] urllib2.py timeouts do not propagate across redirects for 2.6.1 (and 3.x?) In-Reply-To: <1233268501.09.0.849179242722.issue5102@psf.upfronthosting.co.za> Message-ID: <1234490069.06.0.029881640648.issue5102@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee, orsenthil stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:56:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:56:02 +0000 Subject: [issue3466] urllib2 should support HTTPS connections with client keys In-Reply-To: <1217343215.63.0.226404809794.issue3466@psf.upfronthosting.co.za> Message-ID: <1234490162.63.0.148124151686.issue3466@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:58:09 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 01:58:09 +0000 Subject: [issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails Message-ID: <1234490289.21.0.462956224767.issue1424152@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: test needed -> patch review type: feature request -> behavior versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:00:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:00:52 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1234490452.67.0.881739327775.issue1712522@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +orsenthil stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:03:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:03:27 +0000 Subject: [issue1285440] Digest Authentication not working in all cases Message-ID: <1234490607.62.0.631327093841.issue1285440@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:04:13 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:04:13 +0000 Subject: [issue2244] urllib and urllib2 decode userinfo multiple times In-Reply-To: <1204819810.33.0.413464262118.issue2244@psf.upfronthosting.co.za> Message-ID: <1234490653.0.0.605500626279.issue2244@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:05:09 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:05:09 +0000 Subject: [issue979407] urllib2 digest auth totally broken Message-ID: <1234490709.09.0.867158939103.issue979407@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:05:45 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:05:45 +0000 Subject: [issue1368312] fix for scheme identification in urllib2? Message-ID: <1234490745.95.0.584783370726.issue1368312@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:08:37 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:08:37 +0000 Subject: [issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth) In-Reply-To: <1204223194.19.0.670418970441.issue2202@psf.upfronthosting.co.za> Message-ID: <1234490917.29.0.722465791218.issue2202@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:08:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:08:47 +0000 Subject: [issue1520831] urrlib2 max_redirections=0 disables redirects Message-ID: <1234490927.2.0.943120099216.issue1520831@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:16:54 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:16:54 +0000 Subject: [issue655802] cPickle not always same as pickle Message-ID: <1234491414.19.0.92524517411.issue655802@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> needs patch versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:17:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:17:39 +0000 Subject: [issue634412] RFC 2112 in email package Message-ID: <1234491459.73.0.44363575488.issue634412@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7, Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:19:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:19:01 +0000 Subject: [issue602893] cgitb tracebacks not accessible Message-ID: <1234491541.29.0.0665943731323.issue602893@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:23:09 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:23:09 +0000 Subject: [issue532631] Confusions in formatfloat Message-ID: <1234491789.79.0.233612354788.issue532631@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +marketdickinson stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:24:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:24:59 +0000 Subject: [issue504219] locale.resetlocale is broken Message-ID: <1234491899.9.0.141138324387.issue504219@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +locale.getdefaultlocale doesnt handle all locales gracefully stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:26:21 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:26:21 +0000 Subject: [issue1536] pickle's documentation is severely outdated In-Reply-To: <1196535861.35.0.87845321139.issue1536@psf.upfronthosting.co.za> Message-ID: <1234491981.44.0.973134120982.issue1536@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:27:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:27:12 +0000 Subject: [issue602291] Bgen should learn about booleans Message-ID: <1234492032.06.0.00543385681909.issue602291@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:31:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:31:05 +0000 Subject: [issue665761] reduce() masks exception Message-ID: <1234492265.18.0.929009047201.issue665761@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed in trunk, rev69550. ---------- keywords: +patch nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:32:37 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:32:37 +0000 Subject: [issue678264] test_resource fails when file size is limited Message-ID: <1234492357.8.0.636303006469.issue678264@psf.upfronthosting.co.za> Daniel Diniz added the comment: Is this still a problem? ---------- components: +Tests nosy: +ajaksu2 stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:35:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:35:03 +0000 Subject: [issue684944] extend readline functionality in pdb Message-ID: <1234492503.94.0.468793997474.issue684944@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:36:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:36:42 +0000 Subject: [issue706585] Expose FinderInfo in FSCatalogInfo Message-ID: <1234492602.9.0.193216530473.issue706585@psf.upfronthosting.co.za> Daniel Diniz added the comment: Can anyone salvage Gregory's inline patch? ---------- keywords: +patch nosy: +ajaksu2 stage: -> test needed type: -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:37:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:37:34 +0000 Subject: [issue706592] Crbon.File.FSSpec should accept non-existing pathnames Message-ID: <1234492654.57.0.6990243586.issue706592@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:39:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:39:27 +0000 Subject: [issue775340] OSX 'freeze' bug Message-ID: <1234492767.8.0.646830217905.issue775340@psf.upfronthosting.co.za> Daniel Diniz added the comment: If nobody raises protest, going to close soon. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:47:09 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:47:09 +0000 Subject: [issue776533] Carbon.Snd module SPB constructor shadowed Message-ID: <1234493229.78.0.291430207929.issue776533@psf.upfronthosting.co.za> Daniel Diniz added the comment: The edit took place in rev33677 and is gone from the source, closing unless objections are voiced. ---------- nosy: +ajaksu2 priority: normal -> low type: -> behavior versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:49:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:49:38 +0000 Subject: [issue763708] Failures in test_macostools for --enable-unicode=ucs4 Message-ID: <1234493378.44.0.852573083917.issue763708@psf.upfronthosting.co.za> Daniel Diniz added the comment: Happy new year :) ---------- components: +Unicode nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:49:42 2009 From: report at bugs.python.org (Michael Stone) Date: Fri, 13 Feb 2009 02:49:42 +0000 Subject: [issue684944] extend readline functionality in pdb Message-ID: <1234493382.68.0.223628870646.issue684944@psf.upfronthosting.co.za> Michael Stone added the comment: ajaksu2, I think you just changed the status of this to "test needed". I don't think a unit test for this functionality is possible if that's what you mean, as it is an interactive feature involving readline completion at the interactive prompt only. It's been a long time since I posted this patch, and I don't really mind if you just close the issue. There obviously hasn't been a lot of interest since 2003. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:50:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:50:47 +0000 Subject: [issue779153] bgen requires Universal Headers, not OS X dev headers Message-ID: <1234493447.74.0.836731500017.issue779153@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Build type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:53:39 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 13 Feb 2009 02:53:39 +0000 Subject: [issue684944] extend readline functionality in pdb Message-ID: <1234493619.44.0.347288202971.issue684944@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:55:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 02:55:39 +0000 Subject: [issue780602] No sleep or busy wait Message-ID: <1234493739.44.0.31996573146.issue780602@psf.upfronthosting.co.za> Daniel Diniz added the comment: Is the issue valid? Can anyone implement a test based on Jean's description? ---------- nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 03:59:04 2009 From: report at bugs.python.org (Mitchell Model) Date: Fri, 13 Feb 2009 02:59:04 +0000 Subject: [issue5232] Setting font from preference dialog in IDLE on OS X broken In-Reply-To: <1234476506.45.0.29629224735.issue5232@psf.upfronthosting.co.za> Message-ID: Mitchell Model added the comment: At 10:56 PM +0000 02/12/09, Ned Deily wrote: >Ned Deily added the comment: > >FWIW, I am not able to reproduce this using a release3.0 IDLE (so with >today's patches) built with the default Apple-supplied Tcl/Tk in 10.5. >Are you using a newer Tcl/Tk? Does it happen if you move your current >preferences out of ~/.idlerc? > It does still happen if I move my preferences. And move my .Idle.py. I did build it with a newer Tk -- 8.5 installed as a Framework. (And I switched the order of /System/Library/Frameworks and /Library/Frameworks, which makes more sense. I thought I had seen that as an Issue, but it must have been just a web page where I saw it. Similarly, I added /opt/local/lib and /opt/local/include in detect_modules before the directories that are added, so that it finds the readline I installed with "port".) So, I started again with a fresh checkout. I didn't switch the order of the Frameworks directories, and I tried it with and without the directories for readline. I started Python manually, imported Tk, checked it's version, etc. to confirm I was getting the Apple installation. If I try to run bin/idle from the 3.1 Frameworks version directory I get a segmentation fault. I've seen a lot of weird behavior over the years in my many configuration and installation escapades across a wide variety of software, but I've never seen a seg fault with anything to do with Python. I have the "do you want to report this" backtrace if you're interested. A little later I'll try this from scratch on a clean, though PowerPC (G4), machine and see what happens. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:01:30 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 13 Feb 2009 03:01:30 +0000 Subject: [issue3745] _sha256 et al. encode to UTF-8 by default In-Reply-To: <1220261226.32.0.128110321757.issue3745@psf.upfronthosting.co.za> Message-ID: <1234494090.79.0.45786948164.issue3745@psf.upfronthosting.co.za> Gregory P. Smith added the comment: fixed in trunk r69561. ---------- components: +Extension Modules -Library (Lib) resolution: -> fixed status: open -> closed versions: +Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:06:45 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 13 Feb 2009 03:06:45 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234494405.75.0.542139337539.issue5237@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:16:39 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 13 Feb 2009 03:16:39 +0000 Subject: [issue5240] time.strptime fails to match data and format with Unicode whitespaces (Py3) In-Reply-To: <1234494999.4.0.610886804768.issue5240@psf.upfronthosting.co.za> Message-ID: <1234494999.4.0.610886804768.issue5240@psf.upfronthosting.co.za> New submission from Ezio Melotti : On Python3, strptime raises a ValueError with some "Unicode whitespaces" even if they are present both in the 'string' and 'format' args in the same position: >>> strptime("Thu\x20Feb", "%a\x20%b") # normal space, works fine time.struct_time(tm_year=1900, tm_mon=2, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=3, tm_yday=32, tm_isdst=-1) >>> strptime("Thu\xa0Feb", "%a\xa0%b") # no-break space, fails ValueError: time data 'Thu\xa0Feb' does not match format '%a\xa0%b' I wrote a small script to find out other chars where it fails (it needs ~5 minutes to run): >>> l = [] >>> for char in map(chr, range(0xFFFF)): ... try: x = strptime('Thu{0}Feb'.format(char), '%a{0}%b'.format(char)) ... except ValueError: l.append(char) ... >>> l ['\x1c', '\x1d', '\x1e', '\x1f', '%', '\x85', '\xa0', '\u1680', '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', '\u2007', '\u2008', '\u2009', '\u200a', '\u200b', '\u2028', '\u2029', '\u202f', '\u205f', '\u3000'] >>> [char.strip() for char in l] ['', '', '', '', '%', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''] >>> [unicodedata.category(char) for char in l] ['Cc', 'Cc', 'Cc', 'Cc', 'Po', 'Cc', 'Zs', 'Zs', 'Zs', 'Zs', 'Zs', 'Zs', 'Zs', 'Zs', 'Zs', 'Zs', 'Zs', 'Zs', 'Zs', 'Cf', 'Zl', 'Zp', 'Zs', 'Zs', 'Zs'] >>> [unicodedata.name(char, '???') for char in l] ['???', '???', '???', '???', 'PERCENT SIGN', '???', 'NO-BREAK SPACE', 'OGHAM SPACE MARK', 'EN QUAD', 'EM QUAD', 'EN SPACE', 'EM SPACE', 'THREE-PER-EM SPACE', 'FOUR-PER-EM SPACE', 'SIX-PER-EM SPACE', 'FIGURE SPACE', 'PUNCTUATION SPACE', 'THIN SPACE', 'HAIR SPACE', 'ZERO WIDTH SPACE', 'LINE SEPARATOR', 'PARAGRAPH SEPARATOR', 'NARROW NO-BREAK SPACE', 'MEDIUM MATHEMATICAL SPACE', 'IDEOGRAPHIC SPACE'] All these chars (except % and some control chars) are whitespace and they are removed by the .strip() method, so I guess that something similar happens in strptime too. The Unicode categories are: "Cc" = "Other, Control" "Zs" = "Separator, Space" "Cf" = "Other, Format" "Zl" = "Separator, Line" "Zp" = "Separator, Paragraph" Everything seems to work fine on Py2.x (tested on 2.4 and 2.6) ---------- components: Library (Lib), Unicode messages: 81859 nosy: ezio.melotti severity: normal status: open title: time.strptime fails to match data and format with Unicode whitespaces (Py3) type: behavior versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:23:22 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 03:23:22 +0000 Subject: [issue780354] socket.makefile() isn't compatible with marshal/cPickle/etc Message-ID: <1234495402.74.0.372251470706.issue780354@psf.upfronthosting.co.za> Daniel Diniz added the comment: IIUC this one can be closed. Objections? ---------- nosy: +ajaksu2 type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:23:39 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 13 Feb 2009 03:23:39 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234495419.22.0.682828652923.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: It's easy enough to implement. Although the 'all-or-nothing' aspect is a little tough, I'll have to give it some thought. Maybe the best way to do this is to first create a string.Formatter subclass that implements it. I'll play with it and see what I come up with. >From the description, I'm presuming we'd want: '{d}{s}{f}'.format(3, 'foo', 3.14) to work. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:24:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 03:24:42 +0000 Subject: [issue779285] Carbon Event ReceiveNextEvent Message-ID: <1234495482.16.0.932605986831.issue779285@psf.upfronthosting.co.za> Daniel Diniz added the comment: Needs confirmation. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:27:51 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 03:27:51 +0000 Subject: [issue777588] asyncore is broken for windows if connection is refused Message-ID: <1234495671.42.0.70540241229.issue777588@psf.upfronthosting.co.za> Daniel Diniz added the comment: Looks like this one was solved in issue 909005, does anyone disagree? ---------- components: +Windows nosy: +ajaksu2 superseder: -> asyncore fixes and improvements type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:29:44 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 03:29:44 +0000 Subject: [issue777597] socketmodule.c connection handling incorect on windows Message-ID: <1234495784.24.0.442758459013.issue777597@psf.upfronthosting.co.za> Daniel Diniz added the comment: Fixed in r36739 according to #965036. ---------- components: +Windows dependencies: +Fix for #777597 - socketmodule.c connection handling incorec nosy: +ajaksu2 resolution: -> out of date status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:31:59 2009 From: report at bugs.python.org (David W. Lambert) Date: Fri, 13 Feb 2009 03:31:59 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234495919.2.0.953429579838.issue5237@psf.upfronthosting.co.za> David W. Lambert added the comment: '{d}{s}{f}'.format(3, 'foo', 3.14) is possibly unclear, but is shorter than '{#d}{#s}{#f}'.format(...) ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:37:17 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 03:37:17 +0000 Subject: [issue798520] os.popen with invalid mode differs on Windows and POSIX Message-ID: <1234496237.18.0.290366096553.issue798520@psf.upfronthosting.co.za> Daniel Diniz added the comment: This snippet still raises 'OSError: [Errno 22] ...' in Linux: import os os.popen('ls', '') Can anyone do a quick check on Windows? ---------- nosy: +ajaksu2, georg.brandl priority: normal -> low stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:39:37 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 03:39:37 +0000 Subject: [issue798876] windows sys.path contains nonexistant directory Message-ID: <1234496377.81.0.774561450857.issue798876@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:41:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 03:41:24 +0000 Subject: [issue803422] sgmllib doesn't support hex or Unicode character references Message-ID: <1234496484.16.0.557888795686.issue803422@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:45:21 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 03:45:21 +0000 Subject: [issue806149] aetools.TalkTo methods can be obscured Message-ID: <1234496721.36.0.735771566478.issue806149@psf.upfronthosting.co.za> Daniel Diniz added the comment: Needs confirmation. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:46:03 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 13 Feb 2009 03:46:03 +0000 Subject: [issue5241] Missing flags in the Regex howto In-Reply-To: <1234496763.66.0.0120470676401.issue5241@psf.upfronthosting.co.za> Message-ID: <1234496763.66.0.0120470676401.issue5241@psf.upfronthosting.co.za> New submission from Ezio Melotti : The Regex howto for Py2.x doesn't include re.U/re.UNICODE (http://docs.python.org/library/re.html#re.U): http://docs.python.org/dev/howto/regex.html#compilation-flags (Py2.7) http://docs.python.org/howto/regex.html#compilation-flags (Py2.6) ... The Regex howto for Py3.x doesn't include re.A/re.ASCII (http://docs.python.org/3.0/library/re.html#re.A): http://docs.python.org/3.0/howto/regex.html#compilation-flags (Py3.0) http://docs.python.org/dev/py3k/howto/regex.html#compilation-flags (Py3.1) ---------- assignee: georg.brandl components: Documentation, Regular Expressions messages: 81868 nosy: akuchling, ezio.melotti, georg.brandl severity: normal status: open title: Missing flags in the Regex howto versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:48:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 03:48:05 +0000 Subject: [issue798058] IDLE / PyOS_InputHook Message-ID: <1234496885.46.0.319659123027.issue798058@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +IDLE / PyOS_InputHook stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:51:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 03:51:47 +0000 Subject: [issue788931] resolving relative paths for external entities with xml.sax Message-ID: <1234497107.39.0.0693831609474.issue788931@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +relative on-disk SYSTEM id handling is incorrect stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 04:56:16 2009 From: report at bugs.python.org (David W. Lambert) Date: Fri, 13 Feb 2009 03:56:16 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234497376.88.0.295427967453.issue5237@psf.upfronthosting.co.za> David W. Lambert added the comment: I am net yet fluent in format method. I meant ":" where "#" appeared. Anyway, I think you need the colon. If from print('{0:9}'.format(33)) you make the argument number implicit and remove the colon you'd get print('{9}'.format(33)) which does and should raise IndexError. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:00:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:00:52 +0000 Subject: [issue783528] Inconsistent results with super and __getattribute__ Message-ID: <1234497652.44.0.658283080858.issue783528@psf.upfronthosting.co.za> Daniel Diniz added the comment: Same behavior, is this a real issue? Current exception: TypeError: 'super' object has only read-only attributes (assign to .n) ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.7 -Python 2.3 Added file: http://bugs.python.org/file13063/OP_example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:02:58 2009 From: report at bugs.python.org (Mitchell Model) Date: Fri, 13 Feb 2009 04:02:58 +0000 Subject: [issue5232] Setting font from preference dialog in IDLE on OS X broken In-Reply-To: Message-ID: Mitchell Model added the comment: OK, so I built 3.1 on a clean (G4) system instead of my highly tangled Intel and didn't get the seg fault. I guess the issue isn't real. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:06:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:06:39 +0000 Subject: [issue785031] MacPython installer fails on UFS filesystem Message-ID: <1234497999.39.0.384425869964.issue785031@psf.upfronthosting.co.za> Daniel Diniz added the comment: UFS support in Mac OS X seems to be in legacy/deprecated mode. Should we close this one? ---------- components: +Macintosh -None nosy: +ajaksu2 type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:07:24 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 13 Feb 2009 04:07:24 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234498044.91.0.490167565262.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: How is: '{d}{s}{f}'.format(3, 'foo', 3.14) more unclear than: '%d%s%f' % (3, 'foo', 3.14) ? But the more I think about it, the more I think it would have to be: '{:d}{:s}{:f}'.format(3, 'foo', 3.14) Since "{0:0}" is a legitimate format string, I need some way to tell whether "{0}" is missing the positional parameter or is missing the format specifier. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:14:09 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:14:09 +0000 Subject: [issue904498] threading docs, start error should be specified Message-ID: <1234498449.31.0.934200823569.issue904498@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:19:29 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:19:29 +0000 Subject: [issue903339] OpenVMS file system and UNIVERSAL_NEWLINES support Message-ID: <1234498769.6.0.811489278144.issue903339@psf.upfronthosting.co.za> Daniel Diniz added the comment: Here's the thread mentioned: http://mail.python.org/pipermail/python-dev/2004-February/042686.html Couldn't find any resolution about this issue after the messages here. ---------- nosy: +ajaksu2 priority: normal -> low type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:20:46 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:20:46 +0000 Subject: [issue902065] fails building C++ extensions when configured --without-cxx Message-ID: <1234498846.31.0.409775800908.issue902065@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +patch stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:24:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:24:24 +0000 Subject: [issue916013] Improving MacPython's IAC support Message-ID: <1234499064.53.0.589750720616.issue916013@psf.upfronthosting.co.za> Daniel Diniz added the comment: IAC is now 'Apple events', the IPC behind AppleScript. ---------- nosy: +ajaksu2 stage: -> test needed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:25:18 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:25:18 +0000 Subject: [issue900502] bundlebuilder: some way to add non-py files in packages Message-ID: <1234499118.77.0.0135494294735.issue900502@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:28:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:28:10 +0000 Subject: [issue809887] Improve pdb breakpoint feedback Message-ID: <1234499290.46.0.531124440195.issue809887@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing proposed, objections? ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:29:48 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:29:48 +0000 Subject: [issue813198] Migrate PEP material to docs Message-ID: <1234499388.15.0.924701557262.issue813198@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:32:21 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:32:21 +0000 Subject: [issue815668] test_locale and en_US Message-ID: <1234499541.08.0.61694594388.issue815668@psf.upfronthosting.co.za> Daniel Diniz added the comment: Fixed in #1197218. ---------- components: +Tests -None nosy: +ajaksu2 resolution: -> out of date stage: -> committed/rejected status: open -> closed superseder: -> test_locale fix on modern linux _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:33:46 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:33:46 +0000 Subject: [issue824371] ntpath.expandvars doesn't expand Windows-style variables. Message-ID: <1234499626.7.0.908540656099.issue824371@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:39:21 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:39:21 +0000 Subject: [issue822005] Carbon.CarbonEvt.ReceiveNextEvent args wrong Message-ID: <1234499961.81.0.219049290514.issue822005@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:41:19 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:41:19 +0000 Subject: [issue821948] fcntl() not working on sparc/linux (python 2.2.3) Message-ID: <1234500079.91.0.879636060698.issue821948@psf.upfronthosting.co.za> Daniel Diniz added the comment: Anyone interested in keeping this one open? ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:45:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:45:34 +0000 Subject: [issue834840] Unhelpful error message from cgi module Message-ID: <1234500334.81.0.690262384879.issue834840@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:46:17 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:46:17 +0000 Subject: [issue834351] Mouse wheel crashes program Message-ID: <1234500377.69.0.793592596077.issue834351@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:48:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:48:28 +0000 Subject: [issue835176] [2.3.2] bz2 test failure on AIX 4.3.2, Tru64 UNIX Message-ID: <1234500508.44.0.669884415112.issue835176@psf.upfronthosting.co.za> Daniel Diniz added the comment: Will close unless someone can point any current relevance. ---------- components: +Tests nosy: +ajaksu2 priority: normal -> low type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:50:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:50:50 +0000 Subject: [issue837046] pyport.h redeclares gethostname() if SOLARIS is defined Message-ID: <1234500650.09.0.167888226793.issue837046@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Build -None dependencies: +Solaris 8 declares gethostname(). stage: -> test needed type: -> compile error versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 05:59:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 04:59:55 +0000 Subject: [issue846817] control-c is being sent to child thread rather than main Message-ID: <1234501195.03.0.389677033928.issue846817@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing proposed. Cannot reproduce as of r69550: calling CliEngine run # # MAIN THREAD Control-C MAIN THREAD Control-C [...] Returning from cliEngine.runEngine() MAIN THREAD Control-C Exiting the main thread On Ubuntu 8.04 (2.6,24) with libreadline 5.2. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 06:01:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 05:01:34 +0000 Subject: [issue845560] imaplib: traceback from _checkquote with empty string Message-ID: <1234501294.6.0.572727545694.issue845560@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 06:02:16 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 05:02:16 +0000 Subject: [issue852150] Can't send Apple Events without WindowServer connection Message-ID: <1234501336.48.0.895586116441.issue852150@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 06:03:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 05:03:27 +0000 Subject: [issue853656] Carbon.CF.CFURLRef should be easier to create Message-ID: <1234501407.95.0.611886292215.issue853656@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 06:06:40 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 05:06:40 +0000 Subject: [issue854918] Configurable SSL handshake Message-ID: <1234501600.12.0.757467658739.issue854918@psf.upfronthosting.co.za> Daniel Diniz added the comment: SSL changed a lot, is this still relevant? Will close on lack of response. ---------- components: +Extension Modules nosy: +ajaksu2 stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 06:07:32 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 05:07:32 +0000 Subject: [issue868571] HTTPResponse.read(amt) fails when response length is UNKNOWN Message-ID: <1234501652.29.0.961037297175.issue868571@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 06:15:23 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 05:15:23 +0000 Subject: [issue869649] Quicktime missing funcitonality Message-ID: <1234502123.87.0.379232343146.issue869649@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Macintosh -None priority: normal -> low stage: -> test needed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 06:19:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 05:19:38 +0000 Subject: [issue868908] getpos() for sgmllib Message-ID: <1234502378.82.0.729526182793.issue868908@psf.upfronthosting.co.za> Daniel Diniz added the comment: Duplicate of #849097. ---------- nosy: +ajaksu2 resolution: -> duplicate status: open -> closed superseder: -> Request: getpos() for sgmllib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 06:21:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 05:21:04 +0000 Subject: [issue849097] Request: getpos() for sgmllib Message-ID: <1234502464.0.0.334941859394.issue849097@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closed #868908 as a duplicate of this one. ---------- nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 06:27:00 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 05:27:00 +0000 Subject: [issue872815] How to pass the proxy server use socket Message-ID: <1234502820.4.0.491873563384.issue872815@psf.upfronthosting.co.za> Daniel Diniz added the comment: I don't understand the problem. I will close this one if no opposition arises. ---------- components: +Library (Lib) -None nosy: +ajaksu2 type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 06:41:56 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 05:41:56 +0000 Subject: [issue875654] add support for installations compiled for debugging Message-ID: <1234503716.02.0.92525262489.issue875654@psf.upfronthosting.co.za> Daniel Diniz added the comment: Doesn't make much sense, IIUC can be achieved with small effort from interested users and Debian ships python-dbg (OT here). Will close unless someone salvages some of the ideas. ---------- nosy: +ajaksu2, tarek priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 06:57:07 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 13 Feb 2009 05:57:07 +0000 Subject: [issue821948] fcntl() not working on sparc/linux (python 2.2.3) Message-ID: <1234504627.8.0.160246864742.issue821948@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 07:58:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 13 Feb 2009 06:58:04 +0000 Subject: [issue727732] getpath.c-generated prefix wrong for Tru64 scripts Message-ID: <1234508284.18.0.161562624085.issue727732@psf.upfronthosting.co.za> Daniel Diniz added the comment: Mike, Thanks for the feedback (and laugh!). I'll close this one soon, unless someone requests to keep open. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 09:18:30 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Feb 2009 08:18:30 +0000 Subject: [issue532631] Confusions in formatfloat Message-ID: <1234513110.53.0.4844736497.issue532631@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: nnorwitz -> marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 09:49:40 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 13 Feb 2009 08:49:40 +0000 Subject: [issue5216] distutils.tests.test_build_ext.BuildExtTestCase fails when srcdir != builddir In-Reply-To: <1234363326.79.0.666992241975.issue5216@psf.upfronthosting.co.za> Message-ID: <1234514980.52.0.909245183098.issue5216@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Matthias, can you confirm the test passes now on your side, so I close this issue. Thanks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 09:58:39 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 13 Feb 2009 08:58:39 +0000 Subject: [issue2279] distutils sdist add_defaults does not add data_files In-Reply-To: <1205333612.66.0.693918609529.issue2279@psf.upfronthosting.co.za> Message-ID: <1234515519.61.0.34076613668.issue2279@psf.upfronthosting.co.za> Tarek Ziad? added the comment: I'll change add_defaults() so it includes package_data. I don't think though, that MANIFEST.in is an ugly hack. Imho the best practice is an explicit MANIFEST.in (and not use the .svn browsing setuptools do) ---------- priority: -> high resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 10:00:10 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 13 Feb 2009 09:00:10 +0000 Subject: [issue5216] distutils.tests.test_build_ext.BuildExtTestCase fails when srcdir != builddir In-Reply-To: <1234363326.79.0.666992241975.issue5216@psf.upfronthosting.co.za> Message-ID: <1234515610.58.0.311637488686.issue5216@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 10:00:59 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 13 Feb 2009 09:00:59 +0000 Subject: [issue5201] Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the build In-Reply-To: <1234266292.13.0.602157766238.issue5201@psf.upfronthosting.co.za> Message-ID: <1234515659.05.0.354176762884.issue5201@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- priority: -> normal versions: +Python 3.1 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 10:02:52 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 13 Feb 2009 09:02:52 +0000 Subject: [issue2624] swig support in distutils should use the build and temp dirs In-Reply-To: <1208004805.0.0.253675871958.issue2624@psf.upfronthosting.co.za> Message-ID: <1234515772.33.0.536194266931.issue2624@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 10:17:25 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 13 Feb 2009 09:17:25 +0000 Subject: [issue5158] Document distutils 'depends' option for extensions In-Reply-To: <1233849334.58.0.0898669443765.issue5158@psf.upfronthosting.co.za> Message-ID: <1234516645.68.0.312006371018.issue5158@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Added in r69566, thanks for the contribution ! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 10:42:06 2009 From: report at bugs.python.org (Jiafei Peng) Date: Fri, 13 Feb 2009 09:42:06 +0000 Subject: [issue5242] eval() function in List Comprehension doesn't work In-Reply-To: <1234518125.96.0.444530348539.issue5242@psf.upfronthosting.co.za> Message-ID: <1234518125.96.0.444530348539.issue5242@psf.upfronthosting.co.za> New submission from Jiafei Peng : eval() function in List Comprehension doesn't work. please see the under codes: canBusType = 'CANdiag' result = [eval('canBusType') for i in range(3)] NameError: name 'canBusType' is not defined It did work in Python2.5 or 2.6. The expected result is ['CANdiag', 'CANdiag', 'CANdiag']. ---------- messages: 81890 nosy: JiafeiPeng severity: normal status: open title: eval() function in List Comprehension doesn't work versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 10:48:45 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 13 Feb 2009 09:48:45 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234518525.76.0.00243124292644.issue5237@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 10:54:13 2009 From: report at bugs.python.org (=?utf-8?q?Hagen_F=C3=BCrstenau?=) Date: Fri, 13 Feb 2009 09:54:13 +0000 Subject: [issue5242] eval() function in List Comprehension doesn't work In-Reply-To: <1234518125.96.0.444530348539.issue5242@psf.upfronthosting.co.za> Message-ID: <1234518853.02.0.440895895189.issue5242@psf.upfronthosting.co.za> Hagen F?rstenau added the comment: I can't reproduce this. For me it works as expected. ---------- nosy: +hagen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 10:57:09 2009 From: report at bugs.python.org (Patrick Gerken) Date: Fri, 13 Feb 2009 09:57:09 +0000 Subject: [issue5243] Missing dependency in distutils build In-Reply-To: <1234519029.27.0.18013582736.issue5243@psf.upfronthosting.co.za> Message-ID: <1234519029.27.0.18013582736.issue5243@psf.upfronthosting.co.za> New submission from Patrick Gerken : When running the command install_lib, the command build_clib is not run. If a package contains clibs they can be dependencies for extension libs, at least that is stated in the module docstring of build_clib. In real life you can see it when trying to run the command install_lib on the current reportlab2.3. The patch provided needs do be applied in the distutils dir directly with patch install_lib.py dependency.patch As requested, I asked on the mailing list first, whether this really is a bug. http://mail.python.org/pipermail/distutils-sig/2009-February/010974.html I am half finished writing a test case, that I'll append to this ticket later. ---------- assignee: tarek components: Distutils files: dependency.patch keywords: patch messages: 81892 nosy: do3cc, tarek severity: normal status: open title: Missing dependency in distutils build type: behavior versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7 Added file: http://bugs.python.org/file13064/dependency.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 11:02:10 2009 From: report at bugs.python.org (Mark Miller) Date: Fri, 13 Feb 2009 10:02:10 +0000 Subject: [issue1762561] unable to serialize Infinity or NaN on ARM using marshal Message-ID: <1234519330.85.0.0875523781779.issue1762561@psf.upfronthosting.co.za> Mark Miller added the comment: This still occurs in the latest SVN checkout, and is preventing Python from building on ARMV4L and ARMV5L OABI, dying during the test_float.py compilation. The patch appears to solve this problem, however I have not run a full suite of tests to ensure it doesn't have any regression issues. Since this has been broken since 2007, could this be looked at in getting merged? ---------- nosy: +mirell type: -> compile error versions: +Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 11:02:24 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 13 Feb 2009 10:02:24 +0000 Subject: [issue5243] Missing dependency in distutils build In-Reply-To: <1234519029.27.0.18013582736.issue5243@psf.upfronthosting.co.za> Message-ID: <1234519344.21.0.377473481737.issue5243@psf.upfronthosting.co.za> Tarek Ziad? added the comment: be careful to write your test in distutils (setuptools is not part of Python) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 11:04:28 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 13 Feb 2009 10:04:28 +0000 Subject: [issue5242] eval() function in List Comprehension doesn't work In-Reply-To: <1234518125.96.0.444530348539.issue5242@psf.upfronthosting.co.za> Message-ID: <1234519468.26.0.834362664014.issue5242@psf.upfronthosting.co.za> Ezio Melotti added the comment: I can't reproduce it either, tested with Py3 (on Linux and Windows) and with Py2.[456], it worked fine everywhere. Does your eval() work properly outside listcomps? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 11:07:33 2009 From: report at bugs.python.org (Jiafei Peng) Date: Fri, 13 Feb 2009 10:07:33 +0000 Subject: [issue5242] eval() function in List Comprehension doesn't work In-Reply-To: <1234518853.02.0.440895895189.issue5242@psf.upfronthosting.co.za> Message-ID: Jiafei Peng added the comment: Hallo Mr. F?rstenau, thank you for the quick response. Have you tried it with Python 3.0 The Error report is truely: NameError: name 'canBusType' is not defined Someone else reported the same problem in internet too. Best regards, mit freundlichen Gr??en, Jiafei Peng Softwareentwickler / Embedded System Software (EF-F2) Software developer / Embedded System Software IAV GmbH Nordhoffstr. 5 38518 Gifhorn GERMANY Phone: +49 5371 805-2817 Fax:+49 5371 805-1330 E-mail: Internet: http://www.iav.de IAV GmbH Sitz/Registered Office: Berlin Registergericht/Registration Court: Amtsgericht Charlottenburg Registernummer/Company Registration Number: HRB 21 280 Gesch?ftsf?hrer/Managing Directors: Kurt Blumenr?der, Michael Schubert Hagen F?rstenau 13.02.2009 10:54 Bitte antworten an Python tracker An jiafei.peng at iav.de Kopie Thema [issue5242] eval() function in List Comprehension doesn't work Hagen F?rstenau added the comment: I can't reproduce this. For me it works as expected. ---------- nosy: +hagen _______________________________________ Python tracker _______________________________________ Added file: http://bugs.python.org/file13065/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Fri Feb 13 11:14:39 2009 From: report at bugs.python.org (Jiafei Peng) Date: Fri, 13 Feb 2009 10:14:39 +0000 Subject: [issue5242] eval() function in List Comprehension doesn't work In-Reply-To: <1234519468.26.0.834362664014.issue5242@psf.upfronthosting.co.za> Message-ID: Jiafei Peng added the comment: Yes it does work properly outside listcomps. canBusType = 'CANdiag' result1 = eval('canBusType') result2 = [eval('canBusType'), eval('canBusType'), eval( 'canBusType')] result3 = [eval('canBusType') for i in range(3)] result1 = 'CANdiag' result2 =['CANdiag' 'CANdiag' 'CANdiag'] for result3: NameError: name 'canBusType' is not defined Best regards, mit freundlichen Gr??en, Jiafei Peng Softwareentwickler / Embedded System Software (EF-F2) Software developer / Embedded System Software IAV GmbH Nordhoffstr. 5 38518 Gifhorn GERMANY Phone: +49 5371 805-2817 Fax:+49 5371 805-1330 E-mail: Internet: http://www.iav.de IAV GmbH Sitz/Registered Office: Berlin Registergericht/Registration Court: Amtsgericht Charlottenburg Registernummer/Company Registration Number: HRB 21 280 Gesch?ftsf?hrer/Managing Directors: Kurt Blumenr?der, Michael Schubert Ezio Melotti 13.02.2009 11:04 Bitte antworten an Python tracker An jiafei.peng at iav.de Kopie Thema [issue5242] eval() function in List Comprehension doesn't work Ezio Melotti added the comment: I can't reproduce it either, tested with Py3 (on Linux and Windows) and with Py2.[456], it worked fine everywhere. Does your eval() work properly outside listcomps? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ Added file: http://bugs.python.org/file13066/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Fri Feb 13 11:16:04 2009 From: report at bugs.python.org (Georg Brandl) Date: Fri, 13 Feb 2009 10:16:04 +0000 Subject: [issue5242] eval() function in List Comprehension doesn't work In-Reply-To: <1234518125.96.0.444530348539.issue5242@psf.upfronthosting.co.za> Message-ID: <1234520164.79.0.148440888366.issue5242@psf.upfronthosting.co.za> Georg Brandl added the comment: Ezio: this happens inside a function, like this: def f(): canBusType = 'CANdiag' result = [eval('canBusType') for i in range(3)] This is expected, and won't easily fix. The reason is that list comprehensions in 3.x use a function namespace "under the hood" (in 2.x, they were implemented like a simple for loop). Because inner functions need to know what names to get from what enclosing namespace, the names referenced in eval() can't come from enclosing functions. They must either be locals or globals. Of course, the question to the OP is why eval() is needed anyway. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 11:23:30 2009 From: report at bugs.python.org (Jiafei Peng) Date: Fri, 13 Feb 2009 10:23:30 +0000 Subject: [issue5244] Python 3.0 eval() function in List Comprehension doesn't work In-Reply-To: <1234520609.89.0.033915777183.issue5244@psf.upfronthosting.co.za> Message-ID: <1234520609.89.0.033915777183.issue5244@psf.upfronthosting.co.za> New submission from Jiafei Peng : Jiafei Peng added the comment: Yes it does work properly outside listcomps. canBusType = 'CANdiag' result1 = eval('canBusType') result2 = [eval('canBusType'), eval('canBusType'), eval( 'canBusType')] result3 = [eval('canBusType') for i in range(3)] result1 = 'CANdiag' result2 =['CANdiag' 'CANdiag' 'CANdiag'] for result3: NameError: name 'canBusType' is not defined Best regards, mit freundlichen Gr??en, Jiafei Peng IAV GmbH Nordhoffstr. 5 38518 Gifhorn GERMANY Phone: +49 5371 805-2817 Fax:+49 5371 805-1330 Ezio Melotti 13.02.2009 11:04 Bitte antworten an Python tracker An jiafei.peng at iav.de Kopie Thema [issue5242] eval() function in List Comprehension doesn't work Ezio Melotti added the comment: I can't reproduce it either, tested with Py3 (on Linux and Windows) and with Py2.[456], it worked fine everywhere. Does your eval() work properly outside listcomps? ---------- messages: 81899 nosy: JiafeiPeng severity: normal status: open title: Python 3.0 eval() function in List Comprehension doesn't work _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 11:42:07 2009 From: report at bugs.python.org (Georg Brandl) Date: Fri, 13 Feb 2009 10:42:07 +0000 Subject: [issue5244] Python 3.0 eval() function in List Comprehension doesn't work In-Reply-To: <1234520609.89.0.033915777183.issue5244@psf.upfronthosting.co.za> Message-ID: <1234521727.15.0.570728197944.issue5244@psf.upfronthosting.co.za> Georg Brandl added the comment: Please don't open duplicates. ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> eval() function in List Comprehension doesn't work _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 11:43:39 2009 From: report at bugs.python.org (Georg Brandl) Date: Fri, 13 Feb 2009 10:43:39 +0000 Subject: [issue4894] Docs for urllib.request.HTTPRedirectHandler.redirect_request missing "hdrs" paramether In-Reply-To: <1231509516.06.0.732679259028.issue4894@psf.upfronthosting.co.za> Message-ID: <1234521819.23.0.646852879609.issue4894@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in r69570, r69571. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 11:45:06 2009 From: report at bugs.python.org (Georg Brandl) Date: Fri, 13 Feb 2009 10:45:06 +0000 Subject: [issue3734] subclassing complex In-Reply-To: <1220049550.4.0.0881969750537.issue3734@psf.upfronthosting.co.za> Message-ID: <1234521906.06.0.275211977124.issue3734@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied doc patch in r69573. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 11:45:53 2009 From: report at bugs.python.org (David Jones) Date: Fri, 13 Feb 2009 10:45:53 +0000 Subject: [issue5202] wave.py cannot write wave files into a shell pipeline In-Reply-To: <1234429211.16.0.456760009707.issue5202@psf.upfronthosting.co.za> Message-ID: <2046F7A3-C346-490C-B3C7-48A566EBEF94@pobox.com> David Jones added the comment: On 12 Feb 2009, at 09:00, David Jones wrote: > > David Jones added the comment: > > The following program does a very basic do-i-get-back-what-i-wrote > test. > sunau can't cope; I am investigating. I see. sunau uses mu-law compression by default which makes it non- invertable. How stupid. Inserting: w.setcomptype('NONE', 'Pointless Argument') just after setframerate fixes the tests so that all 3 modules pass. Of course, this is still only the most very basic test that one might want to do. And it doesn't cover the case mentioned in this bug report anyway. (drat, just found this, should've sent it yesterday) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 11:50:14 2009 From: report at bugs.python.org (Georg Brandl) Date: Fri, 13 Feb 2009 10:50:14 +0000 Subject: [issue3613] base64.encodestring does not actually accept strings In-Reply-To: <1219212034.35.0.601192649417.issue3613@psf.upfronthosting.co.za> Message-ID: <1234522214.94.0.558536738129.issue3613@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied the patch in r69575. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 11:53:45 2009 From: report at bugs.python.org (Georg Brandl) Date: Fri, 13 Feb 2009 10:53:45 +0000 Subject: [issue1537445] urllib2 httplib _read_chunked timeout Message-ID: <1234522425.89.0.153698173198.issue1537445@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 11:57:05 2009 From: report at bugs.python.org (Georg Brandl) Date: Fri, 13 Feb 2009 10:57:05 +0000 Subject: [issue1661108] base64.urlsafe_b64encode() shouldn't use the = character Message-ID: <1234522625.1.0.750716214285.issue1661108@psf.upfronthosting.co.za> Georg Brandl added the comment: Added a short note in r69576. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 12:07:41 2009 From: report at bugs.python.org (Georg Brandl) Date: Fri, 13 Feb 2009 11:07:41 +0000 Subject: [issue3694] Undetected error in _struct.pack_into In-Reply-To: <1219811392.29.0.37826020023.issue3694@psf.upfronthosting.co.za> Message-ID: <1234523261.68.0.738883979128.issue3694@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in r69577, r69578. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 12:14:11 2009 From: report at bugs.python.org (Georg Brandl) Date: Fri, 13 Feb 2009 11:14:11 +0000 Subject: [issue5208] urllib2.build_opener([handler, ...]) incorrect signature in docs In-Reply-To: <1234286185.85.0.555213161426.issue5208@psf.upfronthosting.co.za> Message-ID: <1234523651.6.0.310271540785.issue5208@psf.upfronthosting.co.za> Georg Brandl added the comment: Why is that ambiguous? Can you come up with a better short form? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 12:43:39 2009 From: report at bugs.python.org (Senthil) Date: Fri, 13 Feb 2009 11:43:39 +0000 Subject: [issue5208] urllib2.build_opener( In-Reply-To: <1234523651.6.0.310271540785.issue5208@psf.upfronthosting.co.za> Message-ID: <7c42eba10902130343s408aa83eqea664416fe224306@mail.gmail.com> Senthil added the comment: And that is how it is at all others places too. Optionals are placed inside []. ---------- nosy: +orsenthil title: urllib2.build_opener([handler, ...]) incorrect signature in docs -> urllib2.build_opener( _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 12:46:33 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Feb 2009 11:46:33 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234525593.84.0.606284248693.issue5237@psf.upfronthosting.co.za> Mark Dickinson added the comment: +1 for the general idea from me too, assuming that all the details can be worked out in a sane manner. Is it worth opening a discussion about this on comp.lang.python? ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 12:58:16 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Feb 2009 11:58:16 +0000 Subject: [issue3694] Undetected error in _struct.pack_into In-Reply-To: <1219811392.29.0.37826020023.issue3694@psf.upfronthosting.co.za> Message-ID: <1234526296.3.0.0277646558882.issue3694@psf.upfronthosting.co.za> Mark Dickinson added the comment: > BTW, there's a warning in _struct.c:180 -> warning: ?get_ulong? > defined but not used, should I open a new issue? Sure. Please could you add me to the nosy list if you do. In my opinion, the struct module *really* needs an overhaul, especially for py3k; there's a lot of inconsistency in the behaviour with respect to different integer types, and there's a lot of code that seems to be there purely for backwards compatibility that could be removed for 3.1 (and probably for 2.7 as well): for example, allowing floats when packing integer types, and allowing overflow to wraparound rather than raising an exception. Would it be worth opening a general 'overhaul the struct module' issue and marking all the current struct bugs as dependencies for this issue? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 13:03:03 2009 From: report at bugs.python.org (Rogi) Date: Fri, 13 Feb 2009 12:03:03 +0000 Subject: [issue5245] PyRun_SimpleStringFlags() documentation In-Reply-To: <1234526583.65.0.906444250771.issue5245@psf.upfronthosting.co.za> Message-ID: <1234526583.65.0.906444250771.issue5245@psf.upfronthosting.co.za> New submission from Rogi : >From teh docs: http://docs.python.org/c-api/veryhigh.html int PyRun_SimpleStringFlags(const char *command, PyCompilerFlags *flags)? Executes the Python source code from command in the __main__ module according to the flags argument. If __main__ does not already exist, it is created. Returns 0 on success or -1 if an exception was raised. If there was an error, there is no way to get the exception information. For the meaning of flags, see below. In case of a SystemExit it will not return. This detail, along another issue with Py_Main() and SystemExit, made me google around for a while. ---------- assignee: georg.brandl components: Documentation messages: 81912 nosy: Rogi, georg.brandl severity: normal status: open title: PyRun_SimpleStringFlags() documentation versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 13:05:45 2009 From: report at bugs.python.org (Dwayne Bailey) Date: Fri, 13 Feb 2009 12:05:45 +0000 Subject: [issue5214] Add KOI8-RU as a known encoding In-Reply-To: <1234335818.61.0.321610259153.issue5214@psf.upfronthosting.co.za> Message-ID: <1234526745.77.0.309741049735.issue5214@psf.upfronthosting.co.za> Dwayne Bailey added the comment: @haypo: The encoding works and doesn't throw and error, my guess is that aliases should be updated to cover the variant namings of -R and -U. I also found glibc points to this reference http://cad.ntu-kpi.kiev.ua/multiling/koi8-ru/ which seems to have disappeared. I couldn't find a way to validate that the glibc code points where the same as the ones you have. My iconv --version is 2.9 Apart from that I can't vouch for its correctness @lemburg: I can't comment on the status of the standard. I would assume that like most 8 bit encodings that these are falling away and being replaced by Unicode. Why I'm interested in these issues is that our Python tools are used to recover translations from installed .mo files on Linux. I look for encoding issues on a semi-regularly basis and fix any ones that present issues. This is the first I've found that is missing in Python. For us its useful in that we present a path for people to move from an old encoding into Unicode if needed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 13:14:16 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 13 Feb 2009 12:14:16 +0000 Subject: [issue3992] removed custom log from distutils In-Reply-To: <1222645256.9.0.167855735394.issue3992@psf.upfronthosting.co.za> Message-ID: <1234527256.96.0.033172569128.issue3992@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 13:14:32 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 13 Feb 2009 12:14:32 +0000 Subject: [issue3985] removed string module from distutils [patch] In-Reply-To: <1222597888.29.0.260615260643.issue3985@psf.upfronthosting.co.za> Message-ID: <1234527272.13.0.252872723815.issue3985@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 13:25:46 2009 From: report at bugs.python.org (Rogi) Date: Fri, 13 Feb 2009 12:25:46 +0000 Subject: [issue5227] Py_Main() does not return on sys.exit() In-Reply-To: <1234443648.41.0.597133870232.issue5227@psf.upfronthosting.co.za> Message-ID: <1234527946.26.0.80777529735.issue5227@psf.upfronthosting.co.za> Changes by Rogi : ---------- assignee: -> georg.brandl components: +Documentation -None nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 13:30:26 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Feb 2009 12:30:26 +0000 Subject: [issue1762561] unable to serialize Infinity or NaN on ARM using marshal Message-ID: <1234528226.4.0.467384538571.issue1762561@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'll take a look at this, provided Tim doesn't mind me stealing his issue. (Please steal it back if so.) Mark, could you please post the output from test_float? ---------- assignee: tim_one -> marketdickinson nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 13:31:56 2009 From: report at bugs.python.org (Matthias Klose) Date: Fri, 13 Feb 2009 12:31:56 +0000 Subject: [issue5216] distutils.tests.test_build_ext.BuildExtTestCase fails when srcdir != builddir In-Reply-To: <1234363326.79.0.666992241975.issue5216@psf.upfronthosting.co.za> Message-ID: <1234528316.35.0.238292936982.issue5216@psf.upfronthosting.co.za> Matthias Klose added the comment: no, still seen on the branches. I'll have a look at backporting these changes to the 2.6 branch before 2.6.2. ---------- versions: -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 13:32:09 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Feb 2009 12:32:09 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234528329.69.0.143444548297.issue5186@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12978/time_object_hash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 13:34:50 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 13 Feb 2009 12:34:50 +0000 Subject: [issue5240] time.strptime fails to match data and format with Unicode whitespaces (Py3) In-Reply-To: <1234494999.4.0.610886804768.issue5240@psf.upfronthosting.co.za> Message-ID: <1234528490.4.0.155221254761.issue5240@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: By quick observation, I found this problem goes away if following change is applied. Index: Lib/_strptime.py =================================================================== --- Lib/_strptime.py (revision 69496) +++ Lib/_strptime.py (working copy) @@ -262,7 +262,7 @@ def compile(self, format): """Return a compiled re object for the format string.""" - return re_compile(self.pattern(format), IGNORECASE | ASCII) + return re_compile(self.pattern(format), IGNORECASE) _cache_lock = _thread_allocate_lock() # DO NOT modify _TimeRE_cache or _regex_cache without acquiring the cache lock But this is just an observation. I don't call this *fix* because I'm not familier with unicode, this change might cause another problem if applied. ---------- dependencies: +re.IGNORECASE not Unicode-ready nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 13:38:57 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 13 Feb 2009 12:38:57 +0000 Subject: [issue5216] distutils.tests.test_build_ext.BuildExtTestCase fails when srcdir != builddir In-Reply-To: <1234363326.79.0.666992241975.issue5216@psf.upfronthosting.co.za> Message-ID: <1234528737.75.0.894452460032.issue5216@psf.upfronthosting.co.za> Tarek Ziad? added the comment: can you tell where xxmodule.c is in your installation ? (in 'builddir' ?) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 14:01:06 2009 From: report at bugs.python.org (Tim Gordon) Date: Fri, 13 Feb 2009 13:01:06 +0000 Subject: [issue5242] eval() function in List Comprehension doesn't work In-Reply-To: <1234518125.96.0.444530348539.issue5242@psf.upfronthosting.co.za> Message-ID: <1234530066.22.0.758765755892.issue5242@psf.upfronthosting.co.za> Tim Gordon added the comment: If you know what variable you are going to be eval-ing, or at least, have a list of those that might be eval-ed, you can get around this issue by making sure they are explicitly referenced in the inner scope (i.e., in the list comprehension). For example, even though list comprehensions work in 2.x, generator expressions don't, but this hack does (on 2.4 at least): def f(): canBusType = 'CANdiag' return (eval('canBusType') for i in range(3) if True or canBusType) By putting a semantically vacuous reference to canBusType (and any other variables you want) you make sure they are usable from within the eval as well. ---------- nosy: +QuantumTim _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 14:16:18 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 13 Feb 2009 13:16:18 +0000 Subject: [issue5240] time.strptime fails to match data and format with Unicode whitespaces (Py3) In-Reply-To: <1234494999.4.0.610886804768.issue5240@psf.upfronthosting.co.za> Message-ID: <1234530978.47.0.0534381679402.issue5240@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think you have found the problem, strptime probably uses \s with the re.ASCII flag and fails to match all the Unicode whitespaces: >>> l ['\x1c', '\x1d', '\x1e', '\x1f', '%', '\x85', '\xa0', '\u1680', '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', '\u2007', '\u2008', '\u2009', '\u200a', '\u200b', '\u2028', '\u2029', '\u202f', '\u205f', '\u3000'] >>> [bool(re.match('^\s$', char, re.ASCII)) for char in l] [False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False] >>> [bool(re.match('^\s$', char)) for char in l] [True, True, True, True, False, True, True, True, True, True, True, True, True,True, True, True, True, True, True, True, True, True, True, True, True] This bug is then related #5239 and the proposed fix should work for both. We can close this as duplicate and include this problem in #5239. Good work! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 14:30:12 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 13 Feb 2009 13:30:12 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234531812.86.0.472476687528.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: The attached file is a mostly working version that inherits from string.Formatter. It has the following shortcomings, which would all be addressed if we go forward: - Doesn't handle escaping '{' or '}' - Doesn't handle conversion specifiers, like '!s' These are all a function of me being too lazy to write a complete parser. If anyone really wants them, I could add them. But this is just a proof of concept. Admittedly this isn't a drop-in replacement for ''.format(), but it should give a taste of what using it would be like. Added file: http://bugs.python.org/file13067/auto_number_formatter.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 14:32:26 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Feb 2009 13:32:26 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234531946.24.0.641232831352.issue5186@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Apart from the misindentation Apologies. My fault for editing Python files while at work, with a substandard editor configuration... > have you run the benchmark script with it? I have now. See attached file for 3 sets of results (original, xor version, and rotate) on 64-bit Linux/Core 2 Duo. Summary: rotate is uniformly and significantly faster than xor; xor is uniformly and significantly faster than the unpatched version. Added file: http://bugs.python.org/file13068/linux_x86_64_timings.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 14:33:57 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Feb 2009 13:33:57 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234532037.97.0.651808636699.issue5186@psf.upfronthosting.co.za> Changes by Mark Dickinson : Added file: http://bugs.python.org/file13069/pointer_hash5_xor.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 14:34:05 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Feb 2009 13:34:05 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234532045.98.0.7106275309.issue5186@psf.upfronthosting.co.za> Changes by Mark Dickinson : Added file: http://bugs.python.org/file13070/pointer_hash5_rotate.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 14:34:13 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Feb 2009 13:34:13 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234532053.31.0.556495616442.issue5186@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file13054/pointer_hash5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 14:35:51 2009 From: report at bugs.python.org (Mark Miller) Date: Fri, 13 Feb 2009 13:35:51 +0000 Subject: [issue1762561] unable to serialize Infinity or NaN on ARM using marshal Message-ID: <1234532151.89.0.672873530054.issue1762561@psf.upfronthosting.co.za> Mark Miller added the comment: The following is where it fails un-patched: Compiling /usr/local/lib/python2.6/test/test_float.py ... Traceback (most recent call last): File "/usr/local/lib/python2.6/compileall.py", line 156, in exit_status = int(not main()) File "/usr/local/lib/python2.6/compileall.py", line 146, in main force, rx, quiet): File "/usr/local/lib/python2.6/compileall.py", line 83, in compile_dir if not compile_dir(fullname, maxlevels - 1, dfile, force, rx, quiet): File "/usr/local/lib/python2.6/compileall.py", line 65, in compile_dir ok = py_compile.compile(fullname, None, dfile, True) File "/usr/local/lib/python2.6/py_compile.py", line 138, in compile marshal.dump(codeobject, fc) ValueError: unmarshallable object make: *** [libinstall] Error 1 This is both on armv4l and armv5l OABI. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 14:38:49 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Feb 2009 13:38:49 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234532329.33.0.990617809936.issue5186@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, so the rotate version is really significantly faster (and, as Adam pointed out, it's also theoretically better). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 14:43:19 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 13 Feb 2009 13:43:19 +0000 Subject: [issue5240] time.strptime fails to match data and format with Unicode whitespaces (Py3) In-Reply-To: <1234494999.4.0.610886804768.issue5240@psf.upfronthosting.co.za> Message-ID: <1234532599.04.0.29472118407.issue5240@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: OK, I'll close this entry as duplicated. ---------- resolution: -> duplicate status: open -> closed superseder: -> time.strptime("????", "%Y") raises a value error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 14:43:25 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 13 Feb 2009 13:43:25 +0000 Subject: [issue5246] test.test_hashlib.HashLibTestCase fails on darwin In-Reply-To: <1234532605.63.0.116912869658.issue5246@psf.upfronthosting.co.za> Message-ID: <1234532605.63.0.116912869658.issue5246@psf.upfronthosting.co.za> New submission from Tarek Ziad? : The check_no_unicode('md5') fails under darwin (in the trunk) (Pdb) hashlib.md5(u'spam') <--- suppose to raise a TypeError here (Pdb) hashlib.md5('spam') traceback : ====================================================================== FAIL: test_no_unicode (test.test_hashlib.HashLibTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Volumes/MacDev/svn.python.org/python-trunk2/Lib/test/test_hashlib.py", line 75, in test_no_unicode self.check_no_unicode('md5') File "/Volumes/MacDev/svn.python.org/python-trunk2/Lib/test/test_hashlib.py", line 71, in check_no_unicode self.assertRaises(TypeError, getattr(hashlib, algorithm_name), u'spam') AssertionError: TypeError not raised ---------- components: Library (Lib) messages: 81925 nosy: tarek severity: normal status: open title: test.test_hashlib.HashLibTestCase fails on darwin versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 14:44:40 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 13 Feb 2009 13:44:40 +0000 Subject: [issue5242] eval() function in List Comprehension doesn't work In-Reply-To: <1234518125.96.0.444530348539.issue5242@psf.upfronthosting.co.za> Message-ID: <1234532680.97.0.514183772898.issue5242@psf.upfronthosting.co.za> Ezio Melotti added the comment: eval() is probably already an hack, there's no need to add another hack to make it work. It's better to just get rid of eval() and find a better way to do what you want to do. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 14:44:54 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Feb 2009 13:44:54 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234532694.15.0.226377121351.issue5186@psf.upfronthosting.co.za> Mark Dickinson added the comment: Antoine, please check in a patch of your choice. I think we've beaten this issue to death already. :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 14:46:38 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Feb 2009 13:46:38 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234532798.83.0.258322831625.issue5186@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 14:52:33 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 13 Feb 2009 13:52:33 +0000 Subject: =?utf-8?q?[issue5239]_time.strptime("=EF=BC=92=EF=BC=90=EF=BC=90=EF=BC=99", _"%Y")_raises_a_value_error?= In-Reply-To: <1234489595.64.0.741014433527.issue5239@psf.upfronthosting.co.za> Message-ID: <1234533153.05.0.184453605325.issue5239@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: This patch comes from issue5240. I think testcase is needed. I'll try if I can. ---------- dependencies: +re.IGNORECASE not Unicode-ready keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file13071/remove_ascii_flag.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 15:01:30 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 13 Feb 2009 14:01:30 +0000 Subject: [issue5239] Change time.strptime() to make it work with Unicode chars In-Reply-To: <1234489595.64.0.741014433527.issue5239@psf.upfronthosting.co.za> Message-ID: <1234533690.8.0.421599615354.issue5239@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- title: time.strptime("????", "%Y") raises a value error -> Change time.strptime() to make it work with Unicode chars _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 15:02:50 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 13 Feb 2009 14:02:50 +0000 Subject: [issue2834] re.IGNORECASE not Unicode-ready In-Reply-To: <1210581845.07.0.550614143529.issue2834@psf.upfronthosting.co.za> Message-ID: <1234533770.77.0.781186798544.issue2834@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 15:03:54 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Feb 2009 14:03:54 +0000 Subject: [issue5246] test.test_hashlib.HashLibTestCase fails on darwin In-Reply-To: <1234532605.63.0.116912869658.issue5246@psf.upfronthosting.co.za> Message-ID: <1234533834.71.0.0677595517773.issue5246@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +ebfe, gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 15:04:27 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Feb 2009 14:04:27 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234533867.25.0.511534869237.issue5186@psf.upfronthosting.co.za> Antoine Pitrou added the comment: pointer_hash5_rotate.patch has been committed to trunk and py3k. Thanks! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 15:04:34 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Feb 2009 14:04:34 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234533874.98.0.426863884566.issue5186@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 15:09:44 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Feb 2009 14:09:44 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234534184.57.0.555448268805.issue5237@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Unfortunately, `'{d}{s}{f}'.format(3, 'foo', 3.14)` can't work as you expect it to, because it already means "display the keyword arguments named `d`, `s` and `f`. (I agree that the syntax for format() strings is exceedingly tedious) On the other hand, `'{:d}{:s}{:f}'.format(3, 'foo', 3.14)` should be possible. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 15:12:55 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Feb 2009 14:12:55 +0000 Subject: [issue5247] Unhelpful error message with str.format() In-Reply-To: <1234534375.72.0.877493256836.issue5247@psf.upfronthosting.co.za> Message-ID: <1234534375.72.0.877493256836.issue5247@psf.upfronthosting.co.za> New submission from Antoine Pitrou : >>> "{0:f}".format(2.5) '2.500000' >>> "{0:f}".format("spam") Traceback (most recent call last): File "", line 1, in ValueError: Unknown conversion type f The error message should mention the type of the argument that doesn't support the given conversion type (e.g. "Unknown conversion type f for object of type 'float'"). Otherwise it can be very confusing. ---------- components: Interpreter Core messages: 81931 nosy: pitrou priority: normal severity: normal status: open title: Unhelpful error message with str.format() type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 15:13:07 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 13 Feb 2009 14:13:07 +0000 Subject: [issue5239] Change time.strptime() to make it work with Unicode chars In-Reply-To: <1234489595.64.0.741014433527.issue5239@psf.upfronthosting.co.za> Message-ID: <1234534387.8.0.987702618269.issue5239@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Hmm, this fails on python2 too. Maybe re.ASCII is added for backward compatibility? Again, I'm not familiar with unicode, so I won't call remove_ascii_flag.patch as *fix*. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 15:18:02 2009 From: report at bugs.python.org (Lukas Lueg) Date: Fri, 13 Feb 2009 14:18:02 +0000 Subject: [issue5246] test.test_hashlib.HashLibTestCase fails on darwin In-Reply-To: <1234532605.63.0.116912869658.issue5246@psf.upfronthosting.co.za> Message-ID: <1234534682.1.0.207131386031.issue5246@psf.upfronthosting.co.za> Lukas Lueg added the comment: test_case_md5_0 (__main__.HashLibTestCase) ... ok test_case_md5_1 (__main__.HashLibTestCase) ... ok test_case_md5_2 (__main__.HashLibTestCase) ... ok test_case_md5_huge (__main__.HashLibTestCase) ... ok test_case_md5_uintmax (__main__.HashLibTestCase) ... ok test_case_sha1_0 (__main__.HashLibTestCase) ... ok test_case_sha1_1 (__main__.HashLibTestCase) ... ok test_case_sha1_2 (__main__.HashLibTestCase) ... ok test_case_sha1_3 (__main__.HashLibTestCase) ... ok test_case_sha224_0 (__main__.HashLibTestCase) ... ok test_case_sha224_1 (__main__.HashLibTestCase) ... ok test_case_sha224_2 (__main__.HashLibTestCase) ... ok test_case_sha224_3 (__main__.HashLibTestCase) ... ok test_case_sha256_0 (__main__.HashLibTestCase) ... ok test_case_sha256_1 (__main__.HashLibTestCase) ... ok test_case_sha256_2 (__main__.HashLibTestCase) ... ok test_case_sha256_3 (__main__.HashLibTestCase) ... ok test_case_sha384_0 (__main__.HashLibTestCase) ... ok test_case_sha384_1 (__main__.HashLibTestCase) ... ok test_case_sha384_2 (__main__.HashLibTestCase) ... ok test_case_sha384_3 (__main__.HashLibTestCase) ... ok test_case_sha512_0 (__main__.HashLibTestCase) ... ok test_case_sha512_1 (__main__.HashLibTestCase) ... ok test_case_sha512_2 (__main__.HashLibTestCase) ... ok test_case_sha512_3 (__main__.HashLibTestCase) ... ok test_hexdigest (__main__.HashLibTestCase) ... ok test_large_update (__main__.HashLibTestCase) ... ok test_no_unicode (__main__.HashLibTestCase) ... ok test_unknown_hash (__main__.HashLibTestCase) ... ok ---------------------------------------------------------------------- Ran 29 tests in 0.399s OK [22842 refs] mac-lueg:py27 llueg$ ./python.exe Python 2.7a0 (trunk:69584, Feb 13 2009, 15:12:58) [GCC 4.0.1 (Apple Inc. build 5484)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import hashlib [36860 refs] >>> hashlib.md5(u'spam') Traceback (most recent call last): File "", line 1, in TypeError: Unicode-objects must be encoded before hashing [36893 refs] _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 15:24:38 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Feb 2009 14:24:38 +0000 Subject: [issue5239] Change time.strptime() to make it work with Unicode chars In-Reply-To: <1234534387.8.0.987702618269.issue5239@psf.upfronthosting.co.za> Message-ID: <1234535121.7339.9.camel@fsol> Antoine Pitrou added the comment: > Hmm, this fails on python2 too. Maybe re.ASCII is added for backward > compatibility? Again, I'm not familiar with unicode, so I won't call > remove_ascii_flag.patch as *fix*. re.ASCII was added to many stdlib modules because I wanted to minimize the potential for breakage when I converted the re library to use unicode matching by default. If it is desireable for strptime() and friends to match unicode digits as well as pure-ASCII digits (which sounds like a reasonable request to me), then re.ASCII can probably be dropped without any regret. (py3k doesn't have to be 100% compatible with python2 :-)) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 15:39:08 2009 From: report at bugs.python.org (David W. Lambert) Date: Fri, 13 Feb 2009 14:39:08 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234535948.04.0.206574065216.issue5237@psf.upfronthosting.co.za> David W. Lambert added the comment: Answering first question msg81873. Without colon separator, this might be considered confusing: >>> ( ... '{d}{s}{f}{f}'.format(3, 'foo', 3.14, 2.72), ... '{d}{s}{f}{f}'.format(d=3, s='foo', f=3.14) ... ) ('3foo3.1400002.720000', '3foo3.143.14') _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 15:40:49 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 13 Feb 2009 14:40:49 +0000 Subject: [issue5246] test.test_hashlib.HashLibTestCase fails on darwin In-Reply-To: <1234532605.63.0.116912869658.issue5246@psf.upfronthosting.co.za> Message-ID: <1234536049.15.0.268563395524.issue5246@psf.upfronthosting.co.za> Tarek Ziad? added the comment: I have rebuilt a fresh trunk from scratch and it is not reproductible anymore. It was my environment with no doubt. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 15:42:01 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Feb 2009 14:42:01 +0000 Subject: [issue5246] test.test_hashlib.HashLibTestCase fails on darwin In-Reply-To: <1234532605.63.0.116912869658.issue5246@psf.upfronthosting.co.za> Message-ID: <1234536121.17.0.4359728146.issue5246@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Perhaps it's because of missing dependencies in the Makefile? (just trying to guess) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 15:44:22 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 13 Feb 2009 14:44:22 +0000 Subject: [issue5239] Change time.strptime() to make it work with Unicode chars In-Reply-To: <1234489595.64.0.741014433527.issue5239@psf.upfronthosting.co.za> Message-ID: <1234536262.25.0.0826031247434.issue5239@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think Py3 with re.ASCII is the same as Py2 without re.UNICODE (and Py3 without re.ASCII is the same as Py2 with re.UNICODE). It's probably a good idea to have a coherent behavior between Py2 and Py3, so if we remove re.ASCII from Py3 we should add re.UNICODE to Py2. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 15:50:35 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Feb 2009 14:50:35 +0000 Subject: [issue5239] Change time.strptime() to make it work with Unicode chars In-Reply-To: <1234536262.25.0.0826031247434.issue5239@psf.upfronthosting.co.za> Message-ID: <1234536677.7339.12.camel@fsol> Antoine Pitrou added the comment: Le vendredi 13 f?vrier 2009 ? 14:44 +0000, Ezio Melotti a ?crit : > It's probably a good idea to have a coherent behavior between Py2 and > Py3, so if we remove re.ASCII from Py3 we should add re.UNICODE to Py2. Removing re.ASCII in py3k is a no-brainer, because unicode is how strings work by default. On the other hand, strings in 2.x are 8-bit, so it would probably be better to keep strptime as is. As I said, py3k doesn't have to be compatible with 2.x, that's even the whole point of it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 15:56:28 2009 From: report at bugs.python.org (David W. Lambert) Date: Fri, 13 Feb 2009 14:56:28 +0000 Subject: [issue5247] Unhelpful error message with str.format() In-Reply-To: <1234534375.72.0.877493256836.issue5247@psf.upfronthosting.co.za> Message-ID: <1234536988.4.0.324176540113.issue5247@psf.upfronthosting.co.za> Changes by David W. Lambert : ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 16:27:53 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 13 Feb 2009 15:27:53 +0000 Subject: [issue5239] Change time.strptime() to make it work with Unicode chars In-Reply-To: <1234489595.64.0.741014433527.issue5239@psf.upfronthosting.co.za> Message-ID: <1234538873.85.0.523233868033.issue5239@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Removing re.ASCII in py3k is a no-brainer, because unicode is how > strings work by default. I meant from the line 265 of _strptime.py, not from Python :P _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 16:30:11 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Feb 2009 15:30:11 +0000 Subject: [issue5239] Change time.strptime() to make it work with Unicode chars In-Reply-To: <1234538873.85.0.523233868033.issue5239@psf.upfronthosting.co.za> Message-ID: <1234539050.7339.13.camel@fsol> Antoine Pitrou added the comment: > > Removing re.ASCII in py3k is a no-brainer, because unicode is how > > strings work by default. > > I meant from the line 265 of _strptime.py, not from Python :P That's what I understood. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 16:42:11 2009 From: report at bugs.python.org (Lisandro Dalcin) Date: Fri, 13 Feb 2009 15:42:11 +0000 Subject: [issue5248] Adding T_SIZET to structmember.h In-Reply-To: <1234539731.32.0.475254376781.issue5248@psf.upfronthosting.co.za> Message-ID: <1234539731.32.0.475254376781.issue5248@psf.upfronthosting.co.za> New submission from Lisandro Dalcin : structmember.h lacks a 'T_SIZET' define in order to properly support struct fields of type 'size_t' within PyMemberDef. If this feature request is accepted, I can provide the patches. For 2.7, It would be nice to do: #define T_SIZET 20 /* size_t */ However, this value is already used in 3.0 for 'T_NONE'. Perhaps T_NONE should be backported to 2.7? To avoid future merge conflicts, I would vote for this definition: #define T_SIZET 21 /* size_t */ ---------- components: Interpreter Core messages: 81942 nosy: dalcinl, marketdickinson severity: normal status: open title: Adding T_SIZET to structmember.h type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 16:58:37 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Feb 2009 15:58:37 +0000 Subject: [issue1762561] unable to serialize Infinity or NaN on ARM using marshal Message-ID: <1234540717.13.0.30765491654.issue1762561@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks, Mark. A few comments: - The patch seems incomplete. There are other places in the source tree that care about endianness. I haven't done a thorough search, but the native endianness support in the struct module comes to mind. There are also some more obscure places---for example, there's at least one piece of code (in Python/compile.c) that tries to distinguish between the doubles 0.0 and -0.0 by looking only at the first and last bytes of the double, and that doesn't work for this particular mixed-endian format. I guess the patch could go in as it is, but adding only partial support for mixed-endian doubles seems dangerous. - I know very little about ARM, so please correct me if I'm talking rubbish here. But if I understand correctly, this mixed-endian format is only an issue for the old ABI, and isn't relevant for the newer "Embedded" ABIs. So the need for this is likely to diminish over the next few years. Is that correct? - Adding support for mixed-endian doubles probably has to be considered a new feature, so could not go in until 2.7, which is probably still a good few months away (I'm guessing a year or more, but there's no roadmap at the moment). How prevalent is the old ABI? How widespread do you think it's likely to be in, say, 3 or 5 years' time? Is there going to be a real need to be able to run Python 2.7 and Python 3.1 on mixed-endian platforms? I'm -1 on adding mixed-endian support, especially if all that's gained is an ability to deal with infinities, nans and signed zeros. It would mean adding a significant amount of code that's going to be awkward to maintain and test, and that seems likely to become redundant within a few years. I'd upgrade that -1 to a -0 in the presence: of (1) an OABI ARM buildbot, (2) a developer who's available to do testing on ARM, and (3) a more complete patch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 17:06:34 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Feb 2009 16:06:34 +0000 Subject: [issue5248] Adding T_SIZET to structmember.h In-Reply-To: <1234539731.32.0.475254376781.issue5248@psf.upfronthosting.co.za> Message-ID: <1234541194.99.0.421903473468.issue5248@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Do we really want size_t or rather Py_ssize_t? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 17:11:02 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Feb 2009 16:11:02 +0000 Subject: [issue1762561] unable to serialize Infinity or NaN on ARM using marshal Message-ID: <1234541462.37.0.375999722948.issue1762561@psf.upfronthosting.co.za> Mark Dickinson added the comment: > native endianness support in the struct module comes to mind Sorry: ignore that. The patch already covers this, since the struct module just uses _PyFloat_{Unp,P}ack8. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 17:24:09 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 13 Feb 2009 16:24:09 +0000 Subject: [issue5249] Fix strftime on windows. In-Reply-To: <1234542248.51.0.455809582678.issue5249@psf.upfronthosting.co.za> Message-ID: <1234542248.51.0.455809582678.issue5249@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : On windows, format string should be encoded as mbcs. Otherwise, result of strftime would be broken. Here is the patch. ---------- components: Extension Modules, Windows files: fix_strftime_on_windows.patch keywords: patch messages: 81946 nosy: ocean-city severity: normal stage: commit review status: open title: Fix strftime on windows. type: behavior versions: Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13072/fix_strftime_on_windows.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 17:25:58 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 13 Feb 2009 16:25:58 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234542358.03.0.668824697207.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: Right. The colon would be required if there's a format specifier. Or an exclamation if there's just a conversion specifier: "{!r}{:f}{!s:^10}".format('foo', 3, 10) would give: "'foo'3.000000 10 " I've attached a new version that includes format specifiers. Added file: http://bugs.python.org/file13073/auto_number_formatter_1.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 17:26:08 2009 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 13 Feb 2009 16:26:08 +0000 Subject: [issue5239] Change time.strptime() to make it work with Unicode chars In-Reply-To: <1234489595.64.0.741014433527.issue5239@psf.upfronthosting.co.za> Message-ID: <1234542368.12.0.359022429385.issue5239@psf.upfronthosting.co.za> Ezio Melotti added the comment: Sorry, I misunderstood the meaning of "no-brainer". If we add re.UNICODE on Py2, strptime should work fine with unicode strings, but it could fail somehow with normal strings. Is it more important to provide a way to use Unicode chars that works only with unicode strings or to have a coherent behavior between str and unicode? I don't think that adding re.UNICODE will break any existing code, but it may cause problems if someone tries to use encoded str instead of unicode (but shouldn't work already). Also note that encoded strings should be a problem only if they have to match a strptime directive (e.g. %Y), the other chars should be compared as they are, so it should work with str and unicode as long as they are not mixed (I think that whitespaces are treated differently though). I'll try to add re.UNICODE and see what happens. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 17:30:39 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 13 Feb 2009 16:30:39 +0000 Subject: [issue5239] Change time.strptime() to make it work with Unicode chars In-Reply-To: <1234489595.64.0.741014433527.issue5239@psf.upfronthosting.co.za> Message-ID: <1234542639.99.0.618988609529.issue5239@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I added test. But this requires issue5249 fix to be passed on windows. (I used "\u3000" instead of "\xa0" because "\xa0" cannot be decoded on windows mbcs) ---------- dependencies: +Fix strftime on windows. Added file: http://bugs.python.org/file13074/remove_ascii_flag.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 17:30:50 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 13 Feb 2009 16:30:50 +0000 Subject: [issue5239] Change time.strptime() to make it work with Unicode chars In-Reply-To: <1234489595.64.0.741014433527.issue5239@psf.upfronthosting.co.za> Message-ID: <1234542650.16.0.301376852353.issue5239@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file13071/remove_ascii_flag.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 17:32:35 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Feb 2009 16:32:35 +0000 Subject: [issue1762561] unable to serialize Infinity or NaN on ARM using marshal Message-ID: <1234542755.02.0.328032131161.issue1762561@psf.upfronthosting.co.za> Mark Dickinson added the comment: We still need to fix the compile failure somehow, though... Mark, is there any way you can isolate the test(s) in test_float that are causing compile failure? I'm suspicious of test_inf_as_str and test_nan_as_str. Does test_float compile if you remove these two tests? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 17:36:38 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 13 Feb 2009 16:36:38 +0000 Subject: [issue5249] Fix strftime on windows. In-Reply-To: <1234542248.51.0.455809582678.issue5249@psf.upfronthosting.co.za> Message-ID: <1234542998.48.0.77408263467.issue5249@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 17:37:12 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 13 Feb 2009 16:37:12 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234543032.98.0.417521487772.issue5237@psf.upfronthosting.co.za> Terry J. Reedy added the comment: All I am requesting is that '{} {} {}'.format(3, 'pi', 3.14) work as >>> '%s %s %s' % (3, 'pi', 3.14) '3 pi 3.14' >>> '{0} {1} {2}'.format(3, 'pi', 3.14) '3 pi 3.14' do today (3.0). I should note that the difference between typing {}, which is easy, and {1}, is more than just one keystroke because the latter requires unshift-1-shift _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 17:57:17 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Feb 2009 16:57:17 +0000 Subject: [issue5239] Change time.strptime() to make it work with Unicode chars In-Reply-To: <1234542368.12.0.359022429385.issue5239@psf.upfronthosting.co.za> Message-ID: <1234544279.7339.26.camel@fsol> Antoine Pitrou added the comment: > If we add re.UNICODE on Py2, strptime should work fine with unicode > strings, but it could fail somehow with normal strings. Is it more > important to provide a way to use Unicode chars that works only with > unicode strings or to have a coherent behavior between str and unicode? I'd say the latter, since str and unicode are often interchangeable in 2.x. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 18:21:20 2009 From: report at bugs.python.org (Lisandro Dalcin) Date: Fri, 13 Feb 2009 17:21:20 +0000 Subject: [issue5248] Adding T_SIZET to structmember.h In-Reply-To: <1234539731.32.0.475254376781.issue5248@psf.upfronthosting.co.za> Message-ID: <1234545680.61.0.187885568626.issue5248@psf.upfronthosting.co.za> Lisandro Dalcin added the comment: In 2.6 and 3.0, we already have 'Py_ssize_t', see 'T_PYSSIZET' definition on Include/structmember.h. I'm asking for 'size_t' support. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 18:21:30 2009 From: report at bugs.python.org (Radek) Date: Fri, 13 Feb 2009 17:21:30 +0000 Subject: [issue5148] gzip.open breaks with 'U' flag In-Reply-To: <1233709542.39.0.638969424034.issue5148@psf.upfronthosting.co.za> Message-ID: <1234545690.99.0.843847236418.issue5148@psf.upfronthosting.co.za> Radek added the comment: Same bug in 2.5, I don't know if the patch applies to 2.5 ---------- nosy: +radek768 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 18:26:57 2009 From: report at bugs.python.org (Kevin Watters) Date: Fri, 13 Feb 2009 17:26:57 +0000 Subject: [issue5249] Fix strftime on windows. In-Reply-To: <1234542248.51.0.455809582678.issue5249@psf.upfronthosting.co.za> Message-ID: <1234546017.75.0.965614518967.issue5249@psf.upfronthosting.co.za> Changes by Kevin Watters : ---------- nosy: +kevinwatters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 18:50:47 2009 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 13 Feb 2009 17:50:47 +0000 Subject: [issue5218] Check for tp_iter in ceval:ext_do_call before overriding exception message In-Reply-To: <1234380763.79.0.974439208897.issue5218@psf.upfronthosting.co.za> Message-ID: <1234547447.36.0.506240338211.issue5218@psf.upfronthosting.co.za> Changes by Guilherme Polo : Removed file: http://bugs.python.org/file13035/check_tpiter_before_overriding_msg.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 18:55:32 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Feb 2009 17:55:32 +0000 Subject: [issue5248] Adding T_SIZET to structmember.h In-Reply-To: <1234545680.61.0.187885568626.issue5248@psf.upfronthosting.co.za> Message-ID: <1234547774.7339.27.camel@fsol> Antoine Pitrou added the comment: > In 2.6 and 3.0, we already have 'Py_ssize_t', see 'T_PYSSIZET' > definition on Include/structmember.h. I'm asking for 'size_t' support. Oops, sorry for the noise then. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 19:03:39 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 13 Feb 2009 18:03:39 +0000 Subject: [issue5250] Document __instancecheck__ and __subclasscheck__ In-Reply-To: <1234548219.84.0.437841096999.issue5250@psf.upfronthosting.co.za> Message-ID: <1234548219.84.0.437841096999.issue5250@psf.upfronthosting.co.za> New submission from Terry J. Reedy : http://www.python.org/dev/peps/pep-3119/#overloading-isinstance-and-issubclass (GvR and Talin) "The primary mechanism proposed here is to allow overloading the built-in functions isinstance() and issubclass(). The overloading works as follows: The call isinstance(x, C) first checks whether C.__instancecheck__ exists, and if so, calls C.__instancecheck__(x) instead of its normal implementation. Similarly, the call issubclass(D, C) first checks whether C.__subclasscheck__ exists, and if so, calls C.__subclasscheck__(D) instead of its normal implementation." These two new special methods are not documented (for 3.x at least. A post on python-list today verifies that at least .__instancecheck__ was implemented (version not specified). I assume .__subclasscheck__ was also. This issue perhaps applies to 2.6/2.7 also. I suggest either adding "Customizing instance and subclass checks" after "Customizing class creation" or add to that section and rename it to "Customizing class creation and checks" since the needed addition seems too small for its own section. Something like The result of isinstance(object, class) can be modified by giving the *class* a .__instancecheck__(object) method. The result of issubclass(sub,super) can be modified by giving the *superclass* a .__subclasscheck__(sub) method. ---------- assignee: georg.brandl components: Documentation messages: 81956 nosy: georg.brandl, tjreedy severity: normal status: open title: Document __instancecheck__ and __subclasscheck__ versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 19:09:30 2009 From: report at bugs.python.org (James William Pye) Date: Fri, 13 Feb 2009 18:09:30 +0000 Subject: [issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ In-Reply-To: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> Message-ID: <1234548570.86.0.145574171135.issue5251@psf.upfronthosting.co.za> New submission from James William Pye : Basically, nested() doesn't seem to be consistent with explicitly nested with-statements when an exception is thrown in a CM's __enter__. Consider a pair of nested CMs, the inner __enter__ raises an exception trapped by the outer. In the situation of explicitly nested with-statements, the inner's block will not be ran as an exception was raised prior to the block. The outer traps the exception and code continues to flow after the outer's block because the exception was *not* raised. Currently, if contextlib.nested() is used in such a situation, it blows up with a RuntimeError("generator didn't yield"). See the attached file for a set of naive variations and their resulting exceptions or lack thereof in the situation of explicitly nested CMs. Despite the RuntimeError raised by nested(), I'm not sure it's *currently* possible for an implementation of nested() to be *totally* consistent with explicitly nested with-statements. It would seem that an additional facility(AbortBlock exception?) would be needed to communicate that the block should not actually be ran, and that no exception should be raised as it was consumed by an "outer" CM. If this is considered to be the intended behavior, I would think the doc-string on contextlib.nested should be updated to document the inconsistency as it currently states that nested() and nested with statements are equivalent. Based on the results of the attached file in Python 3.0, they are clearly not. Cheers folks; lovin' CMs. And, of course, apologies if this has already been discussed. :P ---------- components: None files: nested_issue.py messages: 81957 nosy: jwp severity: normal status: open title: contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__ type: behavior versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file13075/nested_issue.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 19:14:00 2009 From: report at bugs.python.org (Collin Winter) Date: Fri, 13 Feb 2009 18:14:00 +0000 Subject: [issue2459] speedup for / while / if with better bytecode In-Reply-To: <1206224909.42.0.227263347483.issue2459@psf.upfronthosting.co.za> Message-ID: <1234548840.32.0.696647130726.issue2459@psf.upfronthosting.co.za> Collin Winter added the comment: I don't see the changes to the lnotab format being a roadblock; just mention it in NEWS. Likewise, the pure-Python compiler package shouldn't be a high priority; your changes to that package look good enough. I'm seeing encouraging speed-ups out of this (with gcc 4.3.1 x86_64, compiling Python as 64-bit): Django templates (render a 150x150 table 100 times): Min: 0.595 -> 0.589: 0.94% faster Avg: 0.599 -> 0.591: 1.30% faster Spitfire templates (render a 1000x1000 table 100 times): Min: 0.751 -> 0.729: 2.98% faster Avg: 0.753 -> 0.730: 3.09% faster None of the apps I've benchmarked are negatively impacted. I only have two minor comments. Please commit this. Review comments: - The changes to Python/compile.c:compiler_if(), compiler_for(), compiler_while() have some indentation issues (tabs and such). - Functions like def foo(): while True: pass have a useless JUMP_FORWARD 0 instruction, but I don't think it's worth teaching the peepholer to remove them since it doesn't happen in other circumstances (that I can tell). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 19:27:06 2009 From: report at bugs.python.org (Stephen J. Turnbull) Date: Fri, 13 Feb 2009 18:27:06 +0000 Subject: [issue5252] 2to3 should detect and delete import of removed statvfs module In-Reply-To: <1234549626.49.0.319241033357.issue5252@psf.upfronthosting.co.za> Message-ID: <1234549626.49.0.319241033357.issue5252@psf.upfronthosting.co.za> New submission from Stephen J. Turnbull : It should also try to convert stuff like from statvfs import F_BAVAIL, F_FRSIZE status = os.statvfs(directory) available = status[F_BAVAIL]/((1024*1024)/status[F_FRSIZE] ---------- components: 2to3 (2.x to 3.0 conversion tool) messages: 81959 nosy: sjt severity: normal status: open title: 2to3 should detect and delete import of removed statvfs module type: feature request versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 19:33:06 2009 From: report at bugs.python.org (Stephen J. Turnbull) Date: Fri, 13 Feb 2009 18:33:06 +0000 Subject: [issue2899] Fixers find, rfind, etc in 'string' module In-Reply-To: <1211027417.56.0.456898655973.issue2899@psf.upfronthosting.co.za> Message-ID: <1234549986.39.0.96285561993.issue2899@psf.upfronthosting.co.za> Stephen J. Turnbull added the comment: Maybe 2to3 could get a --pedantic or even an --annoying option? I agree that it should be noisy about removed features even if actually fixing this kind of thing would be hard to do reliably. ---------- nosy: +sjt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 19:36:56 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 13 Feb 2009 18:36:56 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234550216.48.0.0909841403169.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: Terry J. Reedy wrote: > Terry J. Reedy added the comment: > > All I am requesting is that > '{} {} {}'.format(3, 'pi', 3.14) work as > >>>> '%s %s %s' % (3, 'pi', 3.14) > '3 pi 3.14' >>>> '{0} {1} {2}'.format(3, 'pi', 3.14) > '3 pi 3.14' > > do today (3.0). My string.Formatter subclass (attached to this bug report) does do this: $ ./python.exe Python 2.7a0 (trunk:69516, Feb 11 2009, 14:30:31) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from auto_number_formatter_1 import MyFormatter >>> f = MyFormatter() >>> f.format('{} {} {}', 3, 'pi', 3.14) '3 pi 3.14' >>> This is just for vetting the concept, if it's accepted I'll modify ''.format(). It's not a huge change. I just want to make sure that this implements what people are expecting. The talk about '{:d}' and the like is just to make sure all the cases are addressed. I doubt it would often be used that way. > I should note that the difference between typing {}, which is easy, and > {1}, is more than just one keystroke because the latter requires > unshift-1-shift Agreed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 19:37:25 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 13 Feb 2009 18:37:25 +0000 Subject: [issue2459] speedup for / while / if with better bytecode In-Reply-To: <1234548840.32.0.696647130726.issue2459@psf.upfronthosting.co.za> Message-ID: <1234550287.7339.39.camel@fsol> Antoine Pitrou added the comment: Hello Collin, Thanks for taking a look. > I don't see the changes to the lnotab format being a roadblock; just > mention it in NEWS. Likewise, the pure-Python compiler package shouldn't > be a high priority; your changes to that package look good enough. Well, I have good news: the fixes to the pure Python compiler have been accepted and committed by Neil Schemenauer in r69373. > I'm seeing encouraging speed-ups out of this (with gcc 4.3.1 x86_64, > compiling Python as 64-bit): > Django templates (render a 150x150 table 100 times): > Min: 0.595 -> 0.589: 0.94% faster > Avg: 0.599 -> 0.591: 1.30% faster > > Spitfire templates (render a 1000x1000 table 100 times): > Min: 0.751 -> 0.729: 2.98% faster > Avg: 0.753 -> 0.730: 3.09% faster Not a tremendous speedup but not totally insignificant either. (I see you like Spitfire :-)) > None of the apps I've benchmarked are negatively impacted. I only have > two minor comments. Please commit this. Before committing I want to know what to do with the new jump opcodes, with respect to the alternative proposal I've made in #4715. Ideally, I should fold the #4715 patch back into the present patch, since I think the #4715 approach is more thought out. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 19:55:00 2009 From: report at bugs.python.org (Mary Stern) Date: Fri, 13 Feb 2009 18:55:00 +0000 Subject: [issue5253] os.environ.get() doesn't handle default value In-Reply-To: <1234551300.69.0.752467323752.issue5253@psf.upfronthosting.co.za> Message-ID: <1234551300.69.0.752467323752.issue5253@psf.upfronthosting.co.za> New submission from Mary Stern : os.environ.get('ENV_VAR, 'mydefault') returns '' rather than 'mydefault' if not set. It would be nice if this standard dict-style behavior was supported. ---------- messages: 81963 nosy: marystern severity: normal status: open title: os.environ.get() doesn't handle default value type: feature request versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 20:03:24 2009 From: report at bugs.python.org (Brett Cannon) Date: Fri, 13 Feb 2009 19:03:24 +0000 Subject: [issue5236] time.strptime should reject bytes arguments on Py3 In-Reply-To: <1234479034.17.0.353291380083.issue5236@psf.upfronthosting.co.za> Message-ID: <1234551804.69.0.341887824837.issue5236@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon nosy: +brett.cannon stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 20:06:30 2009 From: report at bugs.python.org (Brett Cannon) Date: Fri, 13 Feb 2009 19:06:30 +0000 Subject: [issue5239] Change time.strptime() to make it work with Unicode chars In-Reply-To: <1234489595.64.0.741014433527.issue5239@psf.upfronthosting.co.za> Message-ID: <1234551990.66.0.541676935315.issue5239@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 20:06:47 2009 From: report at bugs.python.org (Brett Cannon) Date: Fri, 13 Feb 2009 19:06:47 +0000 Subject: [issue5240] time.strptime fails to match data and format with Unicode whitespaces (Py3) In-Reply-To: <1234494999.4.0.610886804768.issue5240@psf.upfronthosting.co.za> Message-ID: <1234552007.98.0.331608615914.issue5240@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 20:13:16 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 13 Feb 2009 19:13:16 +0000 Subject: [issue5169] Default hash not equal to id on AMD Sempron In-Reply-To: <1233929788.34.0.870033033845.issue5169@psf.upfronthosting.co.za> Message-ID: <1234552396.27.0.74615271833.issue5169@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Chema, thank you for bringing this semi-conscious assumption to light. Intentionally breaking it significantly speeds up set and dict creation. ---------- nosy: +tjreedy resolution: -> invalid status: open -> closed superseder: -> Reduce hash collisions for objects with no __hash__ method _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 20:21:54 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 13 Feb 2009 19:21:54 +0000 Subject: [issue5253] os.environ.get() doesn't handle default value In-Reply-To: <1234551300.69.0.752467323752.issue5253@psf.upfronthosting.co.za> Message-ID: <1234552914.58.0.376500342624.issue5253@psf.upfronthosting.co.za> Gregory P. Smith added the comment: >>> os.environ['FOO'] Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.5/UserDict.py", line 22, in __getitem__ raise KeyError(key) KeyError: 'FOO' >>> os.environ.get('FOO') >>> os.environ.get('FOO', 'bar') 'bar' % export FOO= % python2.5 >>> import os >>> os.environ['FOO'] '' An environment variable set to '' is valid and is still considered set (thats how the environment works). ---------- nosy: +gregory.p.smith resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 20:22:26 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 13 Feb 2009 19:22:26 +0000 Subject: [issue2899] Fixers find, rfind, etc in 'string' module In-Reply-To: <1211027417.56.0.456898655973.issue2899@psf.upfronthosting.co.za> Message-ID: <1234552946.7.0.718294526754.issue2899@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I disagree. That is the role of -3 warnings. Static analysis is too limited to get into issuing warnings with. ---------- assignee: collinwinter -> nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 20:29:15 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 13 Feb 2009 19:29:15 +0000 Subject: [issue5252] 2to3 should detect and delete import of removed statvfs module In-Reply-To: <1234549626.49.0.319241033357.issue5252@psf.upfronthosting.co.za> Message-ID: <1234553355.28.0.272446326375.issue5252@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Hmm. 2to3 doesn't currently mess with the stat module and os.stat the more common function. Also the new interface (attributes on the objects returned) has been around since 2.2. ---------- nosy: +benjamin.peterson priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 20:31:59 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Feb 2009 19:31:59 +0000 Subject: [issue5248] Adding T_SIZET to structmember.h In-Reply-To: <1234539731.32.0.475254376781.issue5248@psf.upfronthosting.co.za> Message-ID: <1234553519.18.0.537644142577.issue5248@psf.upfronthosting.co.za> Mark Dickinson added the comment: > If this feature request is accepted, I can provide the patches. Well, that's not how things work: there isn't really a mechanism for 'accepting' a feature request. Even if there were, that wouldn't guarantee acceptance of a patch for that feature request. For what it's worth, I think that there's a good chance that a well- written patch for this feature request would be accepted: it seems like a potentially useful addition, and I can't immediately see why it would be objectionable or controversial, but I haven't looked at the issue very closely. I'd suggest that provided you don't get any negative feedback from the python-dev thread or from the comments in this issue in the next few days, then it's probably worth working on a patch. I'd also be happy to review such a patch if/when it's ready. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 20:46:07 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 13 Feb 2009 19:46:07 +0000 Subject: [issue5247] Unhelpful error message with str.format() In-Reply-To: <1234534375.72.0.877493256836.issue5247@psf.upfronthosting.co.za> Message-ID: <1234554367.99.0.935088798928.issue5247@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 21:04:44 2009 From: report at bugs.python.org (Eric Smith) Date: Fri, 13 Feb 2009 20:04:44 +0000 Subject: [issue5247] Unhelpful error message with str.format() In-Reply-To: <1234534375.72.0.877493256836.issue5247@psf.upfronthosting.co.za> Message-ID: <1234555484.54.0.768481382565.issue5247@psf.upfronthosting.co.za> Eric Smith added the comment: I agree. I'm not sure on backporting this. I'll work on a patch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 21:23:30 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 13 Feb 2009 20:23:30 +0000 Subject: [issue5186] Reduce hash collisions for objects with no __hash__ method In-Reply-To: <1234110978.24.0.675256166012.issue5186@psf.upfronthosting.co.za> Message-ID: <1234556610.51.0.082652918433.issue5186@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sweet! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 22:04:38 2009 From: report at bugs.python.org (John J Lee) Date: Fri, 13 Feb 2009 21:04:38 +0000 Subject: [issue1372650] Cookie and multiple names Message-ID: <1234559078.0.0.956524691316.issue1372650@psf.upfronthosting.co.za> John J Lee added the comment: A patch for this bug is attached to issue1375011. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 22:08:33 2009 From: report at bugs.python.org (John J Lee) Date: Fri, 13 Feb 2009 21:08:33 +0000 Subject: [issue1172011] BaseCookie does not call value_decode Message-ID: <1234559313.5.0.712836692426.issue1172011@psf.upfronthosting.co.za> Changes by John J Lee : ---------- nosy: -jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 22:13:09 2009 From: report at bugs.python.org (John J Lee) Date: Fri, 13 Feb 2009 21:13:09 +0000 Subject: [issue991266] Cookie.py does not correctly quote Morsels Message-ID: <1234559589.76.0.649704949567.issue991266@psf.upfronthosting.co.za> Changes by John J Lee : ---------- nosy: -jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 22:18:25 2009 From: report at bugs.python.org (Adam Vandenberg) Date: Fri, 13 Feb 2009 21:18:25 +0000 Subject: [issue5254] Formatting error in "findertools" header In-Reply-To: <1234559905.46.0.79171819004.issue5254@psf.upfronthosting.co.za> Message-ID: <1234559905.46.0.79171819004.issue5254@psf.upfronthosting.co.za> New submission from Adam Vandenberg : There is a formatting error in the "findertools" header: http://docs.python.org/library/macostools.html#module-findertools "The finder's Apple Events interface" as rendered uses the wrong-direction single quote. ---------- assignee: georg.brandl components: Documentation messages: 81972 nosy: adamvan, georg.brandl severity: normal status: open title: Formatting error in "findertools" header versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 22:35:09 2009 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 13 Feb 2009 21:35:09 +0000 Subject: [issue5247] Unhelpful error message with str.format() In-Reply-To: <1234534375.72.0.877493256836.issue5247@psf.upfronthosting.co.za> Message-ID: <1234560909.02.0.83029998922.issue5247@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Seems like a reasonable backport. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 22:59:48 2009 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 13 Feb 2009 21:59:48 +0000 Subject: [issue1762561] unable to serialize Infinity or NaN on ARM using marshal Message-ID: <1234562388.42.0.708187136289.issue1762561@psf.upfronthosting.co.za> Mark Dickinson added the comment: I think my -1 for adding the new format was premature: I was hoping to find a way to fix marshal for the 'unknown' format, but the cleanest solution does indeed appear to be to add the mixed-endian format. And apart from the Python/compile.c oddity I can't find anywhere besides Objects/floatobject.c that needs to be changed, so the patch only has to touch one file. Here's a reworked version of Aurelien Jarno's patch, against the trunk. The key differences, from more significant to less, are as follows: - I've abstracted out the 3 different byte orders, so that the same code does the packing and unpacking for all 3 different formats. I think things should be safer and more maintainable this way (and it makes life easier when some other wacky byteorder comes along). - Rename the format to "IEEE, ARM mixed-endian". Note that these mixed- endian doubles are perfectly valid IEEE 754 doubles, so the name should start with "IEEE" so that the various IEEE 754-specific tests are enabled on ARM. The IEEE 754 standard has precisely nothing to say about endianness or serialization of floats as byte sequences: the words 'endian', 'byte' and 'octet' don't even appear anywhere in the standard. - In float.__setformat__, don't allow setting of "IEEE, ARM mixed-endian" for the 'float' type, only for the 'double' type. (If I understand correctly, when the double type is ARM mixed-endian the float type will always be little-endian; there are no mixed-endian single-precision floats to worry about.) - whitespace cleanups, expanded comments and docstrings, and line length fixes. I've tested this on two versions of OS X: 10.5.6/Intel (little-endian), and 10.4.10/PPC (big-endian), with no (new) test failures. I fully expect that this patch will cause test failures on ARM as a result of the IEEE tests being enabled, but that's better than a build failure. If there's someone who's willing to provide feedback I'll work to fix those test failures. I'm still not sure whether this can be a candidate 2.6 and 3.0. Martin, do you have any thoughts on this? To Mark Miller and Aurelien Jarno: is either of you in a position to test this patch on the relevant mixed-endian platforms? ---------- stage: -> patch review versions: +Python 3.0, Python 3.1 -Python 2.5 Added file: http://bugs.python.org/file13076/arm-float2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 23:24:35 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 13 Feb 2009 22:24:35 +0000 Subject: [issue2461] test_util.py for distutils In-Reply-To: <1206271007.7.0.519259374853.issue2461@psf.upfronthosting.co.za> Message-ID: <1234563875.54.0.0204800140112.issue2461@psf.upfronthosting.co.za> Tarek Ziad? added the comment: done in r69594 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 23:29:03 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 13 Feb 2009 22:29:03 +0000 Subject: [issue4524] Build fails at running build_scripts In-Reply-To: <1228405342.46.0.981738131113.issue4524@psf.upfronthosting.co.za> Message-ID: <1234564143.11.0.103488275866.issue4524@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 00:00:10 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 13 Feb 2009 23:00:10 +0000 Subject: [issue4524] Build fails at running build_scripts In-Reply-To: <1228405342.46.0.981738131113.issue4524@psf.upfronthosting.co.za> Message-ID: <1234566010.39.0.599782168682.issue4524@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 00:23:11 2009 From: report at bugs.python.org (Collin Winter) Date: Fri, 13 Feb 2009 23:23:11 +0000 Subject: [issue2459] speedup for / while / if with better bytecode In-Reply-To: <1234550287.7339.39.camel@fsol> Message-ID: <43aa6ff70902131523o12b76651x754b86939123db97@mail.gmail.com> Collin Winter added the comment: On Fri, Feb 13, 2009 at 10:37 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Hello Collin, > > Thanks for taking a look. > >> I don't see the changes to the lnotab format being a roadblock; just >> mention it in NEWS. Likewise, the pure-Python compiler package shouldn't >> be a high priority; your changes to that package look good enough. > > Well, I have good news: the fixes to the pure Python compiler have been > accepted and committed by Neil Schemenauer in r69373. Yeah, I saw that. Fantastic. >> I'm seeing encouraging speed-ups out of this (with gcc 4.3.1 x86_64, >> compiling Python as 64-bit): >> Django templates (render a 150x150 table 100 times): >> Min: 0.595 -> 0.589: 0.94% faster >> Avg: 0.599 -> 0.591: 1.30% faster >> >> Spitfire templates (render a 1000x1000 table 100 times): >> Min: 0.751 -> 0.729: 2.98% faster >> Avg: 0.753 -> 0.730: 3.09% faster > > Not a tremendous speedup but not totally insignificant either. > (I see you like Spitfire :-)) Well, Spitfire and Django represent very different ways of implementing a template system, so I like to measure both when doing application benchmarks. Template systems tend to be heavy CPU consumers for webapps, which is why I include them. >> None of the apps I've benchmarked are negatively impacted. I only have >> two minor comments. Please commit this. > > Before committing I want to know what to do with the new jump opcodes, > with respect to the alternative proposal I've made in #4715. > Ideally, I should fold the #4715 patch back into the present patch, > since I think the #4715 approach is more thought out. That sounds good, especially since Jeffrey and I have already reviewed #4715. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 00:43:48 2009 From: report at bugs.python.org (scudeete) Date: Fri, 13 Feb 2009 23:43:48 +0000 Subject: [issue5255] unicode support with os.readlink() In-Reply-To: <1234568628.13.0.435223332986.issue5255@psf.upfronthosting.co.za> Message-ID: <1234568628.13.0.435223332986.issue5255@psf.upfronthosting.co.za> New submission from scudeete : Python 2.5.2 has a bug in os.readlink() accepting unicode objects. Although it appears that other os functions can handle unicode fine: os.listdir("???") Works fine (in that it raises an OS.Error if the dir is not there), but: os.readlink("???") Raises: : 'ascii' codec can't encode characters in position 0-9: ordinal not in range(128) ---------- components: Library (Lib) messages: 81977 nosy: scudette severity: normal status: open title: unicode support with os.readlink() versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 00:46:56 2009 From: report at bugs.python.org (Josiah Carlson) Date: Fri, 13 Feb 2009 23:46:56 +0000 Subject: [issue777588] asyncore is broken for windows if connection is refused Message-ID: <1234568816.98.0.741216188936.issue777588@psf.upfronthosting.co.za> Josiah Carlson added the comment: According to Garth, sockets that don't connect on Windows get put into the error sockets list. According to John, you need to poll sockets to determine whether or not the attempted connection was refused. If Garth is right, the problem is fixed, though we aren't quite retrieving the correct error code on win32. If John is right, we need to repeatedly check for error conditions on sockets that are trying to connect to a remote host, and the problem is not fixed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 01:04:20 2009 From: report at bugs.python.org (Armandas) Date: Sat, 14 Feb 2009 00:04:20 +0000 Subject: [issue5256] rlcompleter adds builtins when custom dict is used In-Reply-To: <1234569860.16.0.0783224890959.issue5256@psf.upfronthosting.co.za> Message-ID: <1234569860.16.0.0783224890959.issue5256@psf.upfronthosting.co.za> New submission from Armandas : When custom dictionary is used to create a completer, rlcompleter still uses __builtins__.__dict__ to search for completions (rlcompleter.py, global_matches()): for nspace in [builtins.__dict__, self.namespace]: ... This behaviour may sometimes be unwanted. It would be nice to have an option, which when set would tell completer to only use provided dictionary. ---------- components: None messages: 81979 nosy: armandas severity: normal status: open title: rlcompleter adds builtins when custom dict is used type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 01:06:07 2009 From: report at bugs.python.org (George Sakkis) Date: Sat, 14 Feb 2009 00:06:07 +0000 Subject: [issue2279] distutils sdist add_defaults does not add data_files In-Reply-To: <1205333612.66.0.693918609529.issue2279@psf.upfronthosting.co.za> Message-ID: <1234569967.21.0.0493992199692.issue2279@psf.upfronthosting.co.za> George Sakkis added the comment: I didn't mean to imply that automagic discovery based on external version control software is better than MANIFEST.in; I favor explicitness here as well. It's just that this information can (and often has to) be duplicated in setup.py as 'package_data' or 'data_files'. For cases that package_data/data_files are not enough, setup.py should be extended to handle them, instead of requiring to write and keep in sync a separate file with its own mini syntax. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 01:12:34 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Feb 2009 00:12:34 +0000 Subject: [issue5249] Fix strftime on windows. In-Reply-To: <1234542248.51.0.455809582678.issue5249@psf.upfronthosting.co.za> Message-ID: <1234570354.4.0.77859904754.issue5249@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think we should use wcsftime on Windows, even though it works very similar to your patch (with the primary difference being that it uses alloca instead of Py_Malloc). ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 01:13:08 2009 From: report at bugs.python.org (Collin Winter) Date: Sat, 14 Feb 2009 00:13:08 +0000 Subject: [issue5176] Special-case string formatting in BINARY_MODULO implementation In-Reply-To: <1233964189.56.0.504237250684.issue5176@psf.upfronthosting.co.za> Message-ID: <1234570388.11.0.37776511314.issue5176@psf.upfronthosting.co.za> Collin Winter added the comment: Updated the patch to use only PyString_CheckExact(); added a test for the behaviour of string subclasses wrt the % operator. There's a very slight performance hit when using % with numbers, but it's so small as to be statistically insignificant. If it turns out to be relevant in the future, it's easy enough to add a special case for ints/longs. For some reason, using PyString_CheckExact instead of PyString_CheckExact || PyString_Check actually results in slower code (still an improvement, but not as much). The weird thing is that none of the benchmarks I'm running use % on string subclasses at any point. I talked about it with some of the gcc guys, but they didn't have any immediate leads. I'm going to send them the .o files in case gcc is missing some optimization. New benchmark numbers: Spitfire: Min: 0.687 -> 0.668: 2.96% faster Avg: 0.689 -> 0.669: 2.96% faster 2to3: Min: 20.376 -> 20.187: 0.94% faster Avg: 20.396 -> 20.225: 0.84% faster Django: Min: 0.560 -> 0.549: 1.94% faster Avg: 0.562 -> 0.552: 1.93% faster SlowPickle: Min: 0.920 -> 0.905: 1.62% faster Avg: 0.926 -> 0.913: 1.38% faster Added file: http://bugs.python.org/file13077/faster_modulo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 01:13:16 2009 From: report at bugs.python.org (Collin Winter) Date: Sat, 14 Feb 2009 00:13:16 +0000 Subject: [issue5176] Special-case string formatting in BINARY_MODULO implementation In-Reply-To: <1233964189.56.0.504237250684.issue5176@psf.upfronthosting.co.za> Message-ID: <1234570396.46.0.708011349833.issue5176@psf.upfronthosting.co.za> Changes by Collin Winter : Removed file: http://bugs.python.org/file12962/faster_modulo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 01:23:23 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Feb 2009 00:23:23 +0000 Subject: [issue1762561] unable to serialize Infinity or NaN on ARM using marshal In-Reply-To: <1234562388.42.0.708187136289.issue1762561@psf.upfronthosting.co.za> Message-ID: <49960EF8.6010608@v.loewis.de> Martin v. L?wis added the comment: > I'm still not sure whether this can be a candidate 2.6 and 3.0. Martin, > do you have any thoughts on this? I think this qualifies as a new port. In the past, we have avoided adding new ports in bugfix releases. As for adding it to 2.7/3.1: I'm also skeptical. We have a (fairly) new policy of not adding support for minority platforms, based on the belief that it is more effort than it is worth. Now, ARM in itself might be considered a minority platform (for Python); however, I can accept continued support for ARM based on the number of units available in the real world, and based on the fact that the chip is still being manufactured. Whether we need to support some old Linux ABI, I really don't know, and I'm -0. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 01:27:33 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Feb 2009 00:27:33 +0000 Subject: [issue5255] unicode support with os.readlink() In-Reply-To: <1234568628.13.0.435223332986.issue5255@psf.upfronthosting.co.za> Message-ID: <1234571253.99.0.700138213926.issue5255@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is fixed in Python 2.6. ---------- nosy: +loewis resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 02:32:30 2009 From: report at bugs.python.org (Eric Smith) Date: Sat, 14 Feb 2009 01:32:30 +0000 Subject: [issue5247] Unhelpful error message with str.format() In-Reply-To: <1234534375.72.0.877493256836.issue5247@psf.upfronthosting.co.za> Message-ID: <1234575150.7.0.268681345112.issue5247@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 02:33:43 2009 From: report at bugs.python.org (Eric Smith) Date: Sat, 14 Feb 2009 01:33:43 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234575223.14.0.00448680314421.issue5237@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 03:06:20 2009 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 14 Feb 2009 02:06:20 +0000 Subject: [issue1108] Problem with doctest and decorated functions In-Reply-To: <1188989604.95.0.0786142357028.issue1108@psf.upfronthosting.co.za> Message-ID: <1234577180.72.0.226887807523.issue1108@psf.upfronthosting.co.za> Steven D'Aprano added the comment: For what it's worth, this bug appears to go back to at least Python 2.4, and it affects functions using decorators even if they are defined in the same module as the decorated function. I've applied the patch to my 2.4 installation, and it doesn't fix the issue. I'd like to request this be reopened, because I don't believe the patch works as advertised. I've attached a simple script which should demonstrate the issue. Run it with "python doctestfail.py [-v]", and if it passes with no failures, the bug still exists. I've tested it on 2.4 before and after the patch. (Apologies for not having anything more recent at the moment.) ---------- nosy: +stevenjd Added file: http://bugs.python.org/file13078/doctestfail.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 03:55:10 2009 From: report at bugs.python.org (Mark Miller) Date: Sat, 14 Feb 2009 02:55:10 +0000 Subject: [issue1762561] unable to serialize Infinity or NaN on ARM using marshal Message-ID: <1234580110.11.0.157210060953.issue1762561@psf.upfronthosting.co.za> Mark Miller added the comment: I am in a position to test as much as needed. I am attempting to get Gentoo's ARM/MIPS/Embedded distribution up to date on Python, and noticed this build break. (Typically most embedded architectures are several releases behind.) I'll try this new patch right now. As for it only being with OABI, that's correct, and yes, it will decrease in numbers as time goes on, since most higher-end embedded processors are EABI currently. The concerns are valid, I understand, but since it seems to be a relatively minor change, I wouldn't see the real harm in this case, especially since otherwise Python seems to work just fine under ARM OABI. But yes, if you're looking at it from a perspective as if it will still be used prevalently in 3-5 years, it's use will be minor, with OABI especially, but that's always the trend in embedded architectures. Regardless, I'm very grateful for both Aurelian Jarno and Mark Dickinson for coming up with a patch that works to get me past my build breaks. ---------- versions: +Python 2.5 -Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 03:56:41 2009 From: report at bugs.python.org (Mark Miller) Date: Sat, 14 Feb 2009 02:56:41 +0000 Subject: [issue4305] ctypes fails to build on mipsel-linux-gnu (detects mips instead of mipsel) In-Reply-To: <1226484001.23.0.749041410677.issue4305@psf.upfronthosting.co.za> Message-ID: <1234580201.92.0.164536739015.issue4305@psf.upfronthosting.co.za> Mark Miller added the comment: Would it be possible to get some feedback as to whether this is a candidate for Python 2.6 on this patch? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 04:18:23 2009 From: report at bugs.python.org (Mark Miller) Date: Sat, 14 Feb 2009 03:18:23 +0000 Subject: [issue1762561] unable to serialize Infinity or NaN on ARM using marshal Message-ID: <1234581503.66.0.793671897863.issue1762561@psf.upfronthosting.co.za> Mark Miller added the comment: The new patch works correctly, by the way, on ARMv4L and ARMv5L OABI boards. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 05:06:28 2009 From: report at bugs.python.org (gumpy) Date: Sat, 14 Feb 2009 04:06:28 +0000 Subject: [issue1028] Tkinter binding involving Control-spacebar raises unicode error In-Reply-To: <1188161311.7.0.864205774814.issue1028@psf.upfronthosting.co.za> Message-ID: <1234584388.31.0.17878108914.issue1028@psf.upfronthosting.co.za> gumpy added the comment: 8.5.0 This is still an issue with both tk versions in the 3.0.1 python release. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 05:08:28 2009 From: report at bugs.python.org (Carl Johnson) Date: Sat, 14 Feb 2009 04:08:28 +0000 Subject: [issue4627] Add Mac OS X Disk Images to Python.org homepage In-Reply-To: <1228976820.57.0.597865739752.issue4627@psf.upfronthosting.co.za> Message-ID: <1234584508.42.0.193719165312.issue4627@psf.upfronthosting.co.za> Carl Johnson added the comment: Is it possible to reopen this bug? Python 3.0.1 still has no Mac installer? ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 05:10:03 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Feb 2009 04:10:03 +0000 Subject: [issue4627] Add Mac OS X Disk Images to Python.org homepage In-Reply-To: <1234584508.42.0.193719165312.issue4627@psf.upfronthosting.co.za> Message-ID: <1afaf6160902132010yb19e123i8fa353dc7043c3f1@mail.gmail.com> Benjamin Peterson added the comment: On Fri, Feb 13, 2009 at 10:08 PM, Carl Johnson wrote: > > Carl Johnson added the comment: > > Is it possible to reopen this bug? Python 3.0.1 still has no Mac installer? IIRC, they will be built soon. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 05:29:34 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 14 Feb 2009 04:29:34 +0000 Subject: [issue5249] Fix strftime on windows. In-Reply-To: <1234542248.51.0.455809582678.issue5249@psf.upfronthosting.co.za> Message-ID: <1234585774.11.0.722010212207.issue5249@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: On VC6, wcsftime simply converts *format* to mbcs string, calls strftime, and converts result to unicode, so there is no difference between my patch and wcsftime. (Newer VC's wcsftime might have different implementation though) Maybe you are concerning about the cost of extra unicode object creation on non-windows platform? If so, should ret = PyUnicode_Decode(outbuf, buflen, TZNAME_ENCODING, NULL); be changed to PyUnicode_DecodeUTF8? >with the primary difference being that it uses >alloca instead of Py_Malloc outbuf = (char *)PyMem_Malloc(i); should be alloca() on windows? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 06:32:40 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 14 Feb 2009 05:32:40 +0000 Subject: [issue5249] Fix strftime on windows. In-Reply-To: <1234542248.51.0.455809582678.issue5249@psf.upfronthosting.co.za> Message-ID: <1234589560.62.0.926153501058.issue5249@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I experimentally implemented with wcsftime, but I couldn't get same result as strftime + mbcs conversion. Probably because wcsftime depends on locale. Added file: http://bugs.python.org/file13079/experimental_wcsftime.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 06:39:46 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 14 Feb 2009 05:39:46 +0000 Subject: [issue5249] Fix strftime on windows. In-Reply-To: <1234542248.51.0.455809582678.issue5249@psf.upfronthosting.co.za> Message-ID: <1234589986.46.0.129576202719.issue5249@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 07:00:49 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 14 Feb 2009 06:00:49 +0000 Subject: [issue5249] Fix strftime on windows. In-Reply-To: <1234542248.51.0.455809582678.issue5249@psf.upfronthosting.co.za> Message-ID: <1234591249.82.0.127323248071.issue5249@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Sorry, if we use wcsftime, I cannot create the patch. On VC6, wcsftime returns not unicode but mbcs string which copied to wchar array. Maybe on snakebite.org, I can access VC9 and confirm its behavior on it? ;-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 07:39:49 2009 From: report at bugs.python.org (Neil Schemenauer) Date: Sat, 14 Feb 2009 06:39:49 +0000 Subject: [issue5178] Add context manager for temporary directory In-Reply-To: <1234029261.42.0.975383428204.issue5178@psf.upfronthosting.co.za> Message-ID: <1234593589.71.0.0684767992096.issue5178@psf.upfronthosting.co.za> Neil Schemenauer added the comment: New version of the patch. Added a __del__ method that hopefully works reliably. Added NEWS and an example of TemporaryFile as a context manager. I did not change more tests to use TemporaryDirectory since I understand hit-and-run modernization of code is generally discouraged. That said, I think there are some tests that could have their reliability improved by using TemporaryDirectory (I started on this patch when I saw some build bot failures). I'll look into that later. Added file: http://bugs.python.org/file13080/tempdir2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 08:31:45 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Feb 2009 07:31:45 +0000 Subject: [issue1762561] unable to serialize Infinity or NaN on ARM using marshal Message-ID: <1234596705.81.0.572770446146.issue1762561@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- versions: -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 08:36:34 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Feb 2009 07:36:34 +0000 Subject: [issue4627] Add Mac OS X Disk Images to Python.org homepage In-Reply-To: <1228976820.57.0.597865739752.issue4627@psf.upfronthosting.co.za> Message-ID: <1234596994.85.0.879707736128.issue4627@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The original bug report was about 2.6 having no installer, and that has been fixed. In fact, the bug can't possibly have talked about 3.0.1, since that wasn't released when the bug report is made. Changing the bug report's topic after it is made is bad management. So you could create a new bug report for 3.0.1 having no installer. However, I question what the point of such a bug report would be: it can't be to inform us (the Python maintainers) that there is no installer - we are well aware of that fact. So such a new bug report would sound much like whining. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 08:38:03 2009 From: report at bugs.python.org (Carl Johnson) Date: Sat, 14 Feb 2009 07:38:03 +0000 Subject: [issue4627] Add Mac OS X Disk Images to Python.org homepage In-Reply-To: <1228976820.57.0.597865739752.issue4627@psf.upfronthosting.co.za> Message-ID: <1234597083.61.0.447071821113.issue4627@psf.upfronthosting.co.za> Carl Johnson added the comment: What's German for "the squeaky wheel gets the grease"? ;-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 08:42:21 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Feb 2009 07:42:21 +0000 Subject: [issue5249] Fix strftime on windows. In-Reply-To: <1234585774.11.0.722010212207.issue5249@psf.upfronthosting.co.za> Message-ID: <499675D9.1080703@v.loewis.de> Martin v. L?wis added the comment: > On VC6, wcsftime simply converts *format* to mbcs string, calls > strftime, and converts result to unicode, so there is no difference > between my patch and wcsftime. Right. > (Newer VC's wcsftime might have different > implementation though) Maybe you are concerning about the cost of extra > unicode object creation on non-windows platform? No. I'm concerned primarily about code cleanliness, by relying on library code rather than implementing stuff ourselves. OTOH, the conversion to narrow strings still needs to happen on Unix (and probably needs to use the locale's encoding, not UTF-8), so a uniform treatment also has a value. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 08:58:53 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Feb 2009 07:58:53 +0000 Subject: [issue4627] Add Mac OS X Disk Images to Python.org homepage In-Reply-To: <1234597083.61.0.447071821113.issue4627@psf.upfronthosting.co.za> Message-ID: <499679BA.90306@v.loewis.de> Martin v. L?wis added the comment: > What's German for "the squeaky wheel gets the grease"? ;-) I can't think of anything; "Wer am lautesten schreit hat recht" and "Fragen kostet nichts" come close. I find that attitude close to whining, and I assert that it doesn't help in Python. Indeed, I get personally *discouraged* to help when I notice it, because I want to decide myself what I work on, instead of having others who never contribute themselves make priorities for me. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 09:09:46 2009 From: report at bugs.python.org (Carl Johnson) Date: Sat, 14 Feb 2009 08:09:46 +0000 Subject: [issue4627] Add Mac OS X Disk Images to Python.org homepage In-Reply-To: <1228976820.57.0.597865739752.issue4627@psf.upfronthosting.co.za> Message-ID: <1234598986.32.0.0612835316032.issue4627@psf.upfronthosting.co.za> Carl Johnson added the comment: Fair enough. In this case though, I'm not complaining for myself, since I can compile config, make, install source (although I don't know how to build a Mac Installer, or else I would just do it). I'm complaining on behalf of all the AppleScript users and others who have heard about this "Python 3" and are interested, but don't go in for using the command line (yet). It would be a shame to discourage them from learning Python when they don't see a Mac download link. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 09:49:31 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 14 Feb 2009 08:49:31 +0000 Subject: [issue5179] subprocess leaves open fds on construction error In-Reply-To: <1234037080.37.0.0531724857804.issue5179@psf.upfronthosting.co.za> Message-ID: <1234601371.45.0.230693823233.issue5179@psf.upfronthosting.co.za> Georg Brandl added the comment: I would, but how this fails is likely to be highly platform-specific. Can you try it on Windows and tell me what the resulting exception is? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 11:03:51 2009 From: report at bugs.python.org (Eric Smith) Date: Sat, 14 Feb 2009 10:03:51 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234605831.58.0.36317262213.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: auto_number_formatter_2.py lets you experiment with this with a syntax more similar to what ''.format() looks like: $ ./python Python 2.7a0 (trunk:69608, Feb 14 2009, 04:51:18) [GCC 4.1.2 20070626 (Red Hat 4.1.2-13)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from auto_number_formatter_2 import formatter as _ >>> _('{} {} {}').format(3, 'pi', 3.14) '3 pi 3.14' >>> It still doesn't handle escaping '{' and '}', but is otherwise complete. If the consensus is that this is useful, I'll implement it in ''.format(), otherwise I'm done with this issue. Added file: http://bugs.python.org/file13081/auto_number_formatter_2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 11:20:42 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 14 Feb 2009 10:20:42 +0000 Subject: [issue1762561] unable to serialize Infinity or NaN on ARM using marshal Message-ID: <1234606842.74.0.878705111105.issue1762561@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks Martin and Mark Miller for the comments and testing. I'm going to close this as "won't fix". This doesn't preclude ARM OABI becoming a supported platform at some point in the future, just not right now. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 11:30:54 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 14 Feb 2009 10:30:54 +0000 Subject: [issue2279] distutils sdist add_defaults does not add data_files In-Reply-To: <1205333612.66.0.693918609529.issue2279@psf.upfronthosting.co.za> Message-ID: <1234607454.18.0.317186857163.issue2279@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Right, but if MANIFEST.in is removed, I can see cases where you would need the same kind of mini-syntax in your setup.py. For instance, how would you tell sdist to recursively add files located in a directory (like the current recursive-include feature of MANIFEST.in) ? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 11:31:08 2009 From: report at bugs.python.org (Eric Smith) Date: Sat, 14 Feb 2009 10:31:08 +0000 Subject: [issue5237] Allow auto-numbered replacement fields in str.format() strings In-Reply-To: <1234481329.65.0.197500970463.issue5237@psf.upfronthosting.co.za> Message-ID: <1234607468.23.0.535527595034.issue5237@psf.upfronthosting.co.za> Eric Smith added the comment: Okay, one last version. This one lets you use object access within the replacement string: >>> from auto_number_formatter_3 import formatter as _ >>> _('{} {} {}').format(3, 'pi', 3.14) '3 pi 3.14' >>> _('{:#b} {!r:^10} {.imag}').format(3, 'pi', 3j+1) "0b11 'pi' 3.0" So not it lets you add in format specifiers, conversion specifiers, and object access. At this point the improvement of leaving out the index numbers is less clear. I'll leave it for debate if this is useful. I think it probably is, if only because it's easier to explain the behavior: If you leave out the 'field name', a sequential number is added in front of the 'replacement string' (using PEP 3101 nomenclature). Added file: http://bugs.python.org/file13082/auto_number_formatter_3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 11:33:44 2009 From: report at bugs.python.org (Stephen J. Turnbull) Date: Sat, 14 Feb 2009 10:33:44 +0000 Subject: [issue5252] 2to3 should detect and delete import of removed statvfs module In-Reply-To: <1234553355.28.0.272446326375.issue5252@psf.upfronthosting.co.za> Message-ID: <87fxihs44g.fsf@xemacs.org> Stephen J. Turnbull added the comment: Benjamin Peterson writes: > Hmm. 2to3 doesn't currently mess with the stat module and os.stat the > more common function. Also the new interface (attributes on the objects > returned) has been around since 2.2. So what? You *can't* import a nonexistent module, so the import statement should be removed to save the programmer the trouble. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 11:35:55 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 14 Feb 2009 10:35:55 +0000 Subject: [issue2279] distutils sdist add_defaults does not add data_files In-Reply-To: <1205333612.66.0.693918609529.issue2279@psf.upfronthosting.co.za> Message-ID: <1234607755.19.0.180638063907.issue2279@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Right, but if MANIFEST.in is removed, I can see cases where you would need the same kind of mini-syntax in your setup.py. For instance, how would you tell sdist to recursively add files located in a directory (like the current recursive-include feature of MANIFEST.in) ? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 11:36:37 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 14 Feb 2009 10:36:37 +0000 Subject: [issue2279] distutils sdist add_defaults does not add data_files In-Reply-To: <1205333612.66.0.693918609529.issue2279@psf.upfronthosting.co.za> Message-ID: <1234607797.47.0.861995963619.issue2279@psf.upfronthosting.co.za> Changes by Tarek Ziad? : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:20:32 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 14 Feb 2009 11:20:32 +0000 Subject: [issue5257] test_zipfle and test_distutils write in the test directories In-Reply-To: <1234610432.5.0.115375457394.issue5257@psf.upfronthosting.co.za> Message-ID: <1234610432.5.0.115375457394.issue5257@psf.upfronthosting.co.za> New submission from Tarek Ziad? : Those tests are writing in the test directories (Lib/test and Lib/distutils/tests). The tests will be changed to use temporary directory; ---------- assignee: tarek components: Distutils, Library (Lib) messages: 82008 nosy: tarek priority: high severity: normal status: open title: test_zipfle and test_distutils write in the test directories type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:21:27 2009 From: report at bugs.python.org (Roman Zeyde) Date: Sat, 14 Feb 2009 11:21:27 +0000 Subject: [issue5104] getsockaddrarg() casts port number from int to short without any warning In-Reply-To: <1233271436.92.0.964920785544.issue5104@psf.upfronthosting.co.za> Message-ID: <1234610487.12.0.481486364075.issue5104@psf.upfronthosting.co.za> Roman Zeyde added the comment: I've checked Python 3.0.1 today (at http://svn.python.org/projects/python/tags/r301/Modules/socketmodule.c) and it seems that the bug above has been fixed there too. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:31:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:31:39 +0000 Subject: [issue886488] WinPython 2.3.3 crashes using popen2 to spawn lots of child Message-ID: <1234611099.94.0.202703601217.issue886488@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:31:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:31:47 +0000 Subject: [issue892902] problem with pickling newstyle class instances Message-ID: <1234611107.78.0.835446378252.issue892902@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed on trunk. ---------- nosy: +ajaksu2 stage: -> test needed versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:31:52 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:31:52 +0000 Subject: [issue894936] Have a split corresponding with os.path.join Message-ID: <1234611112.96.0.459705743586.issue894936@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -None stage: -> test needed type: -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:32:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:32:10 +0000 Subject: [issue896199] Some Carbon modules missing from documentation Message-ID: <1234611130.81.0.212103722979.issue896199@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- assignee: -> georg.brandl components: +Macintosh stage: -> needs patch title: Some Carbon modules missing -> Some Carbon modules missing from documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:32:18 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:32:18 +0000 Subject: [issue896330] pyconfig.h is not placed in --includedir Message-ID: <1234611138.92.0.488979736894.issue896330@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:32:45 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:32:45 +0000 Subject: [issue900092] hotshot.stats.load fails with AssertionError Message-ID: <1234611165.93.0.936970432367.issue900092@psf.upfronthosting.co.za> Daniel Diniz added the comment: Has test, patch and sample data for reproducing. ---------- keywords: +patch nosy: +ajaksu2 stage: -> patch review title: hotshot.stats.load -> hotshot.stats.load fails with AssertionError type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:33:01 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:33:01 +0000 Subject: [issue921868] socket_htons does not work under AIX 64-bit Message-ID: <1234611181.62.0.872502685395.issue921868@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:33:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:33:28 +0000 Subject: [issue920573] http libraries throw errors internally in BitTorrent Message-ID: <1234611208.34.0.30205334773.issue920573@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed title: http libraries throw errors internally -> http libraries throw errors internally in BitTorrent type: -> behavior versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:33:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:33:34 +0000 Subject: [issue934418] nametowidget throws TypeError for Tcl_Objs Message-ID: <1234611214.26.0.803976536298.issue934418@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:34:04 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:34:04 +0000 Subject: [issue923697] SAX2 'property_encoding' feature not supported Message-ID: <1234611244.49.0.0196876609077.issue923697@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +XML -None stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:34:27 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:34:27 +0000 Subject: [issue902151] Thread start - strange error under Cygwin Message-ID: <1234611268.0.0.420963299709.issue902151@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:34:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:34:34 +0000 Subject: [issue900112] cgi.fieldStorage doesn't grok standards env. variables Message-ID: <1234611274.23.0.204657100449.issue900112@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:34:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:34:39 +0000 Subject: [issue892707] debuggable/profileable Python framework Message-ID: <1234611279.82.0.407630885629.issue892707@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:34:46 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:34:46 +0000 Subject: [issue881824] Add ResolveFinderAliases to macostools module Message-ID: <1234611286.92.0.238424865818.issue881824@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:34:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:34:55 +0000 Subject: [issue879399] socket line buffering Message-ID: <1234611295.83.0.460239185513.issue879399@psf.upfronthosting.co.za> Daniel Diniz added the comment: The code described by Jean is still present. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:35:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:35:08 +0000 Subject: [issue878560] Add a console window for Carbon MacPython applets Message-ID: <1234611308.14.0.500076260791.issue878560@psf.upfronthosting.co.za> Daniel Diniz added the comment: Is this one still relevant? ---------- nosy: +ajaksu2 stage: -> test needed title: Would like a console window for applets -> Add a console window for Carbon MacPython applets _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:35:14 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:35:14 +0000 Subject: [issue877904] freeze: problems excluding site Message-ID: <1234611314.52.0.210163957105.issue877904@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +brett.cannon stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:35:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:35:26 +0000 Subject: [issue876193] reorganize, extend function call optimizations Message-ID: <1234611326.48.0.840317617863.issue876193@psf.upfronthosting.co.za> Daniel Diniz added the comment: Can the patch be updated? ---------- nosy: +ajaksu2 type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:35:46 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:35:46 +0000 Subject: [issue850997] mbcs encoding ignores errors Message-ID: <1234611346.95.0.590183631534.issue850997@psf.upfronthosting.co.za> Daniel Diniz added the comment: Is this behavior still present? If so, is it still interesting to change it? ---------- components: +Unicode keywords: +patch nosy: +ajaksu2 stage: -> test needed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:36:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:36:02 +0000 Subject: [issue850482] Enhance frame handing in warnings.warn() Message-ID: <1234611362.72.0.561759109047.issue850482@psf.upfronthosting.co.za> Daniel Diniz added the comment: Patch has tests, needs updating. ---------- nosy: +ajaksu2, brett.cannon stage: -> needs patch type: -> feature request versions: +Python 2.7 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 12:36:07 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 11:36:07 +0000 Subject: [issue831574] Solaris term.h needs curses.h Message-ID: <1234611367.34.0.895272530138.issue831574@psf.upfronthosting.co.za> Daniel Diniz added the comment: Is the configure script still emitting lines about a bug in autoconf on Solaris? ---------- nosy: +ajaksu2 type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:08:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:08:47 +0000 Subject: [issue870479] Scripts need platform-dependent handling Message-ID: <1234613327.05.0.955083343245.issue870479@psf.upfronthosting.co.za> Daniel Diniz added the comment: Has a decision been made on this? What's the current behavior on Windows? ---------- nosy: +ajaksu2, tarek stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:08:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:08:59 +0000 Subject: [issue868845] Need unit tests for <...> reprs Message-ID: <1234613339.15.0.119545045572.issue868845@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Tests -Library (Lib) keywords: +easy -patch stage: -> test needed type: -> feature request versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:09:05 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:09:05 +0000 Subject: [issue841461] Differentiation between Builtins and extension classes Message-ID: <1234613345.55.0.337326330135.issue841461@psf.upfronthosting.co.za> Daniel Diniz added the comment: Closing suggested. ---------- nosy: +ajaksu2 priority: normal -> low type: -> feature request versions: +Python 2.7 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:09:14 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:09:14 +0000 Subject: [issue839159] iterators broken for weak dicts Message-ID: <1234613354.8.0.0130812913322.issue839159@psf.upfronthosting.co.za> Daniel Diniz added the comment: Patch has tests, may need updating. ---------- nosy: +ajaksu2 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:09:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:09:26 +0000 Subject: [issue836058] socket.send() on Win98 behaves as nonblocking when timeout is set Message-ID: <1234613366.55.0.730377876387.issue836058@psf.upfronthosting.co.za> Daniel Diniz added the comment: Is this still present in NT-based Windows? Support for 98 was dropped in 2.6. ---------- dependencies: +Inappropriate error received using socket timeout nosy: +ajaksu2 stage: -> test needed title: socket.send() on behaves as nonblocking when timeout is set -> socket.send() on Win98 behaves as nonblocking when timeout is set _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:09:37 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:09:37 +0000 Subject: [issue834461] simple bsddb interface potential for deadlock with threads Message-ID: <1234613377.08.0.38244917019.issue834461@psf.upfronthosting.co.za> Daniel Diniz added the comment: Jesus, is this one still relevant or can it be closed? ---------- nosy: +ajaksu2 type: -> behavior versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:09:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:09:47 +0000 Subject: [issue815753] SCO_SV: many modules cannot be imported Message-ID: <1234613387.54.0.693091564965.issue815753@psf.upfronthosting.co.za> Daniel Diniz added the comment: Skip says: "No activity since late 2003. Do we even have a SCO system to test anything on? Should SCO support be dropped?" I don't know the answers, but will close this one soon, unless arguments for keeping open are voiced. ---------- components: +Extension Modules nosy: +ajaksu2, brett.cannon stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:10:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:10:03 +0000 Subject: [issue813453] restrictions in _tkinter built with threaded tk undocumented Message-ID: <1234613403.71.0.984310402132.issue813453@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- type: -> feature request versions: +Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:10:15 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:10:15 +0000 Subject: [issue812750] OSA support for properties broken Message-ID: <1234613415.96.0.219887473188.issue812750@psf.upfronthosting.co.za> Daniel Diniz added the comment: The module is stagnant ("Development on this set of modules has stopped"), but the docs (for 2.6!) still claim " and a replacement is expected for Python 2.5". http://www.python.org/doc/2.6/library/macosa.html ---------- components: +Documentation nosy: +ajaksu2 stage: -> test needed status: open -> pending type: -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:10:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:10:20 +0000 Subject: [issue805194] Inappropriate error received using socket timeout on Windows. Message-ID: <1234613420.62.0.910603798262.issue805194@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- title: Inappropriate error received using socket timeout -> Inappropriate error received using socket timeout on Windows. type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:11:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:11:41 +0000 Subject: [issue795081] email.Message param parsing problem II Message-ID: <1234613501.73.0.0774551830304.issue795081@psf.upfronthosting.co.za> Daniel Diniz added the comment: Good candidate for the email sprint. Fix suggested inline. ---------- keywords: +easy nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:11:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:11:49 +0000 Subject: [issue786827] IDLE starts with no menus (Cygwin) Message-ID: <1234613509.98.0.149909799893.issue786827@psf.upfronthosting.co.za> Daniel Diniz added the comment: Is the problem described by Daniel, "So, it's not a Tk error. It's an error with trying to contact the subprocess", still present? It's not cleat to me from messages that it'd be restricted to Cygwin, if confirmed on other build please change title again. ---------- nosy: +ajaksu2 stage: -> test needed title: IDLE starts with no menus (Cygwin build of python2.3) -> IDLE starts with no menus (Cygwin) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:14:14 2009 From: report at bugs.python.org (Thomas Heller) Date: Sat, 14 Feb 2009 12:14:14 +0000 Subject: [issue850997] mbcs encoding ignores errors Message-ID: <1234613654.62.0.831308684069.issue850997@psf.upfronthosting.co.za> Changes by Thomas Heller : ---------- nosy: -theller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:17:10 2009 From: report at bugs.python.org (Roumen Petrov) Date: Sat, 14 Feb 2009 12:17:10 +0000 Subject: [issue4305] ctypes fails to build on mipsel-linux-gnu (detects mips instead of mipsel) In-Reply-To: <1226484001.23.0.749041410677.issue4305@psf.upfronthosting.co.za> Message-ID: <1234613830.63.0.834343293103.issue4305@psf.upfronthosting.co.za> Roumen Petrov added the comment: May I propose a simple py-issue-4305.patch. Let me know if patch work for you. ---------- nosy: +rpetrov Added file: http://bugs.python.org/file13083/py-issue-4305.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:18:41 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Feb 2009 12:18:41 +0000 Subject: [issue5179] subprocess leaves open fds on construction error In-Reply-To: <1234037080.37.0.0531724857804.issue5179@psf.upfronthosting.co.za> Message-ID: <1234613921.64.0.0954888030458.issue5179@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, I'm not under Windows. I'll try to launch a VM if nobody beats me to it... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:22:18 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:22:18 +0000 Subject: [issue832159] C++ extensions using SWIG and MinGW Message-ID: <1234614138.76.0.635136023011.issue832159@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +tarek stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:22:29 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:22:29 +0000 Subject: [issue808164] socket.close() doesn't play well with __del__ Message-ID: <1234614149.99.0.809362003963.issue808164@psf.upfronthosting.co.za> Daniel Diniz added the comment: Current code is: def close(self): self._sock = _closedsocket() dummy = self._sock._dummy for method in _delegate_methods: setattr(self, method, dummy) close.__doc__ = _realsocket.close.__doc__ It sure seems to be trying to avoid __del__ issues, does it fix this bug? ---------- nosy: +ajaksu2 stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:23:33 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 14 Feb 2009 12:23:33 +0000 Subject: [issue870479] Scripts need platform-dependent handling Message-ID: <1234614213.86.0.480935721.issue870479@psf.upfronthosting.co.za> Tarek Ziad? added the comment: What do you think about the way setuptools handles it ? I'd be in favor of integrating setuptools wrapping mechanism in distutils. (not the entry point part, just the way it generates .exe under windows and executable script under Linux) see http://peak.telecommunity.com/DevCenter/setuptools#automatic-script-creation ---------- assignee: -> tarek versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:26:15 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Feb 2009 12:26:15 +0000 Subject: [issue841461] Differentiation between Builtins and extension classes Message-ID: <1234614375.28.0.65040265591.issue841461@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:27:56 2009 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 14 Feb 2009 12:27:56 +0000 Subject: [issue832159] C++ extensions using SWIG and MinGW Message-ID: <1234614476.81.0.795635720295.issue832159@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:31:36 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:31:36 +0000 Subject: [issue935117] pkgutil doesn't understand case-senseless filesystems Message-ID: <1234614696.79.0.293504077373.issue935117@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- nosy: +tarek stage: -> test needed versions: +Python 2.7 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:31:39 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:31:39 +0000 Subject: [issue917120] imaplib: incorrect quoting in commands Message-ID: <1234614699.44.0.0902723539174.issue917120@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:31:45 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:31:45 +0000 Subject: [issue877121] configure detects incorrect compiler optimization Message-ID: <1234614705.23.0.178797107321.issue877121@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Build type: -> compile error versions: -Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:31:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:31:50 +0000 Subject: [issue850728] Semaphore.acquire() timeout parameter Message-ID: <1234614710.18.0.887899847224.issue850728@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:32:22 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:32:22 +0000 Subject: [issue849662] reading shelves is really slow Message-ID: <1234614742.93.0.859544802946.issue849662@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:32:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:32:34 +0000 Subject: [issue837577] cryptic os.spawnvpe() return code Message-ID: <1234614754.09.0.557629241047.issue837577@psf.upfronthosting.co.za> Daniel Diniz added the comment: Maybe a mention to this in the docs is good enough? But does the usual user of os.spawnvpe need such clarification? ---------- components: +Documentation nosy: +ajaksu2 stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:36:04 2009 From: report at bugs.python.org (James Wheare) Date: Sat, 14 Feb 2009 12:36:04 +0000 Subject: [issue5258] addpackage in site.py fails hard on badly formed .pth files In-Reply-To: <1234614964.94.0.514404315884.issue5258@psf.upfronthosting.co.za> Message-ID: <1234614964.94.0.514404315884.issue5258@psf.upfronthosting.co.za> New submission from James Wheare : As described here: http://james.wheare.org/notes/2009/02/import-site- failed-use-v-for-traceback.php The addpackage function will result in a TypeError being raised from os.path.exists(dir) -> from os.stat(path) if the contents of an inspected .pth file contain binary data. This can happen in OS X network environments where ._ AppleDouble files are created to store resource forks and file metadata. As this function is run whenever the interpreter is initialised, Python should be robust enough to ignore invalid data in these files, either by catching the TypeError in os.path.exists, or by detecting them at a higher level, but should be careful of false positives. Another alternative is to raise a different exception and use it to display more helpful debugging info for those not familiar with pdb. ---------- messages: 82032 nosy: jwheare severity: normal status: open title: addpackage in site.py fails hard on badly formed .pth files type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:36:09 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 14 Feb 2009 12:36:09 +0000 Subject: [issue5242] eval() function in List Comprehension doesn't work In-Reply-To: <1234518125.96.0.444530348539.issue5242@psf.upfronthosting.co.za> Message-ID: <1234614969.7.0.772424467241.issue5242@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:41:01 2009 From: report at bugs.python.org (James Wheare) Date: Sat, 14 Feb 2009 12:41:01 +0000 Subject: [issue5258] addpackage in site.py fails hard on badly formed .pth files In-Reply-To: <1234614964.94.0.514404315884.issue5258@psf.upfronthosting.co.za> Message-ID: <1234615261.5.0.714049609553.issue5258@psf.upfronthosting.co.za> James Wheare added the comment: To clarify, the exception doesn't interrupt the interpreter, but the only indication of a problem is the following message: 'import site' failed; use -v for traceback And you're then unable to import modules from site-packages. Also, here's a clickable link to the blog post with more details: http://tinyurl.com/dnlepc (rather aggressive line length enforcement going on here...) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:42:41 2009 From: report at bugs.python.org (Paul Moore) Date: Sat, 14 Feb 2009 12:42:41 +0000 Subject: [issue870479] Scripts need platform-dependent handling Message-ID: <1234615361.69.0.866208865304.issue870479@psf.upfronthosting.co.za> Paul Moore added the comment: In principle I don't have a problem with the automatic generation of an EXE (I assume it generates a shell script with no extension on Unix?) but it should be done in such a way that the EXE is version-independent. This is necessary to ensure that pure-python packages, when made into bdist_wininst installers, continue to be version-independent. (At the moment, distutils generates version-dependent bdist_wininst packages *only* for C extensions. Setuptools generates version-dependent installers all the time, which is a pain). This may mean that a reimplementation is required, rather than copying the setuptools code. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:42:53 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:42:53 +0000 Subject: [issue992207] exec statement balks at CR/LF Message-ID: <1234615373.19.0.554211852056.issue992207@psf.upfronthosting.co.za> Daniel Diniz added the comment: The behavior is still present, but I'm not sure it's a bug either. The documentation could mention this: http://docs.python.org/dev/reference/simple_stmts.html#exec ---------- assignee: -> georg.brandl components: +Documentation keywords: +easy nosy: +ajaksu2, georg.brandl stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:46:20 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Feb 2009 12:46:20 +0000 Subject: [issue839159] iterators broken for weak dicts Message-ID: <1234615580.82.0.572853775921.issue839159@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Interesting patch. I think the intermediate assertEquals in test_weak_*_dict_flushed_dead_items_when_iters_go_out are just testing an implementation detail, only the final one should remain. Also, it is likely the "code duplication" you are talking about was there for performance reasons, so I'd suggest putting it back in. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:47:22 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:47:22 +0000 Subject: [issue798058] IDLE / PyOS_InputHook Message-ID: <1234615642.07.0.341846905328.issue798058@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: -IDLE / PyOS_InputHook _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:47:29 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:47:29 +0000 Subject: [issue989712] Support using Tk without a mainloop Message-ID: <1234615649.07.0.41007124421.issue989712@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Tkinter dependencies: +IDLE / PyOS_InputHook stage: -> test needed type: -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:47:45 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:47:45 +0000 Subject: [issue991196] An inconsistency with nested scopes Message-ID: <1234615665.65.0.62308182219.issue991196@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed in trunk, ---------- nosy: +ajaksu2 type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:48:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:48:38 +0000 Subject: [issue775321] plistlib error handling Message-ID: <1234615718.21.0.578273620755.issue775321@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: -plistlib error handling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:48:48 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:48:48 +0000 Subject: [issue985064] plistlib crashes too easily on bad files Message-ID: <1234615728.78.0.297802718683.issue985064@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +plistlib error handling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:49:24 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:49:24 +0000 Subject: [issue985064] plistlib crashes too easily on bad files Message-ID: <1234615764.54.0.525013840622.issue985064@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:52:25 2009 From: report at bugs.python.org (STINNER Victor) Date: Sat, 14 Feb 2009 12:52:25 +0000 Subject: [issue5188] telnetlib process_rawq buffer handling is confused In-Reply-To: <1234131372.15.0.372715702734.issue5188@psf.upfronthosting.co.za> Message-ID: <1234615945.26.0.501191631593.issue5188@psf.upfronthosting.co.za> STINNER Victor added the comment: b"\021"[0] can be written 0o21 (or 17 or 0x11). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:52:50 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:52:50 +0000 Subject: [issue984219] hotspot.stats.load is very slow Message-ID: <1234615970.86.0.16135367821.issue984219@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed versions: +Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:54:52 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Feb 2009 12:54:52 +0000 Subject: [issue935117] pkgutil doesn't understand case-senseless filesystems Message-ID: <1234616092.68.0.789964656129.issue935117@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Perhaps it's just me, but Fred's use case looks horrible. If you have three packages named "foo", "Foo" and "foo", all of which reachable through sys.path on a case-insensitive filesystem, I'm not sure how to expect Python to make sense out of the situation. IMHO, the only reasonable solution is to fix the package names... ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:55:59 2009 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 14 Feb 2009 12:55:59 +0000 Subject: [issue798520] os.popen with invalid mode differs on Windows and POSIX Message-ID: <1234616159.83.0.498075700994.issue798520@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: On Windows: >>> os.popen("cmd", "") Traceback (most recent call last): File "", line 1, in ValueError: popen() arg 2 must be 'r' or 'w' Windows has a specific implementation of os.popen, which does validate the mode. Whereas on POSIX platforms, the parameters are passed as is to the popen() function. I'd call this an "implementation detail", and the exact exception is not important IMO. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:57:28 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Feb 2009 12:57:28 +0000 Subject: [issue984219] hotspot.stats.load is very slow Message-ID: <1234616248.16.0.566057671023.issue984219@psf.upfronthosting.co.za> Antoine Pitrou added the comment: hotshot is more or less deprecated, cProfile being the recommended replacement for high-performance profiling. I suggest closing this issue as won't fix. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 13:58:58 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 12:58:58 +0000 Subject: [issue984870] curses: getmaxyx() breaks when the window shrinks Message-ID: <1234616338.38.0.521175017517.issue984870@psf.upfronthosting.co.za> Daniel Diniz added the comment: I get a different behavior, with shrinking reporting correct sizes, but quiting with a "_curses.error: curses function returned NULL", on trunk, KDE 3.5's Konsole._curses.error: curses function returned NULL ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:23:10 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Feb 2009 13:23:10 +0000 Subject: [issue5178] Add context manager for temporary directory In-Reply-To: <1234029261.42.0.975383428204.issue5178@psf.upfronthosting.co.za> Message-ID: <1234617790.32.0.401042239731.issue5178@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If you look at the code for os.path.isdir, it uses other globals such as os.stat, so you might want to reinject them in your class as well... ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:33:14 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Feb 2009 13:33:14 +0000 Subject: [issue5252] 2to3 should detect and delete import of removed statvfs module In-Reply-To: <87fxihs44g.fsf@xemacs.org> Message-ID: <1afaf6160902140533hcad38dcm5a86c8a64e503c7f@mail.gmail.com> Benjamin Peterson added the comment: On Sat, Feb 14, 2009 at 4:33 AM, Stephen J. Turnbull wrote: > > Stephen J. Turnbull added the comment: > > Benjamin Peterson writes: > > > Hmm. 2to3 doesn't currently mess with the stat module and os.stat the > > more common function. Also the new interface (attributes on the objects > > returned) has been around since 2.2. > > So what? You *can't* import a nonexistent module, so the import > statement should be removed to save the programmer the trouble. No, the programmer should remove the import statement when he's porting it to use the attributes of the statvfs call. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:41:43 2009 From: report at bugs.python.org (Mark Miller) Date: Sat, 14 Feb 2009 13:41:43 +0000 Subject: [issue4305] ctypes fails to build on mipsel-linux-gnu (detects mips instead of mipsel) In-Reply-To: <1226484001.23.0.749041410677.issue4305@psf.upfronthosting.co.za> Message-ID: <1234618903.62.0.00473350287817.issue4305@psf.upfronthosting.co.za> Mark Miller added the comment: Not entirely. I applied what you had for the autoconf section to my configure, since I do not have autoconf installed in my environment. Specifically, this part of configure is what's messing with the build: if test x$TARGET = xMIPS; then MIPS_TRUE= MIPS_FALSE='#' else MIPS_TRUE='#' MIPS_FALSE= fi Since the target is being renamed to MIPS_LINUX or MIPS_IRIX, this test assumes the target is not MIPS. The patch you have gets past the build break, but doesn't actually compile what I believe is a working libffi for MIPS. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:53:47 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:53:47 +0000 Subject: [issue936813] fast modular exponentiation Message-ID: <1234619627.69.0.288933109161.issue936813@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> patch review versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:53:54 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:53:54 +0000 Subject: [issue940286] pydoc.Helper.help() ignores input/output init parameters Message-ID: <1234619634.15.0.0916717471867.issue940286@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed. Is it relevant? ---------- nosy: +ajaksu2 type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:54:13 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:54:13 +0000 Subject: [issue941262] List with Canvas.create_line Option arrow=LAST Broke Message-ID: <1234619653.12.0.78634739819.issue941262@psf.upfronthosting.co.za> Daniel Diniz added the comment: Not sure what the expected behavior is, or if the bug is in OP's code. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:54:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:54:38 +0000 Subject: [issue941346] AIX shared library fix Message-ID: <1234619678.48.0.773618093119.issue941346@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Build, Extension Modules -None stage: -> test needed type: -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:54:49 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:54:49 +0000 Subject: [issue949667] file write() method and non-blocking mode. Message-ID: <1234619689.79.0.511405522253.issue949667@psf.upfronthosting.co.za> Daniel Diniz added the comment: Implemented in 3.0, 2.x probably won't get this. Will close if nobody opposes. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:55:07 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:55:07 +0000 Subject: [issue956303] Update pickle docs to describe format of persistent IDs Message-ID: <1234619707.92.0.499062746552.issue956303@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> needs patch type: -> feature request versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:55:23 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:55:23 +0000 Subject: [issue959576] Can't build Python on POSIX w/o $HOME Message-ID: <1234619723.29.0.744353904606.issue959576@psf.upfronthosting.co.za> Daniel Diniz added the comment: Fixed by 41834. Please leave open if reverting the fix and patching distutils is still a option, close if not. ---------- assignee: -> tarek components: +Distutils, Extension Modules nosy: +ajaksu2, tarek stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:55:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:55:42 +0000 Subject: [issue960325] "--require " option for configure/make (fail if building not possible) Message-ID: <1234619742.1.0.305440800671.issue960325@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- title: "require " configure option -> "--require " option for configure/make (fail if building not possible) versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:56:03 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:56:03 +0000 Subject: [issue963906] Unicode email address helper Message-ID: <1234619763.46.0.680047490771.issue963906@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Unicode stage: -> patch review type: -> feature request versions: +Python 2.7 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:56:14 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:56:14 +0000 Subject: [issue967275] Better SSL support in socket module Message-ID: <1234619774.74.0.132738881995.issue967275@psf.upfronthosting.co.za> Daniel Diniz added the comment: SSL has changed a lot, is this issue still relevant? ---------- nosy: +ajaksu2 stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:56:30 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:56:30 +0000 Subject: [issue967934] csv module cannot handle embedded \r Message-ID: <1234619790.39.0.22073767377.issue967934@psf.upfronthosting.co.za> Daniel Diniz added the comment: IIUC, I get the correct behavior: trunk-py$ ./python ~/Desktop/tcsv.py ['fld1', 'fld2', 'fld3 ', 'fld4'] ['fld1', 'fld2', 'fld3 \r', 'fld4'] trunk-py$ cat ~/Desktop/tcsv.py #! /usr/local/bin/python import csv d = 'fld1,fld2,"fld3 ",fld4\r\n' d2 = 'fld1,fld2,"fld3 \r' d3 = '",fld4\r\n' r = csv.reader([d, d2, d3], dialect="excel") for f in r: print f ---------- components: +Extension Modules dependencies: +CSV regression in 2.5a1: multi-line cells nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:56:36 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Feb 2009 13:56:36 +0000 Subject: [issue4136] merge json library with latest simplejson 2.0.x In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1234619796.33.0.553036460723.issue4136@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Bob, any news on this? ---------- nosy: +pitrou stage: -> needs patch title: merge json library with simplejson 2.0.3 -> merge json library with latest simplejson 2.0.x type: -> behavior versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:56:42 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:56:42 +0000 Subject: [issue968430] error flattening complex smime signed message Message-ID: <1234619802.97.0.77183572611.issue968430@psf.upfronthosting.co.za> Daniel Diniz added the comment: Patch at #1670765. ---------- dependencies: +email.Generator: no header wrapping for multipart/signed nosy: +ajaksu2 stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:57:09 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:57:09 +0000 Subject: [issue970288] Fix for #876637 - Random stack corruption from socketmodule Message-ID: <1234619829.2.0.580207694909.issue970288@psf.upfronthosting.co.za> Daniel Diniz added the comment: Fixed in revision 42253. ---------- dependencies: +Random stack corruption from socketmodule.c nosy: +ajaksu2 resolution: -> out of date stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:57:17 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:57:17 +0000 Subject: [issue970783] PyObject_GenericGetAttr is undocumented Message-ID: <1234619837.86.0.000231354475661.issue970783@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:57:28 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:57:28 +0000 Subject: [issue971330] test_signal sucks Message-ID: <1234619848.41.0.923036781715.issue971330@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Tests -Library (Lib) type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:57:53 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:57:53 +0000 Subject: [issue974019] ConfigParser non-string defaults broken with .getboolean() Message-ID: <1234619873.96.0.331292585942.issue974019@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- keywords: +easy, patch stage: -> test needed versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:58:26 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:58:26 +0000 Subject: [issue974159] Starting a script in OSX within a specific folder Message-ID: <1234619906.71.0.00127475642525.issue974159@psf.upfronthosting.co.za> Daniel Diniz added the comment: Will close this one unless someone thinks the use case is important and currently not possible. ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:58:38 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:58:38 +0000 Subject: [issue974635] Slice indexes passed to __getitem__ are wrapped Message-ID: <1234619918.68.0.466565139469.issue974635@psf.upfronthosting.co.za> Daniel Diniz added the comment: Will close this one as a duplicate of #723806 unless someone springs to its defense. ---------- dependencies: +overintelligent slice() behavior on integers nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:58:48 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:58:48 +0000 Subject: [issue975330] Inconsistent newline handling in email module Message-ID: <1234619928.63.0.397400555148.issue975330@psf.upfronthosting.co.za> Daniel Diniz added the comment: Email sprint candidate. ---------- keywords: +easy, patch nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:58:59 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:58:59 +0000 Subject: [issue975646] tp_(get|set)attro? inheritance bug Message-ID: <1234619939.35.0.519561855698.issue975646@psf.upfronthosting.co.za> Daniel Diniz added the comment: Not a bug, then? Will close unless someone argues against it. ---------- nosy: +ajaksu2 type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 14:59:12 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 13:59:12 +0000 Subject: [issue978604] wait_variable hangs at exit Message-ID: <1234619952.51.0.326575116835.issue978604@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed on Linux (closing after 'script 2'): trunk-py$ ./python WaitTest.py script 0 script 1 script 2 invalid command name "137221876callit" while executing "137221876callit" ("after" script) ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:07:52 2009 From: report at bugs.python.org (Gustavo J. A. M. Carneiro) Date: Sat, 14 Feb 2009 14:07:52 +0000 Subject: [issue975646] tp_(get|set)attro? inheritance bug Message-ID: <1234620472.41.0.688620897272.issue975646@psf.upfronthosting.co.za> Gustavo J. A. M. Carneiro added the comment: If this problem does not apply to Python 3.x, by all means go ahead and close it. It probably is a bug, but probably not worth fixing; workaround is simple enough, and affected extensions have already adapted to it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:11:28 2009 From: report at bugs.python.org (Virgil Dupras) Date: Sat, 14 Feb 2009 14:11:28 +0000 Subject: [issue839159] iterators broken for weak dicts Message-ID: <1234620688.95.0.248859697892.issue839159@psf.upfronthosting.co.za> Virgil Dupras added the comment: About duplicated code and performance: When I look at the duplicated code, I don't see anything that remotely looks like a performance tweak. Just to make sure, I made a bench: #!/usr/bin/env python import sys sys.path.insert(0, 'Lib') import timeit import weakref class Foo(object): pass def setup(): L = [Foo() for i in range(1000)] global d d = weakref.WeakValueDictionary(enumerate(L)) del L[:500] # have some dead weakrefs def do(): d.values() print timeit.timeit(do, setup, number=100000) Results without the patch: ./python.exe weakref_bench.py 0.804216861725 Results with the patch: $ ./python.exe weakref_bench.py 0.813000202179 I think the small difference in performance is more attributable to the extra processing the weakref dict does than the deduplication of the code itself. About the test_weak_*_dict_flushed_dead_items_when_iters_go_out: If a weakref dict keeps its weak reference alive, it's not an implementation detail, it's a bug. The whole point of using such dicts is to not keep keys or values alive when they go out. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:18:08 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 14 Feb 2009 14:18:08 +0000 Subject: [issue936813] fast modular exponentiation Message-ID: <1234621088.17.0.218126717324.issue936813@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'll see if I can find time to look at this; I'm currently looking at various ways to improve long integer arithmetic in 2.7/3.1. ---------- assignee: tim_one -> marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:19:18 2009 From: report at bugs.python.org (Musashi Tamura) Date: Sat, 14 Feb 2009 14:19:18 +0000 Subject: [issue5259] smtplib is broken in Python3 In-Reply-To: <1234621158.53.0.153253851523.issue5259@psf.upfronthosting.co.za> Message-ID: <1234621158.53.0.153253851523.issue5259@psf.upfronthosting.co.za> New submission from Musashi Tamura : Issue #<3921> may be the same problem. Sending Gmail by smtplib fails on Python 3.0 and 3.0.1. It seems to be exist two problems in encode_plain function in smtplib.py: * parameter of encode_base64 must be bytes, not str, * by default, encode_base64 adds extra newline. The following is an example of patch. # original version def encode_plain(user, password): return encode_base64("\0%s\0%s" % (user, password)) # fixed version. Note that "eol=''" is given in Python 2.6's smtplib. def encode_plain(user, password): s = "\0%s\0%s" % (user, password) return encode_base64(s.encode('ascii'), eol='') ---------- components: Library (Lib) messages: 82064 nosy: miwa severity: normal status: open title: smtplib is broken in Python3 type: crash versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:24:03 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Feb 2009 14:24:03 +0000 Subject: [issue5259] smtplib is broken in Python3 In-Reply-To: <1234621158.53.0.153253851523.issue5259@psf.upfronthosting.co.za> Message-ID: <1234621443.78.0.884031175454.issue5259@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you show us the failing application? Most likely, the bug is in your code, not in Python. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:25:08 2009 From: report at bugs.python.org (Virgil Dupras) Date: Sat, 14 Feb 2009 14:25:08 +0000 Subject: [issue839159] iterators broken for weak dicts Message-ID: <1234621508.88.0.157755131065.issue839159@psf.upfronthosting.co.za> Virgil Dupras added the comment: Oh, that's me again not correctly reading my own tests. It's the *_are_not_held_* tests that test that no reference is kept. I agree about the *_flushed_dead_items_* being an implementation detail. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:28:47 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Feb 2009 14:28:47 +0000 Subject: [issue839159] iterators broken for weak dicts In-Reply-To: <1234620688.95.0.248859697892.issue839159@psf.upfronthosting.co.za> Message-ID: <1234621771.6357.2.camel@fsol> Antoine Pitrou added the comment: > Results without the patch: > ./python.exe weakref_bench.py > 0.804216861725 > > Results with the patch: > $ ./python.exe weakref_bench.py > 0.813000202179 Thanks for the numbers, I see my worries were unfounded. > About the test_weak_*_dict_flushed_dead_items_when_iters_go_out: > > If a weakref dict keeps its weak reference alive, it's not an > implementation detail, it's a bug. The whole point of using such dicts > is to not keep keys or values alive when they go out. I was talking about doing `self.assertEqual(len(d), self.COUNT)` before deleting the iterators. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:31:01 2009 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Sat, 14 Feb 2009 14:31:01 +0000 Subject: [issue935117] pkgutil doesn't understand case-senseless filesystems Message-ID: <1234621861.05.0.0877163107343.issue935117@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: Antoine: I agree programmers shouldn't try to create situations like this. Consider however an application assembled using a build tool like zc.buildout, which installs each package into a separate installation location (based on setuptools and easy_install). If the application uses several packages from the "foo" namespace (to keep with the original names from the report), there will be directories matching the first and third packages from the example. Now, further development on the application may cause a 3rd-party package named Foo to be used. This name is not the application programmer's to select, and the volume of code from the "foo" namespace may be too large to modify; it may represent 3rd party code (for example, the "zope" namespace package contains many widely used examples; if used at all, many are likely to be used). So I think the original use case stands, and may even be more important than ever given the widespread use of "namespace" packages. This also suggests that developers should check for the existence of packages of similar name before releasing code, in order to avoid this situation. (I'm disassociating msg20510, since roundup doesn't screw up the tree in the original report, so that message no longer adds anything useful.) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:31:14 2009 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Sat, 14 Feb 2009 14:31:14 +0000 Subject: [issue935117] pkgutil doesn't understand case-senseless filesystems Message-ID: <1234621874.29.0.111534207548.issue935117@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:34:19 2009 From: report at bugs.python.org (Roumen Petrov) Date: Sat, 14 Feb 2009 14:34:19 +0000 Subject: [issue4305] ctypes fails to build on mipsel-linux-gnu (detects mips instead of mipsel) In-Reply-To: <1226484001.23.0.749041410677.issue4305@psf.upfronthosting.co.za> Message-ID: <1234622059.36.0.479030976432.issue4305@psf.upfronthosting.co.za> Roumen Petrov added the comment: So I attach patch with changes in Modules/_ctypes/libffi/configure for the tests. Added file: http://bugs.python.org/file13084/py-issue-4305+configure.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:42:57 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:42:57 +0000 Subject: [issue1036490] Extend Shelf to support unicode keys Message-ID: <1234622577.1.0.122513999065.issue1036490@psf.upfronthosting.co.za> Daniel Diniz added the comment: Is this one still valid? Test script is missing. ---------- components: +Library (Lib) nosy: +ajaksu2 stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:43:07 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:43:07 +0000 Subject: [issue1030499] os.path.join() does not raise TypeError Message-ID: <1234622587.51.0.0341185005544.issue1030499@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Library (Lib) -None stage: -> test needed type: -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:43:14 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:43:14 +0000 Subject: [issue1027570] os.stat errors when using shared drive on XP or NT Message-ID: <1234622594.26.0.0874084999803.issue1027570@psf.upfronthosting.co.za> Daniel Diniz added the comment: Needs confirmation. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:43:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:43:20 +0000 Subject: [issue1021318] PyThreadState_Next not thread safe? Message-ID: <1234622600.82.0.531923325407.issue1021318@psf.upfronthosting.co.za> Daniel Diniz added the comment: Can someone take a look a this and either close or propose what to do? ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:43:23 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:43:23 +0000 Subject: [issue1020188] Use Py_CLEAR where necessary to avoid crashes Message-ID: <1234622603.89.0.619535329185.issue1020188@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:43:31 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:43:31 +0000 Subject: [issue1018492] Solaris: reentrancy issues Message-ID: <1234622611.52.0.349355383959.issue1018492@psf.upfronthosting.co.za> Daniel Diniz added the comment: Is this still a concern? ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:43:35 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:43:35 +0000 Subject: [issue1015254] Create cgi.FieldStorage._get_new_instance method as factory Message-ID: <1234622615.42.0.25951369707.issue1015254@psf.upfronthosting.co.za> Daniel Diniz added the comment: Doesn't seem to have gathered much support. Is the RFE still valid? ---------- nosy: +ajaksu2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:43:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:43:41 +0000 Subject: [issue1015249] cgi.FieldStorage.__len__ eventually throws TypeError Message-ID: <1234622621.25.0.383958852192.issue1015249@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:43:58 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:43:58 +0000 Subject: [issue1012435] ctrl-left/-right works incorectly with diacritics Message-ID: <1234622638.58.0.988996021016.issue1012435@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:44:10 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:44:10 +0000 Subject: [issue1011894] PyDoc does not support ZIP Message-ID: <1234622650.88.0.715087012827.issue1011894@psf.upfronthosting.co.za> Daniel Diniz added the comment: Fixed, e.g. revision 45510. ---------- components: +Library (Lib) -None nosy: +ajaksu2 resolution: -> out of date status: open -> closed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:44:20 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:44:20 +0000 Subject: [issue1007223] SGI (IRIX6.5.24) Problems building nismodule.c Message-ID: <1234622660.15.0.373346333236.issue1007223@psf.upfronthosting.co.za> Daniel Diniz added the comment: Will close unless OP provides more feedback or someone else can follow through. ---------- nosy: +ajaksu2 priority: normal -> low stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:44:34 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:44:34 +0000 Subject: [issue1006238] cross compile patch Message-ID: <1234622674.09.0.577026136811.issue1006238@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:44:41 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:44:41 +0000 Subject: [issue1004810] Carbon.File fails if server vol is mounted after launch Message-ID: <1234622681.19.0.563916398624.issue1004810@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:44:53 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:44:53 +0000 Subject: [issue1001150] hotspot profiler does not work correctly on P4 CPUs with HT Message-ID: <1234622693.78.0.18827267258.issue1001150@psf.upfronthosting.co.za> Daniel Diniz added the comment: Will close unless OP provides more feedback or someone else opposes. ---------- components: +Extension Modules nosy: +ajaksu2 priority: normal -> low type: -> behavior versions: +3rd party, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:45:58 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:45:58 +0000 Subject: [issue995956] TclError with intel's hypertheading Message-ID: <1234622758.46.0.623509923838.issue995956@psf.upfronthosting.co.za> Daniel Diniz added the comment: Will close unless OP provides more feedback or someone else can confirm. ---------- nosy: +ajaksu2 stage: -> test needed type: -> behavior versions: +3rd party, Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:46:08 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:46:08 +0000 Subject: [issue995907] memory leak with threads and enhancement of the timer class Message-ID: <1234622768.52.0.273999582817.issue995907@psf.upfronthosting.co.za> Daniel Diniz added the comment: Can't quite understand what the problem is supposed to be, comments? ---------- nosy: +ajaksu2 stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:46:18 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:46:18 +0000 Subject: [issue995458] Does not build selected SGI specific modules Message-ID: <1234622778.58.0.9059417294.issue995458@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Extension Modules type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:46:31 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:46:31 +0000 Subject: [issue993580] inspect.findsource does not call linecache.checkcache Message-ID: <1234622791.45.0.798488739556.issue993580@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- stage: -> test needed type: -> feature request versions: +Python 2.7 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:46:55 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:46:55 +0000 Subject: [issue979658] Improve HTML documentation of a directory Message-ID: <1234622815.6.0.711590345651.issue979658@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: normal -> low stage: -> test needed versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 15:47:02 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 14:47:02 +0000 Subject: [issue976613] socket timeout problems on Solaris Message-ID: <1234622822.93.0.328130455728.issue976613@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- components: +Extension Modules stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 16:18:37 2009 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 14 Feb 2009 15:18:37 +0000 Subject: [issue1036490] Extend Shelf to support unicode keys Message-ID: <1234624717.49.0.89073465196.issue1036490@psf.upfronthosting.co.za> Martin v. L?wis added the comment: It's fixed in 3.0, by means of the keyencoding argument to Shelf. It would be possible to port that back to 2.7; since no patch had been forthcoming, I'm closing this as fixed, anyway. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 16:40:00 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 14 Feb 2009 15:40:00 +0000 Subject: [issue1027570] os.stat errors when using shared drive on XP or NT Message-ID: <1234626000.42.0.969503646361.issue1027570@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I tried on Win2000, I cannot reproduce this bug. Probably this issue was fixed at some point. ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 17:00:47 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 14 Feb 2009 16:00:47 +0000 Subject: [issue5179] subprocess leaves open fds on construction error In-Reply-To: <1234037080.37.0.0531724857804.issue5179@psf.upfronthosting.co.za> Message-ID: <1234627247.2.0.374237348938.issue5179@psf.upfronthosting.co.za> Georg Brandl added the comment: On second thought, if the patch is applied, there *shouldn't* be an exception. And simply running the loop for a fixed number of repetitions isn't a good test either, since different platforms may have a different maximum for open file descriptors. Hmm, is there a way to get the current number of open file descriptors? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 17:12:59 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Feb 2009 16:12:59 +0000 Subject: [issue5179] subprocess leaves open fds on construction error In-Reply-To: <1234627247.2.0.374237348938.issue5179@psf.upfronthosting.co.za> Message-ID: <1234628022.6357.11.camel@fsol> Antoine Pitrou added the comment: > Hmm, is there a way to get the current number of open file descriptors? Under Unix, you can use resource.getrlimit(): (1024, 1024) But 1024 is a very common value, so you could simply loop 1024 times if it's not too slow. Besides, you definitely don't want to loop 2**31 times if 2**31 happens to be the current limit. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 17:14:00 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Feb 2009 16:14:00 +0000 Subject: [issue5179] subprocess leaves open fds on construction error In-Reply-To: <1234037080.37.0.0531724857804.issue5179@psf.upfronthosting.co.za> Message-ID: <1234628040.08.0.02153532615.issue5179@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Wow, the Roundup email gateway borks code snippets: >>> import resource >>> resource.getrlimit(resource.RLIMIT_NOFILE) (1024, 1024) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 17:19:08 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Feb 2009 16:19:08 +0000 Subject: [issue975646] tp_(get|set)attro? inheritance bug Message-ID: <1234628348.8.0.844725959184.issue975646@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 17:30:30 2009 From: report at bugs.python.org (Neil Schemenauer) Date: Sat, 14 Feb 2009 16:30:30 +0000 Subject: [issue5178] Add context manager for temporary directory In-Reply-To: <1234029261.42.0.975383428204.issue5178@psf.upfronthosting.co.za> Message-ID: <1234629030.55.0.617185576207.issue5178@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Argh, it's like pulling a sweater thread. The stat.S_ISDIR function uses the S_IFDIR global so I would have write my own. This does not look like good maintainable code, IMO. Maybe there should be a special flag modules can set to make them get cleared later in the interpreter cleanup procedure. Modules could set it if they don't create reference cycles themselves and don't hold references to user objects. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 17:39:53 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Feb 2009 16:39:53 +0000 Subject: [issue960325] "--require " option for configure/make (fail if building not possible) Message-ID: <1234629593.59.0.430286187965.issue960325@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Hallvard, do you still consider this a live issue? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 17:44:38 2009 From: report at bugs.python.org (hhas) Date: Sat, 14 Feb 2009 16:44:38 +0000 Subject: [issue916013] Improving MacPython's IAC support Message-ID: <1234629878.64.0.0160904334242.issue916013@psf.upfronthosting.co.za> hhas added the comment: As of Python 2.6/3.0, all Mac-specific modules are deprecated/eliminated from the standard library and there are no longer any plans to submit appscript for possible inclusion. This issue should be rejected and closed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 17:45:00 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Feb 2009 16:45:00 +0000 Subject: [issue5178] Add context manager for temporary directory In-Reply-To: <1234629030.55.0.617185576207.issue5178@psf.upfronthosting.co.za> Message-ID: <1234629944.6357.13.camel@fsol> Antoine Pitrou added the comment: > Maybe there should be a special flag modules can set to make them get > cleared later in the interpreter cleanup procedure. Modules could set > it if they don't create reference cycles themselves and don't hold > references to user objects. Or, perhaps we could remove the assignment to None and use a finalization scheme based on the garbage collector instead. See #812369 (no patch for the above idea unfortunately). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 17:48:14 2009 From: report at bugs.python.org (Viktor Ferenczi) Date: Sat, 14 Feb 2009 16:48:14 +0000 Subject: [issue984219] hotspot.stats.load is very slow Message-ID: <1234630094.94.0.980438442468.issue984219@psf.upfronthosting.co.za> Viktor Ferenczi added the comment: I agree. Just close this as "won't fix". _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 17:52:20 2009 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Feb 2009 16:52:20 +0000 Subject: [issue995907] memory leak with threads and enhancement of the timer class Message-ID: <1234630340.95.0.216622029902.issue995907@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I can't understand problem number 1 either. I suspect it is a misunderstanding by the poster, since he is talking about a "destructor of the c++ based library" and there's no c++ code in the interpreter. As for number 2, it is a legitimate feature request. However, since the current Timer class is very inefficient (one separate thread for each timer), it would make sense to rephrase it as a more general suggestion to re-implement the Timer class using a single background thread and a heapq-based priority queue. It would be a good project for someone wanting to start contributing to the interpreter. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 17:52:52 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Feb 2009 16:52:52 +0000 Subject: [issue916013] Improving MacPython's IAC support Message-ID: <1234630372.18.0.193331004179.issue916013@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 17:53:06 2009 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 14 Feb 2009 16:53:06 +0000 Subject: [issue984219] hotspot.stats.load is very slow Message-ID: <1234630386.63.0.977075524673.issue984219@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 17:54:50 2009 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 14 Feb 2009 16:54:50 +0000 Subject: [issue1027570] os.stat errors when using shared drive on XP or NT Message-ID: <1234630490.71.0.472110198026.issue1027570@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I'll close this entry. Please reopen if something left. (ex: not work on XP or so) ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 18:01:54 2009 From: report at bugs.python.org (Georg Brandl) Date: Sat, 14 Feb 2009 17:01:54 +0000 Subject: [issue5179] subprocess leaves open fds on construction error In-Reply-To: <1234037080.37.0.0531724857804.issue5179@psf.upfronthosting.co.za> Message-ID: <1234630914.94.0.589529899291.issue5179@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, Windows has 2048. Added test and fixed in r69620. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 18:09:15 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Feb 2009 17:09:15 +0000 Subject: [issue995458] Does not build selected SGI specific modules Message-ID: <1234631355.11.0.0324637223664.issue995458@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I suspect this can be closed either as "won't fix" or "out of date". While only Irix 4 and not Irix 6 is listed in Removing support for little used platforms http://www.python.org/dev/peps/pep-0011/ I suspect Irix 6 may be close to that stage. I asked on pydev. In any case, Irix modules are gone in Py3 http://www.python.org/dev/peps/pep-3108/#irix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 18:14:15 2009 From: report at bugs.python.org (Zan Dobersek) Date: Sat, 14 Feb 2009 17:14:15 +0000 Subject: [issue991266] Cookie.py does not correctly quote Morsels Message-ID: <1234631655.8.0.0127028331971.issue991266@psf.upfronthosting.co.za> Zan Dobersek added the comment: This patch adds an unicode character, converted to UTF8 as a cookie's comment and then checks if it is correctly quoted. ---------- keywords: +patch nosy: +zdobersek Added file: http://bugs.python.org/file13085/991266test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 18:44:50 2009 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 14 Feb 2009 17:44:50 +0000 Subject: [issue5260] longobject.c: minor fixes, cleanups and optimizations In-Reply-To: <1234633490.48.0.538074848497.issue5260@psf.upfronthosting.co.za> Message-ID: <1234633490.48.0.538074848497.issue5260@psf.upfronthosting.co.za> New submission from Mark Dickinson : Here are various minor portability and standards-compliance fixes, optimizations and cleanups for the trunk version of Objects/longobject.c. Most of these also apply to py3k. I'll admit to an ulterior motive here: the aim is to extract all the trivial, non-behaviour-changing pieces of the 30-bit longdigit patch (issue 4258), in order to make that patch easier to review. A good few of the changes here are designed to weaken the assumptions about the relative sizes of digit, int and long. Detailed contents of this patch: - make longs smaller by being more careful about tp_basicsize: it's defined as offsetof(PyLongObject, ob_digit) instead of the previous sizeof(PyLongObject) - sizeof(digit). On average, this saves 2 bytes per long on 32-bit platforms and 6 bytes per long on 64-bit platforms. This is similar to the fix that's already in py3k, but more portable since it doesn't make assumptions about the amount of padding between the PyVarObject head and the long digits. - add overflow check in _PyLong_New - replace double cast (double -> long -> digit) in PyLong_FromDouble with a single double -> digit cast. - int -> Py_ssize_t fixes in _PyLong_FromByteArray. - fix bogus overflow check in _PyLong_FromByteArray. - inline muladd1 into mul1 - simplify long_hash (without changing its semantics in any way): there's no need for the masking when rotating x; everything in sight is unsigned and unambiguous. - make PyLong_MASK unsigned (of type digit); this is safer, since it's used in many bitwise operations. - remove wdigit from Include/longintrepr.h; it's no longer used - remove some unnecessary forward declarations - add a few extra casts to silence compiler warnings from gcc -Wextra ---------- assignee: marketdickinson components: Interpreter Core files: trunk_long_cleanup.patch keywords: patch messages: 82095 nosy: marketdickinson priority: normal severity: normal stage: patch review status: open title: longobject.c: minor fixes, cleanups and optimizations type: behavior versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file13086/trunk_long_cleanup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 19:05:19 2009 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 14 Feb 2009 18:05:19 +0000 Subject: [issue5104] getsockaddrarg() casts port number from int to short without any warning In-Reply-To: <1233271436.92.0.964920785544.issue5104@psf.upfronthosting.co.za> Message-ID: <1234634719.62.0.662889985498.issue5104@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- resolution: -> fixed status: open -> closed versions: +Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 19:09:25 2009 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Feb 2009 18:09:25 +0000 Subject: [issue995458] Does not build selected SGI specific modules Message-ID: <1234634965.55.0.121876687435.issue995458@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Guido's answer: "Irix is long dead and we don't support it in any form or version." ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 19:18:58 2009 From: report at bugs.python.org (Daniel Diniz) Date: Sat, 14 Feb 2009 18:18:58 +0000 Subject: [issue1055864] HTMLParser not compliant to XHTML spec Message-ID: <1234635538.16.0.202111028841.issue1055864@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- dependencies: +HTMLParser doesn't treat endtags in